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 fleet field to google_container_cluster resource #16466

Conversation

modular-magician
Copy link
Collaborator

Changes in this PR:

  • Support fleet field in google_container_cluster resource. Example usage:

    • Set fleet config eg.fleet {project = "my-project"}.
    • Remove fleet config by removing the fleet block.
  • Add DiffSuppressFunc for fleet field when fleet.pre_registered = true:

    • Today Fleet config could be generated by server (and fleet.pre-registered will be true in this case). Suppress diff for this case.
  • Mark binary_authorization.evaluation_mode field as computed:

    • When creating the cluster resource with fleet config, container API server will populate value for binary_authorization.evaluation_mode. So we need to mark this field as computed.

Release Note Template for Downstream PRs (will be copied)

container: added `fleet` field to `google_container_cluster` resource
container: marked `binary_authorization.evaluation_mode` field as computed and optional in `google_container_cluster` resource

Derived from GoogleCloudPlatform/magic-modules#9385

* Add fleet field in resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* Update resource_container_cluster.go.erb

* mark evaluation_mode as computed.

* Update resource_container_cluster_test.go.erb

* Update resource_container_cluster_test.go.erb

* update documentation for fleet field

* fixed fleet documentation

* fixed fleet unit test

* fixed fleet unit test

* fixed fleet unit test - add a mutation test

* fixed expected error for fleet mutation

* fixed fleet mutation unit test
[upstream:38a2a08f6c5741200fb81bc9dfe21fee95771e3b]

Signed-off-by: Modular Magician <magic-modules@google.com>
@modular-magician modular-magician merged commit 52408de into hashicorp:main Nov 7, 2023
2 checks passed
Copy link

github-actions bot commented Dec 8, 2023

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 Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant