In this scenario, the lifecycle of Amazon EFS Access Point(s) is owned by the application team. It creates EFS access point(s) on an existing EFS (identified via efs_id
) created by the centralized team.
- Terraform backend provider and state locking providers are identified and bootstrapped.
- A bootstrap module/example is provided that provision Amazon S3 for Terraform state storage and Amazon DynamoDB for Terraform state locking.
- The target VPC along with the target Subnets exist and are identified via Tags.
- A vpc example is provided that provisions VPC, Subnets and related resources with example tagging.
- The example uses the following tags to identify the target VPC and Subnets.
"efs/scenario" = "1" "Env" = "DEV"
- EFS file system exist and identified via
efs_id
- EFS mount points exist in the VPC Subnets.
- EFS Security Group exist.
- The required EFS access point does not exist.
- EFS access point is created.
- Standardized EFS resource policy is updated.
The scenario2 must be executed before executing this scenario.
Note: Do not use terraform destroy
to remove EFS access point(s) from shared EFS, as this will remove the EFS resource policy. Use efs_access_point_specs
variable to remove any unwanted access point(s).
- cd to
examples/efs/scenario2
folder. - Modify the
backend "S3"
section inprovider.tf
with correct values forregion
,bucket
,dynamodb_table
, andkey
.- Use provided values as guidance.
- Modify
terraform.tfvars
to your requirements.- Use provided values as guidance.
- e.g. use efs_id from scenario2
- Make sure you are using the correct AWS Profile that has permission to provision the target resources.
aws sts get-caller-identity
- Execute
terraform init
to initialize Terraform. - Execute
terraform plan
and verify the changes. - Execute
terraform apply
and approve the changes to provision the resources.
Name | Version |
---|---|
terraform | >= v1.1.9 |
aws | >= 4.13.0 |
No providers.
Name | Source | Version |
---|---|---|
shared_efs | ../../../modules/aws/efs | n/a |
No resources.
Name | Description | Type | Default | Required |
---|---|---|---|---|
env_name | Environment name e.g. dev, prod | string |
n/a | yes |
project | Project name (prefix/suffix) to be used on all the resources identification | string |
n/a | yes |
region | The AWS Region e.g. us-east-1 for the environment | string |
n/a | yes |
tags | Common and mandatory tags for the resources | map(string) |
n/a | yes |
efs_access_point_specs | List of EFS Access Point Specs to be created. It can be an empty list. | list(object({ |
[] |
no |
efs_id | EFS File System Id, if not provided, a new EFS will be created | string |
null |
no |
Name | Description |
---|---|
efs | Elastic File System info |
efs_ap | Elastic File System Access Points |