Skip to content

[WIP] Consistent Resource Id Separators for resources #27885

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

Open
wants to merge 55 commits into
base: main
Choose a base branch
from

Conversation

brittandeyoung
Copy link
Collaborator

Description

This will implement a standard Id separator for use when writing resources that AWS does not provide a unique id for. Helper functions for this standard Id separator will be included as well to make working with the standard Id simple.

Relations

Closes #27843

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccXXX PKG=ec2

...

* Add a uniform `ResourceIdSeparator` constant
* Add a ExpandResourceId and FlattenResourceId function
@github-actions
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/lightsail Issues and PRs that pertain to the lightsail service. labels Nov 18, 2022
@brittandeyoung
Copy link
Collaborator Author

This is Currently a work in progress, I am looking for feedback from the provider team on the structure of the shared separator logic before updating all the resources in scope.

@brittandeyoung
Copy link
Collaborator Author

Test outputs for the included example resources after the update:

 make testacc TESTARGS='-run=TestAccLightsailDomainEntry' PKG=lightsail
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lightsail/... -v -count 1 -parallel 20  -run=TestAccLightsailDomainEntry -timeout 180m
=== RUN   TestAccLightsailDomainEntry_basic
=== PAUSE TestAccLightsailDomainEntry_basic
=== RUN   TestAccLightsailDomainEntry_disappears
=== PAUSE TestAccLightsailDomainEntry_disappears
=== CONT  TestAccLightsailDomainEntry_basic
=== CONT  TestAccLightsailDomainEntry_disappears
--- PASS: TestAccLightsailDomainEntry_disappears (32.18s)
--- PASS: TestAccLightsailDomainEntry_basic (33.09s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/lightsail  35.113s
make testacc TESTARGS='-run=TestAccBudgets' PKG=budgets
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/budgets/... -v -count 1 -parallel 20  -run=TestAccBudgets -timeout 180m
=== RUN   TestAccBudgetsBudgetAction_basic
=== PAUSE TestAccBudgetsBudgetAction_basic
=== RUN   TestAccBudgetsBudgetAction_disappears
=== PAUSE TestAccBudgetsBudgetAction_disappears
=== RUN   TestAccBudgetsBudget_basic
=== PAUSE TestAccBudgetsBudget_basic
=== RUN   TestAccBudgetsBudget_Name_generated
=== PAUSE TestAccBudgetsBudget_Name_generated
=== RUN   TestAccBudgetsBudget_namePrefix
=== PAUSE TestAccBudgetsBudget_namePrefix
=== RUN   TestAccBudgetsBudget_disappears
=== PAUSE TestAccBudgetsBudget_disappears
=== RUN   TestAccBudgetsBudget_autoAdjustDataForecast
=== PAUSE TestAccBudgetsBudget_autoAdjustDataForecast
=== RUN   TestAccBudgetsBudget_autoAdjustDataHistorical
=== PAUSE TestAccBudgetsBudget_autoAdjustDataHistorical
=== RUN   TestAccBudgetsBudget_costTypes
=== PAUSE TestAccBudgetsBudget_costTypes
=== RUN   TestAccBudgetsBudget_notifications
=== PAUSE TestAccBudgetsBudget_notifications
=== RUN   TestAccBudgetsBudget_plannedLimits
=== PAUSE TestAccBudgetsBudget_plannedLimits
=== CONT  TestAccBudgetsBudgetAction_basic
=== CONT  TestAccBudgetsBudget_autoAdjustDataForecast
=== CONT  TestAccBudgetsBudget_Name_generated
=== CONT  TestAccBudgetsBudget_disappears
=== CONT  TestAccBudgetsBudget_costTypes
=== CONT  TestAccBudgetsBudgetAction_disappears
=== CONT  TestAccBudgetsBudget_autoAdjustDataHistorical
=== CONT  TestAccBudgetsBudget_notifications
=== CONT  TestAccBudgetsBudget_plannedLimits
=== CONT  TestAccBudgetsBudget_namePrefix
=== CONT  TestAccBudgetsBudget_basic
--- PASS: TestAccBudgetsBudget_disappears (24.39s)
--- PASS: TestAccBudgetsBudget_namePrefix (24.63s)
--- PASS: TestAccBudgetsBudget_basic (25.39s)
--- PASS: TestAccBudgetsBudget_autoAdjustDataForecast (26.77s)
--- PASS: TestAccBudgetsBudget_Name_generated (27.30s)
--- PASS: TestAccBudgetsBudgetAction_basic (36.60s)
--- PASS: TestAccBudgetsBudget_costTypes (37.15s)
--- PASS: TestAccBudgetsBudget_autoAdjustDataHistorical (37.89s)
--- PASS: TestAccBudgetsBudget_notifications (41.79s)
--- PASS: TestAccBudgetsBudget_plannedLimits (42.70s)
--- PASS: TestAccBudgetsBudgetAction_disappears (73.94s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/budgets    75.976s

@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. service/budgets Issues and PRs that pertain to the budgets service. and removed size/XS Managed by automation to categorize the size of a PR. labels Nov 18, 2022
@breathingdust breathingdust added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 24, 2022
@github-actions github-actions bot added create Pertains to generating names, hashcodes, etc. flex Pertains to FLatteners and EXpanders. size/M Managed by automation to categorize the size of a PR. and removed size/S Managed by automation to categorize the size of a PR. labels Dec 2, 2022
@YakDriver YakDriver self-assigned this Feb 6, 2023
@github-actions github-actions bot removed flex Pertains to FLatteners and EXpanders. create Pertains to generating names, hashcodes, etc. labels Apr 14, 2023
@github-actions github-actions bot added the service/appconfig Issues and PRs that pertain to the appconfig service. label Apr 14, 2023
@github-actions github-actions bot added service/appsync Issues and PRs that pertain to the appsync service. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. labels Apr 14, 2023
@github-actions github-actions bot added flex Pertains to FLatteners and EXpanders. service/configservice Issues and PRs that pertain to the configservice service. service/dataexchange Issues and PRs that pertain to the dataexchange service. service/deploy Issues and PRs that pertain to the deploy service. service/dynamodb Issues and PRs that pertain to the dynamodb service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Apr 18, 2023
@breathingdust breathingdust added the external-maintainer Contribution from a trusted external contributor. label Jul 25, 2023
@YakDriver YakDriver removed their assignment Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. flex Pertains to FLatteners and EXpanders. service/appconfig Issues and PRs that pertain to the appconfig service. service/appsync Issues and PRs that pertain to the appsync service. service/budgets Issues and PRs that pertain to the budgets service. service/cognitoidp Issues and PRs that pertain to the cognitoidp service. service/configservice Issues and PRs that pertain to the configservice service. service/dataexchange Issues and PRs that pertain to the dataexchange service. service/deploy Issues and PRs that pertain to the deploy service. service/dynamodb Issues and PRs that pertain to the dynamodb service. service/ec2outposts Issues and PRs that pertain to the ec2outposts service. service/ipam Issues and PRs that pertain to the ipam service. service/lightsail Issues and PRs that pertain to the lightsail service. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use consistent ID separators for resource imports
3 participants