-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rd/efs_file_system - support multiple lifecycle policies #20971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
Commercial
% make testacc TESTARGS='-run=TestAccAWSEFSFileSystem_\|TestAccDataSourceAwsEfsFileSystem_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSFileSystem_\|TestAccDataSourceAwsEfsFileSystem_ -timeout 180m
=== RUN TestAccDataSourceAwsEfsFileSystem_id
=== PAUSE TestAccDataSourceAwsEfsFileSystem_id
=== RUN TestAccDataSourceAwsEfsFileSystem_tags
=== PAUSE TestAccDataSourceAwsEfsFileSystem_tags
=== RUN TestAccDataSourceAwsEfsFileSystem_name
=== PAUSE TestAccDataSourceAwsEfsFileSystem_name
=== RUN TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== PAUSE TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== RUN TestAccDataSourceAwsEfsFileSystem_NonExistent
=== PAUSE TestAccDataSourceAwsEfsFileSystem_NonExistent
=== RUN TestAccAWSEFSFileSystem_basic
=== PAUSE TestAccAWSEFSFileSystem_basic
=== RUN TestAccAWSEFSFileSystem_availabilityZoneName
=== PAUSE TestAccAWSEFSFileSystem_availabilityZoneName
=== RUN TestAccAWSEFSFileSystem_tags
=== PAUSE TestAccAWSEFSFileSystem_tags
=== RUN TestAccAWSEFSFileSystem_pagedTags
=== PAUSE TestAccAWSEFSFileSystem_pagedTags
=== RUN TestAccAWSEFSFileSystem_kmsKey
=== PAUSE TestAccAWSEFSFileSystem_kmsKey
=== RUN TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== PAUSE TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== RUN TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== PAUSE TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== RUN TestAccAWSEFSFileSystem_ThroughputMode
=== PAUSE TestAccAWSEFSFileSystem_ThroughputMode
=== RUN TestAccAWSEFSFileSystem_lifecyclePolicy
=== PAUSE TestAccAWSEFSFileSystem_lifecyclePolicy
=== RUN TestAccAWSEFSFileSystem_disappears
=== PAUSE TestAccAWSEFSFileSystem_disappears
=== CONT TestAccDataSourceAwsEfsFileSystem_id
=== CONT TestAccAWSEFSFileSystem_pagedTags
=== CONT TestAccAWSEFSFileSystem_disappears
=== CONT TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== CONT TestAccAWSEFSFileSystem_lifecyclePolicy
=== CONT TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== CONT TestAccDataSourceAwsEfsFileSystem_NonExistent
=== CONT TestAccAWSEFSFileSystem_tags
=== CONT TestAccAWSEFSFileSystem_ThroughputMode
=== CONT TestAccAWSEFSFileSystem_availabilityZoneName
=== CONT TestAccDataSourceAwsEfsFileSystem_name
=== CONT TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== CONT TestAccAWSEFSFileSystem_basic
=== CONT TestAccDataSourceAwsEfsFileSystem_tags
=== CONT TestAccAWSEFSFileSystem_kmsKey
--- PASS: TestAccDataSourceAwsEfsFileSystem_NonExistent (7.69s)
--- PASS: TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption (16.91s)
--- PASS: TestAccAWSEFSFileSystem_availabilityZoneName (74.55s)
--- PASS: TestAccAWSEFSFileSystem_disappears (83.18s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_availabilityZone (84.93s)
--- PASS: TestAccAWSEFSFileSystem_pagedTags (85.88s)
--- PASS: TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps (88.93s)
--- PASS: TestAccAWSEFSFileSystem_kmsKey (95.83s)
--- PASS: TestAccAWSEFSFileSystem_ThroughputMode (101.90s)
--- PASS: TestAccAWSEFSFileSystem_basic (113.70s)
--- PASS: TestAccAWSEFSFileSystem_tags (116.50s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_tags (134.58s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_id (144.75s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_name (171.23s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy (190.57s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 193.866s
GovCloud
% make testacc TESTARGS='-run=TestAccAWSEFSFileSystem_\|TestAccDataSourceAwsEfsFileSystem_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSFileSystem_\|TestAccDataSourceAwsEfsFileSystem_ -timeout 180m
=== RUN TestAccDataSourceAwsEfsFileSystem_id
=== PAUSE TestAccDataSourceAwsEfsFileSystem_id
=== RUN TestAccDataSourceAwsEfsFileSystem_tags
=== PAUSE TestAccDataSourceAwsEfsFileSystem_tags
=== RUN TestAccDataSourceAwsEfsFileSystem_name
=== PAUSE TestAccDataSourceAwsEfsFileSystem_name
=== RUN TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== PAUSE TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== RUN TestAccDataSourceAwsEfsFileSystem_NonExistent
=== PAUSE TestAccDataSourceAwsEfsFileSystem_NonExistent
=== RUN TestAccAWSEFSFileSystem_basic
=== PAUSE TestAccAWSEFSFileSystem_basic
=== RUN TestAccAWSEFSFileSystem_availabilityZoneName
=== PAUSE TestAccAWSEFSFileSystem_availabilityZoneName
=== RUN TestAccAWSEFSFileSystem_tags
=== PAUSE TestAccAWSEFSFileSystem_tags
=== RUN TestAccAWSEFSFileSystem_pagedTags
=== PAUSE TestAccAWSEFSFileSystem_pagedTags
=== RUN TestAccAWSEFSFileSystem_kmsKey
=== PAUSE TestAccAWSEFSFileSystem_kmsKey
=== RUN TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== PAUSE TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== RUN TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== PAUSE TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== RUN TestAccAWSEFSFileSystem_ThroughputMode
=== PAUSE TestAccAWSEFSFileSystem_ThroughputMode
=== RUN TestAccAWSEFSFileSystem_lifecyclePolicy
=== PAUSE TestAccAWSEFSFileSystem_lifecyclePolicy
=== RUN TestAccAWSEFSFileSystem_disappears
=== PAUSE TestAccAWSEFSFileSystem_disappears
=== CONT TestAccDataSourceAwsEfsFileSystem_id
=== CONT TestAccAWSEFSFileSystem_pagedTags
=== CONT TestAccAWSEFSFileSystem_ThroughputMode
=== CONT TestAccDataSourceAwsEfsFileSystem_tags
=== CONT TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps
=== CONT TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption
=== CONT TestAccAWSEFSFileSystem_disappears
=== CONT TestAccAWSEFSFileSystem_kmsKey
=== CONT TestAccAWSEFSFileSystem_availabilityZoneName
=== CONT TestAccAWSEFSFileSystem_basic
=== CONT TestAccAWSEFSFileSystem_tags
=== CONT TestAccDataSourceAwsEfsFileSystem_name
=== CONT TestAccAWSEFSFileSystem_lifecyclePolicy
=== CONT TestAccDataSourceAwsEfsFileSystem_availabilityZone
=== CONT TestAccDataSourceAwsEfsFileSystem_NonExistent
--- PASS: TestAccDataSourceAwsEfsFileSystem_NonExistent (7.79s)
--- PASS: TestAccAWSEFSFileSystem_kmsConfigurationWithoutEncryption (18.10s)
--- PASS: TestAccAWSEFSFileSystem_availabilityZoneName (36.93s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_name (68.23s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_tags (75.33s)
--- PASS: TestAccAWSEFSFileSystem_kmsKey (84.00s)
--- PASS: TestAccAWSEFSFileSystem_disappears (103.36s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_availabilityZone (111.73s)
--- PASS: TestAccAWSEFSFileSystem_basic (115.45s)
--- PASS: TestAccAWSEFSFileSystem_ProvisionedThroughputInMibps (115.76s)
--- PASS: TestAccAWSEFSFileSystem_tags (124.86s)
--- PASS: TestAccAWSEFSFileSystem_pagedTags (144.91s)
--- PASS: TestAccDataSourceAwsEfsFileSystem_id (146.73s)
--- PASS: TestAccAWSEFSFileSystem_lifecyclePolicy (151.48s)
--- PASS: TestAccAWSEFSFileSystem_ThroughputMode (169.18s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 172.408s
@DrFaust92 Thanks for the contribution 🎉 👏. |
This functionality has been released in v3.60.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
This functionality appears to be broken in AWS provider 4.17.1 using Terraform 1.2.2. The functionality to put two lifecycle_policy no longer works. lifecycle_policy { Once again you can no longer provide multiple arguments to the aws_efs_file_system resource. (See the old error again) { Note: This works correctly with the just one item defined. Either transition_to_ia or transition_to_primary_storage_class. It doesn't work when both are selected. |
Have gotten this error as well
**Error: error creating EFS file system (REDACTED) lifecycle configuration: BadRequest: One or more LifecyclePolicy objects specified are malformed. { RespMetadata: { StatusCode: 400, RequestID: "REDACTED" }, ErrorCode: "BadRequest", Message: "One or more LifecyclePolicy objects specified are malformed." } terraform --version Initializing provider plugins...
|
This appears to actually have been fixed in the newer version. I've provided an example of code style that worked for me. resource "aws_efs_file_system" "resource-name" { tags = { lifecycle_policy { lifecycle_policy { |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #20953
Output from acceptance testing: