aws_efs_file_system lifecycle_policy fails with more than one argument #20953
Labels
bug
Addresses a defect in current functionality.
service/efs
Issues and PRs that pertain to the efs service.
Milestone
Community Note
Terraform CLI and Terraform AWS Provider Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Following documentation https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/efs_file_system#lifecycle-policy-arguments I would like to implement the default intelligent tiering lifecycle policy described at https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html.
I would expect one of the attempted (commented out)
lifecycle_policy
block implementations shown above to set bothtransition_to_primary_storage_class
andtransition_to_ia
lifecycle transition policies.Actual Behavior
The first example using a variable map results in what appears to be a Terraform syntax error. I believe this may simply be a limitation of being unable to specify a variable on the left hand side key, or a misunderstanding on my part? If this is a mistake on my part then guidance would be appreciated. This is the preferred implementation if it is possible to make work.
Results in the following error:
Specifying both transitions in the
lifecycle_policy {}
block at once like this:Results in the following error:
Finally trying to define two
lifecycle_policy {}
blocks:Results in the following error:
Steps to Reproduce
terraform apply
Important Factoids
Specifying a single
lifecycle_policy {}
block with only one of the transitions in it at a time works as expected. (Both appear to be valid and work as expected when used on their own).I have been able to set both these lifecycle policy transitions from the AWS EFS web console interface without any difficulty. Terraform is able to see that more than one lifecycle policy is set after I enable both transitions in the web console. See the
terraform apply
output showing both transitions being removed when I comment out thelifecycle_policy {}
blocks in my example code:References
The text was updated successfully, but these errors were encountered: