An open API service indexing awesome lists of open source software.

https://github.com/rhythmictech/terraform-aws-efs-filesystem

Creates an AWS EFS file system and associated mount points and security group. Optionally (on by default), configures a one-off AWS Backup plan/vault to back up the volume.
https://github.com/rhythmictech/terraform-aws-efs-filesystem

aws aws-efs terraform terraform-module

Last synced: 6 months ago
JSON representation

Creates an AWS EFS file system and associated mount points and security group. Optionally (on by default), configures a one-off AWS Backup plan/vault to back up the volume.

Awesome Lists containing this project

README

          

# terraform-aws-efs-filesystem

Creates an AWS EFS file system and associated mount points and security group. Optionally (on by default), configures a one-off AWS Backup plan/vault to back up the volume.

[![tflint](https://github.com/rhythmictech/terraform-aws-efs-filesystem/workflows/tflint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-aws-efs-filesystem/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster)
[![tfsec](https://github.com/rhythmictech/terraform-aws-efs-filesystem/workflows/tfsec/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-aws-efs-filesystem/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster)
[![yamllint](https://github.com/rhythmictech/terraform-aws-efs-filesystem/workflows/yamllint/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-aws-efs-filesystem/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster)
[![misspell](https://github.com/rhythmictech/terraform-aws-efs-filesystem/workflows/misspell/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-aws-efs-filesystem/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster)
[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-efs-filesystem/workflows/pre-commit-check/badge.svg?branch=master&event=push)](https://github.com/rhythmictech/terraform-aws-efs-filesystem/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster)
follow on Twitter

## Example

```hcl
module "efs" {
source = "rhythmictech/efs-filesystem/aws"

name = "photos"
allowed_security_groups = ["sg-1234567890"]
subnets = [
"subnet-1234567890",
"subnet-0123456789",
"subnet-9012345678",
]
vpc_id = "vpc-1234567890"
}
```

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.12.19 |
| [aws](#requirement\_aws) | >=3.21.0 |

## Providers

| Name | Version |
|------|---------|
| [aws](#provider\_aws) | 4.55.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_backup_plan.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/backup_plan) | resource |
| [aws_backup_selection.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/backup_selection) | resource |
| [aws_backup_vault.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/backup_vault) | resource |
| [aws_efs_file_system.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system) | resource |
| [aws_efs_mount_target.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_mount_target) | resource |
| [aws_iam_role.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_kms_key.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kms_key) | resource |
| [aws_security_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource |
| [aws_security_group_rule.allow_cidrs_to_efs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_security_group_rule.allow_sgs_to_efs](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule) | resource |
| [aws_iam_policy_document.assume_backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.backup](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [additional\_tags](#input\_additional\_tags) | User-Defined tags | `map(string)` | `{}` | no |
| [allowed\_cidrs](#input\_allowed\_cidrs) | List of CIDRs permitted to access EFS mounts | `list(string)` | `[]` | no |
| [allowed\_security\_groups](#input\_allowed\_security\_groups) | List of Security Group IDs permitted to access EFS mounts | `list(string)` | `[]` | no |
| [backup\_kms\_key\_id](#input\_backup\_kms\_key\_id) | KMS Key to use for backups (Specify `aws/backup` to use the default key, leave null to have a key generated automatically) | `string` | `null` | no |
| [backup\_lifecycle\_cold\_storage\_after](#input\_backup\_lifecycle\_cold\_storage\_after) | Specifies the number of days after creation that a recovery point is moved to cold storage. | `number` | `null` | no |
| [backup\_lifecycle\_delete\_after](#input\_backup\_lifecycle\_delete\_after) | Specifies the number of days after creation that a recovery point is deleted. Must be 90 days greater than cold\_storage\_after. | `number` | `null` | no |
| [backup\_role\_permissions\_boundary](#input\_backup\_role\_permissions\_boundary) | An optional IAM permissions boundary to use when creating the IAM role for backups | `string` | `null` | no |
| [backup\_schedule](#input\_backup\_schedule) | Cron schedule to run backups on | `string` | `"cron(0 0 * * ? *)"` | no |
| [create](#input\_create) | If `false`, this module does nothing | `bool` | `true` | no |
| [efs\_kms\_key\_id](#input\_efs\_kms\_key\_id) | ARN of KMS key to use for EFS encryption (leave null to create a key, set to `aws/backup` to use AWS default CMK) | `string` | `null` | no |
| [enable\_backups](#input\_enable\_backups) | Should AWS Backup be configured for this file system? | `bool` | `true` | no |
| [name](#input\_name) | Moniker to apply/prefix to all resources in the module (required if `create==true`) | `string` | `null` | no |
| [performance\_mode](#input\_performance\_mode) | Performance mode to run in (`generalPurpose` or `maxIO`). See https://aws.amazon.com/premiumsupport/knowledge-center/linux-efs-performance-modes/ for details. | `string` | `"generalPurpose"` | no |
| [provisioned\_throughput](#input\_provisioned\_throughput) | Provisioned throughput (in mbps) | `number` | `null` | no |
| [subnets](#input\_subnets) | Subnet IDs that the EFS mount points should be created on (required if `create==true`) | `list(string)` | `[]` | no |
| [throughput\_mode](#input\_throughput\_mode) | EFS file system throughput mode (`provisioned` or `bursting`) | `string` | `"bursting"` | no |
| [vpc\_id](#input\_vpc\_id) | VPC to create EFS file system in (required if `create==true`) | `string` | `null` | no |

## Outputs

| Name | Description |
|------|-------------|
| [efs\_backup\_iam\_role](#output\_efs\_backup\_iam\_role) | Name of the IAM Role created to run AWS Backup |
| [efs\_file\_system\_id](#output\_efs\_file\_system\_id) | EFS File System ID |