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

Add resource manager tags to GKE autopilot #10123

Conversation

maxi-cit
Copy link
Contributor

@maxi-cit maxi-cit commented Mar 5, 2024

Adds support for Resource Manager Tags for Autopilot GKE cluster resource

Part of: hashicorp/terraform-provider-google#16614

Release Note Template for Downstream PRs (will be copied)

container: added `node_pool_auto_config.resource_manager_tags` field to `google_container_cluster` resource

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccContainerCluster_withAutopilotResourceManagerTags[Debug log]

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@maxi-cit
Copy link
Contributor Author

Hello @SarahFrench could u tell me if there is something missing to merge this PR?

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

This PR looks good given the tests for the new field. There's a small refactor that we'd need before merging, to make sure the new test doesn't impact other acceptance tests.

@github-actions github-actions bot requested a review from SarahFrench March 26, 2024 21:55
@maxi-cit
Copy link
Contributor Author

Hello @SarahFrench, I updated the PR considering your suggestions, could you run the tests again please?

Copy link
Contributor

@SarahFrench SarahFrench left a comment

Choose a reason for hiding this comment

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

Thanks for doing the refactoring I suggested- I noticed some problems with use of the new _iam_membership resources and I left some comments. Those comments may need to be applied in other places where those resources are used.

Comment on lines +9804 to +9806
members = [
"serviceAccount:service-${data.google_project.project.number}@container-engine-robot.iam.gserviceaccount.com",
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
members = [
"serviceAccount:service-${data.google_project.project.number}@container-engine-robot.iam.gserviceaccount.com",
]
member = "serviceAccount:service-${data.google_project.project.number}@container-engine-robot.iam.gserviceaccount.com"

IAM membership resources manage only one membership in a binding, so cannot take a list as an argument here.

]
}

resource "google_project_iam_member" "tagUser" {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm afraid there'll need to be two membership resources used here to replace the original binding resource; _iam_membership resources only take a singular member argument

@maxi-cit
Copy link
Contributor Author

Hello @SarahFrench can I just roll back to google_project_iam_binding? I ve got the strong feeling I will mess up with the replaying mode.
Besides I already got a similar PR merged using iam binding resource
Check this

@SarahFrench
Copy link
Contributor

Ok, roll back and I can update your PR to use _iam_member resources after it's merged. Even though you got a previous PR accepted while using _iam_binding resources that doesn't mean that it's ideal. Once your new test joins our full test suite it will have the potential to conflict with other tests that also try to create bindings for that role at the project level. This type of conflict is what the _iam_member resources are designed to avoid.

This reverts commit 55ebc03.

undo non-authoritative refactor
@github-actions github-actions bot requested a review from SarahFrench March 27, 2024 14:31
@maxi-cit
Copy link
Contributor Author

Hello @SarahFrench, thanks for the feedback. I reverted the changes to the commit where tests were passing.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 4 files changed, 501 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 4 files changed, 501 insertions(+), 2 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 187
Passed tests: 175
Skipped tests: 12
Affected tests: 0

Click here to see the affected service packages
  • container

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@SarahFrench SarahFrench merged commit bfba12e into GoogleCloudPlatform:main Mar 28, 2024
10 of 11 checks passed
pjotrekk pushed a commit to pjotrekk/magic-modules that referenced this pull request Apr 2, 2024
cmfeng pushed a commit to cmfeng/cmfeng-magic-modules that referenced this pull request Apr 5, 2024
hao-nan-li pushed a commit to hao-nan-li/magic-modules that referenced this pull request Apr 9, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request Apr 19, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants