Skip to content
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

Support resources with top-level Id property that isn't the primaryIdentifier #1501

Merged
merged 23 commits into from
Apr 2, 2024

Conversation

ewbankkit
Copy link
Contributor

@ewbankkit ewbankkit commented Apr 2, 2024

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Adds support for resources with a top-level Id property that isn't the primaryIdentifier. Previously such resources were suppressed as the Id property is mapped to the Terraform id attribute which is used in Cloud Control API operations to uniquely identify the resource.

If the resource has a top-level Id property then it is now mapped to a top-level Terraform attribute <type>_id (e.g. flow_log_id) and an id attribute is always injected. The value of the id attribute is the resource's primary identifier.
This has the pleasant side-effect of fixing a bug affecting resources that have a top-level Id property and that property is one part of a multi-part primary identifier (e.g. awscc_wafv2_regex_pattern_set).

Closes #125.
Closes #1471.
Closes #1259.
Closes #1065.
Closes #1000.
Closes #999.
Closes #688.
Closes #753.

ewbankkit added 23 commits April 1, 2024 12:21
% TF_LOG=ERROR make testacc PKG_NAME=internal/aws/ec2 TESTARGS='-run=TestAccAWSEC2EgressOnlyInternetGateway_success'
TF_ACC=1 go test ./internal/aws/ec2 -v -count 1 -parallel 20 -run=TestAccAWSEC2EgressOnlyInternetGateway_success -timeout 180m
=== RUN   TestAccAWSEC2EgressOnlyInternetGateway_success
=== PAUSE TestAccAWSEC2EgressOnlyInternetGateway_success
=== CONT  TestAccAWSEC2EgressOnlyInternetGateway_success
--- PASS: TestAccAWSEC2EgressOnlyInternetGateway_success (56.53s)
PASS
ok  	github.com/hashicorp/terraform-provider-awscc/internal/aws/ec2	58.092s
@ewbankkit ewbankkit marked this pull request as ready for review April 2, 2024 17:48
@ewbankkit ewbankkit merged commit e0478bf into main Apr 2, 2024
6 checks passed
@ewbankkit ewbankkit deleted the b-composited-primary-identifier branch April 2, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment