From 61399fa6509504b4cd7017e9f9ddbf693b8ddfd7 Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Tue, 11 Feb 2020 00:34:21 +0000 Subject: [PATCH] =?UTF-8?q?Remove=20`ExactlyOneOf`=20restriction=20for=20`?= =?UTF-8?q?auto=5Fprovisioning=5Fdefaul=E2=80=A6=20(#3106)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Modular Magician --- .changelog/3106.txt | 3 +++ google-beta/resource_container_cluster.go | 8 -------- website/docs/r/container_cluster.html.markdown | 2 -- 3 files changed, 3 insertions(+), 10 deletions(-) create mode 100644 .changelog/3106.txt diff --git a/.changelog/3106.txt b/.changelog/3106.txt new file mode 100644 index 0000000000..88b62f189a --- /dev/null +++ b/.changelog/3106.txt @@ -0,0 +1,3 @@ +```release-note:bug +container: Removed restriction on `auto_provisioning_defaults` to allow both `oauth_scopes` and `service_account` to be set +``` diff --git a/google-beta/resource_container_cluster.go b/google-beta/resource_container_cluster.go index 9bdbabdd5c..3a5ee42da1 100644 --- a/google-beta/resource_container_cluster.go +++ b/google-beta/resource_container_cluster.go @@ -328,19 +328,11 @@ func resourceContainerCluster() *schema.Resource { Computed: true, Elem: &schema.Schema{Type: schema.TypeString}, DiffSuppressFunc: containerClusterAddedScopesSuppress, - ExactlyOneOf: []string{ - "cluster_autoscaling.0.auto_provisioning_defaults.0.oauth_scopes", - "cluster_autoscaling.0.auto_provisioning_defaults.0.service_account", - }, }, "service_account": { Type: schema.TypeString, Optional: true, Default: "default", - ExactlyOneOf: []string{ - "cluster_autoscaling.0.auto_provisioning_defaults.0.oauth_scopes", - "cluster_autoscaling.0.auto_provisioning_defaults.0.service_account", - }, }, }, }, diff --git a/website/docs/r/container_cluster.html.markdown b/website/docs/r/container_cluster.html.markdown index c02af07416..7b8e3c16e8 100644 --- a/website/docs/r/container_cluster.html.markdown +++ b/website/docs/r/container_cluster.html.markdown @@ -378,12 +378,10 @@ for a list of types. The `auto_provisioning_defaults` block supports: * `oauth_scopes` - (Optional) Scopes that are used by NAP when creating node pools. -If `oauth_scopes` are specified, `service_account` must be empty. -> `monitoring.write` is always enabled regardless of user input. `monitoring` and `logging.write` may also be enabled depending on the values for `monitoring_service` and `logging_service`. * `service_account` - (Optional) The Google Cloud Platform Service Account to be used by the node VMs. -If `service_account` is specified, `oauth_scopes` must be empty. The `authenticator_groups_config` block supports: