hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.29k stars 1.72k forks source link

[Private Composer v2] `master_authorized_networks_config` CIDR Blocks Limit #15060

Open prabhu34 opened 1 year ago

prabhu34 commented 1 year ago

Community Note

Terraform Version

Affected Resource(s)

Terraform Configuration Files

Configured `master_authorized_networks_config` block with more than 50 `cidr_blocks` as per the documentation.

Debug Output

Panic Output

Error: googleapi: Error 400: No change in configuration. Must specify a change to configuration.requested_master_authorized_networks_config, badRequest

  on .terraform/modules/comp-v2-01/modules/composer_v2/main.tf line 114, in resource "google_composer_environment" "default":
 114: resource "google_composer_environment" "default" {

Expected Behavior

Should accept all the CIDR Blocks (upto 100) and create the cluster. The same works when we use Google APIs for creating Composer Environment.

Actual Behavior

Terraform doesn't accept the CIDR blocks upto 100 for a private Composer environment/GKE cluster.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

PeWu commented 1 year ago

I was able to create a Composer v2 Private IP environment with 52 CIDR blocks in master_authorized_networks_config using Terraform v1.2.7. Here is the exact configuration I used: https://gist.github.com/PeWu/7eaa3852f91f52a9143e94c52e952c89

Please make sure you are

  1. creating a Private IP environment by specifying private_environment_config { ... } in the Terraform configuration. Public IP environments have a limit of 50 CIDR blocks.
  2. using a recent version of Terraform and Google provider.
prabhu34 commented 1 year ago

@mkumarpcln Can you check the latest versions of the provider and Terraform?

PeWu commented 11 months ago

Closing after inactivity on the issue. The issue was not reproducible in the latest version of Terraform.

Please reopen if needed.

mkumarpcln commented 6 months ago

@mkumarpcln Can you check the latest versions of the provider and Terraform?

yes it works, thanks. this can be closed now. p.s. apologies for the really late reply.