Skip to content

iam_policy: add primary_resource_name field #22769

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

Closed
BBBmau opened this issue May 13, 2025 · 2 comments
Closed

iam_policy: add primary_resource_name field #22769

BBBmau opened this issue May 13, 2025 · 2 comments

Comments

@BBBmau
Copy link
Collaborator

BBBmau commented May 13, 2025

What kind of contribution is this issue about?

MMv1-based resource

Details

There was some confusion on how the tests are generated in this PR.

The generation was not including primary_resource_name due to no examples having the field set in the first place.

I'm not sure what's the reasoning for utilizing a name that's set in examples but it seems to make sense to include a field nested in iam_policy that is meant to be used for iam_policy_generated_tests

The change in the tmpl file would be here:

ImportStateId:     fmt.Sprintf("{{ $.IamImportFormat }} {{ $.IamPolicy.AllowedIamRole }}", {{ if ne $.IamImportQualifiersForTest "" }}{{ $.IamImportQualifiersForTest }}, {{ end }}{{ $IamPolicy.PrimaryResourceName }}),

References

No response

@ramonvermeulen
Copy link

Thanks for raising the issue! Another improvement would be to have some documentation described on this attribute in the examples spec (in case it will not be moved to the iam_policy).

@BBBmau
Copy link
Collaborator Author

BBBmau commented May 27, 2025

Duplicate of #8712

@BBBmau BBBmau marked this as a duplicate of #8712 May 27, 2025
@BBBmau BBBmau closed this as completed May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants