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

[TechDebt]: provider/tags: allow generator to override aws service package #31742

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

jar-b
Copy link
Member

@jar-b jar-b commented Jun 2, 2023

Description

Adds an optional -AWSSDKServicePackage argument to the tags generator, allowing the AWS Go SDK package to be overridden. Specifically, this will support tagging in the chime service package by allowing the tagging functions to use the chimesdkvoice AWS SDK package which has proper tagging support unavailable in the legacy chime namespace.

This PR will enable supporting tags for existing chime resources once merged.

Relations

Relates #27432

References

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

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 documentation Introduces or discusses updates to documentation. generators Relates to code generators. service/chime Issues and PRs that pertain to the chime service. tags Pertains to resource tagging. size/L Managed by automation to categorize the size of a PR. labels Jun 2, 2023
Copy link
Member

@YakDriver YakDriver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple notes

@@ -24,6 +24,7 @@ Some flags control generation a certain section of code, such as whether the gen
| --- | --- | --- | --- |
| `GetTag` | | Whether to generate GetTag | `-GetTag` |
| `ListTags` | | Whether to generate ListTags | `-ListTags` |
| `ServicePackage` | | AWS Go SDK package to use. Defaults to the provider service package name. | `-ServicePackage=chimesdkvoice` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `ServicePackage` | | AWS Go SDK package to use. Defaults to the provider service package name. | `-ServicePackage=chimesdkvoice` |
| `TagServicePackage` | | AWS Go SDK package to use. Defaults to the provider service package name. | `-TagServicePackage=chimesdkvoice` |

Maybe? Seems like this will go away eventually and might be easier to extricate with this name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or AWSSDKServicePackage to match AWSSDKVersion?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to AWSSDKServicePackage and changed the logic around so the InternalServicePackage field is no longer necessary. If we opt to back this out later it should only requiring removing the flag and reverting a couple function calls to use the servicePackage variable again.

@@ -123,6 +124,7 @@ type TemplateData struct {
AWSService string
AWSServiceIfacePackage string
ClientType string
InternalServicePackage string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
InternalServicePackage string
TagServicePackage string

Similar to above

@github-actions github-actions bot removed the documentation Introduces or discusses updates to documentation. label Jun 2, 2023
@jar-b jar-b merged commit ff69dbc into main Jun 2, 2023
@jar-b jar-b deleted the td-override-tags-gen-aws-package branch June 2, 2023 19:30
@github-actions github-actions bot added this to the v5.2.0 milestone Jun 2, 2023
@github-actions
Copy link

github-actions bot commented Jun 9, 2023

This functionality has been released in v5.2.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
generators Relates to code generators. service/chime Issues and PRs that pertain to the chime service. size/L Managed by automation to categorize the size of a PR. tags Pertains to resource tagging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants