From 5e43461357fab08dd0f622fc2dde054919c94f4d Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Wed, 28 Apr 2021 16:33:30 +0000 Subject: [PATCH] master_ipv4_cidr_block should be in line with documentation (#4732) * master_ipv4_cidr_block should be in line with documentation As per https://cloud.google.com/composer/docs/reference/rest/v1beta1/projects.locations.environments#PrivateClusterConfig masterIpv4CidrBlock is Optional. The CIDR block from which IPv4 range for GKE master will be reserved. If left blank, the default value of '172.16.0.0/23' is used. Suggesting change default value to be in line with docs or remove it so it's assigned/computed by API. * Update resource_composer_environment.go.erb * Update resource_composer_environment.go.erb * Update resource_composer_environment.go.erb * Update composer_environment.html.markdown * fix tabs * fix tabs * align tf documentation with google cloud documentation Signed-off-by: Modular Magician --- .changelog/4732.txt | 3 +++ google/resource_composer_environment.go | 2 +- website/docs/r/composer_environment.html.markdown | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changelog/4732.txt diff --git a/.changelog/4732.txt b/.changelog/4732.txt new file mode 100644 index 00000000000..39444500328 --- /dev/null +++ b/.changelog/4732.txt @@ -0,0 +1,3 @@ +```release-note:bug +composer: changed master_ipv4_cidr_block to draw default from the API +``` diff --git a/google/resource_composer_environment.go b/google/resource_composer_environment.go index 55f90f1115b..fa00add3fe3 100644 --- a/google/resource_composer_environment.go +++ b/google/resource_composer_environment.go @@ -313,6 +313,7 @@ func resourceComposerEnvironment() *schema.Resource { "master_ipv4_cidr_block": { Type: schema.TypeString, Optional: true, + Computed: true, AtLeastOneOf: []string{ "config.0.private_environment_config.0.enable_private_endpoint", "config.0.private_environment_config.0.master_ipv4_cidr_block", @@ -320,7 +321,6 @@ func resourceComposerEnvironment() *schema.Resource { "config.0.private_environment_config.0.web_server_ipv4_cidr_block", }, ForceNew: true, - Default: "172.16.0.0/28", Description: `The IP range in CIDR notation to use for the hosted master network. This range is used for assigning internal IP addresses to the cluster master or set of masters and to the internal load balancer virtual IP. This range must not overlap with any other ranges in use within the cluster's network. If left blank, the default value of '172.16.0.0/28' is used.`, }, "web_server_ipv4_cidr_block": { diff --git a/website/docs/r/composer_environment.html.markdown b/website/docs/r/composer_environment.html.markdown index bfb954405c9..d764870acca 100644 --- a/website/docs/r/composer_environment.html.markdown +++ b/website/docs/r/composer_environment.html.markdown @@ -313,7 +313,7 @@ See [documentation](https://cloud.google.com/composer/docs/how-to/managing/confi for assigning internal IP addresses to the cluster master or set of masters and to the internal load balancer virtual IP. This range must not overlap with any other ranges in use within the cluster's network. - If left blank, the default value of '172.16.0.0/28' is used. + If left blank, the default value of is used. See [documentation](https://cloud.google.com/composer/docs/how-to/managing/configuring-private-ip#defaults) for default values per region. * `cloud_sql_ipv4_cidr_block` - (Optional)