-
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
d/aws_vpc: allow for multiple cidr blocks #5098
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 with one small adjustment on merge, thanks @kl4w! 🚀
=== RUN TestAccDataSourceAwsVpc_basic
--- PASS: TestAccDataSourceAwsVpc_basic (29.87s)
=== RUN TestAccDataSourceAwsVpc_multipleCidr
--- PASS: TestAccDataSourceAwsVpc_multipleCidr (43.53s)
} | ||
cidrAssociations = append(cidrAssociations, association) | ||
} | ||
d.Set("cidr_block_associations", cidrAssociations) |
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.
When using d.Set()
with aggregate types (TypeList, TypeSet, TypeMap), we should perform error checking to prevent issues where the code is not properly able to set the Terraform state. e.g.
if err := d.Set("cidr_block_associations", cidrAssociations); err != nil {
return fmt.Errorf("error setting cidr_block_associations: %s", err)
}
Luckily this was working just fine before so will adjust this on merge. 👍
This has been released in version 1.27.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Fixes #5042
Changes proposed in this pull request:
Output from acceptance testing: