From f76925568ec2d30b09c66d9ef86f53b6b947df7d Mon Sep 17 00:00:00 2001 From: Cameron Thornton Date: Thu, 26 Oct 2023 12:45:32 -0500 Subject: [PATCH 1/3] add randomized suffix to TestAccOrgPolicyCustomConstraint examples (#9330) --- mmv1/products/orgpolicy/CustomConstraint.yaml | 8 ++++++++ .../examples/org_policy_custom_constraint_basic.tf.erb | 2 +- .../examples/org_policy_custom_constraint_full.tf.erb | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mmv1/products/orgpolicy/CustomConstraint.yaml b/mmv1/products/orgpolicy/CustomConstraint.yaml index 60635242fd0f..e305db146275 100644 --- a/mmv1/products/orgpolicy/CustomConstraint.yaml +++ b/mmv1/products/orgpolicy/CustomConstraint.yaml @@ -31,11 +31,19 @@ examples: - !ruby/object:Provider::Terraform::Examples name: 'org_policy_custom_constraint_basic' primary_resource_id: 'constraint' + vars: + policy_name: 'custom.disableGkeAutoUpgrade' + test_vars_overrides: + policy_name: '"custom.tfTestDisableGkeAutoUpgrade" + acctest.RandString(t, 10)' test_env_vars: org_id: :ORG_ID - !ruby/object:Provider::Terraform::Examples name: 'org_policy_custom_constraint_full' primary_resource_id: 'constraint' + vars: + policy_name: 'custom.disableGkeAutoUpgrade' + test_vars_overrides: + policy_name: '"custom.tfTestDisableGkeAutoUpgrade" + acctest.RandString(t, 10)' test_env_vars: org_id: :ORG_TARGET parameters: diff --git a/mmv1/templates/terraform/examples/org_policy_custom_constraint_basic.tf.erb b/mmv1/templates/terraform/examples/org_policy_custom_constraint_basic.tf.erb index 32b23fc4b45f..61a4805230b8 100644 --- a/mmv1/templates/terraform/examples/org_policy_custom_constraint_basic.tf.erb +++ b/mmv1/templates/terraform/examples/org_policy_custom_constraint_basic.tf.erb @@ -1,6 +1,6 @@ resource "google_org_policy_custom_constraint" "<%= ctx[:primary_resource_id] %>" { - name = "custom.disableGkeAutoUpgrade" + name = "<%= ctx[:vars]['policy_name'] %>" parent = "organizations/<%= ctx[:test_env_vars]['org_id'] %>" action_type = "ALLOW" diff --git a/mmv1/templates/terraform/examples/org_policy_custom_constraint_full.tf.erb b/mmv1/templates/terraform/examples/org_policy_custom_constraint_full.tf.erb index a75a21e907de..cf08b9504acd 100644 --- a/mmv1/templates/terraform/examples/org_policy_custom_constraint_full.tf.erb +++ b/mmv1/templates/terraform/examples/org_policy_custom_constraint_full.tf.erb @@ -1,6 +1,6 @@ resource "google_org_policy_custom_constraint" "<%= ctx[:primary_resource_id] %>" { - name = "custom.disableGkeAutoUpgrade" + name = "<%= ctx[:vars]['policy_name'] %>" parent = "organizations/<%= ctx[:test_env_vars]['org_id'] %>" display_name = "Disable GKE auto upgrade" description = "Only allow GKE NodePool resource to be created or updated if AutoUpgrade is not enabled where this custom constraint is enforced." From f3db9dd4539518f05ddb9b05b29f403dc5ee1a8e Mon Sep 17 00:00:00 2001 From: Khaled Mohamed Refaat Date: Thu, 26 Oct 2023 21:14:12 +0200 Subject: [PATCH 2/3] Add Terraform Support For Cloud SQL Preferred Zone Selection Feature (#9341) * Adding support for cloud sql zone selection * Fixing spaces/tabs indentation * Fixing indetnation * Fixing blank line * Trigger Presubmits --------- Co-authored-by: Khaled Hassan --- mmv1/third_party/terraform/go.mod.erb | 106 ++++++------ mmv1/third_party/terraform/go.sum | 159 ++++++++++++++++++ .../resource_composer_environment.go.erb | 10 +- .../resource_composer_environment_test.go.erb | 3 + .../docs/r/composer_environment.html.markdown | 5 + 5 files changed, 232 insertions(+), 51 deletions(-) diff --git a/mmv1/third_party/terraform/go.mod.erb b/mmv1/third_party/terraform/go.mod.erb index 1f6a8af6f956..32f222bf7e67 100644 --- a/mmv1/third_party/terraform/go.mod.erb +++ b/mmv1/third_party/terraform/go.mod.erb @@ -3,95 +3,101 @@ module github.com/hashicorp/terraform-provider-google go 1.19 require ( - cloud.google.com/go/bigtable v1.19.0 - github.com/GoogleCloudPlatform/declarative-resource-client-library v1.52.0 + cloud.google.com/go/bigtable v1.20.0 + github.com/GoogleCloudPlatform/declarative-resource-client-library v1.54.0 github.com/apparentlymart/go-cidr v1.1.0 github.com/davecgh/go-spew v1.1.1 github.com/dnaeon/go-vcr v1.0.1 - github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92 - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 - github.com/hashicorp/errwrap v1.0.0 + github.com/gammazero/workerpool v1.1.3 + github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 + github.com/hashicorp/errwrap v1.1.0 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 github.com/hashicorp/go-multierror v1.1.1 github.com/hashicorp/go-version v1.6.0 - github.com/hashicorp/terraform-plugin-framework v1.1.1 - github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 - github.com/hashicorp/terraform-plugin-go v0.14.3 - github.com/hashicorp/terraform-plugin-log v0.7.0 - github.com/hashicorp/terraform-plugin-mux v0.8.0 - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 + github.com/hashicorp/terraform-plugin-framework v1.4.1 + github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 + github.com/hashicorp/terraform-plugin-go v0.19.0 + github.com/hashicorp/terraform-plugin-log v0.9.0 + github.com/hashicorp/terraform-plugin-mux v0.12.0 + github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/hashstructure v1.1.0 - github.com/sirupsen/logrus v1.8.1 - golang.org/x/net v0.16.0 + github.com/sirupsen/logrus v1.9.3 + golang.org/x/net v0.17.0 golang.org/x/oauth2 v0.13.0 - google.golang.org/api v0.143.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 - google.golang.org/grpc v1.57.0 + google.golang.org/api v0.148.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b + google.golang.org/grpc v1.59.0 google.golang.org/protobuf v1.31.0 ) require ( - bitbucket.org/creachadair/stringset v0.0.8 // indirect - cloud.google.com/go v0.110.7 // indirect - cloud.google.com/go/compute v1.23.0 // indirect + bitbucket.org/creachadair/stringset v0.0.11 // indirect + cloud.google.com/go v0.110.9 // indirect + cloud.google.com/go/compute v1.23.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.1 // indirect - cloud.google.com/go/longrunning v0.5.1 // indirect - github.com/agext/levenshtein v1.2.2 // indirect + cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/longrunning v0.5.2 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect + github.com/agext/levenshtein v1.2.3 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cloudflare/circl v1.3.5 // indirect github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect - github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect - github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f // indirect - github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/cncf/xds/go v0.0.0-20231016030527-8bd2eac9fb4a // indirect + github.com/envoyproxy/go-control-plane v0.11.1 // indirect + github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/gammazero/deque v0.2.1 // indirect + github.com/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.3.1 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/hashicorp/go-checkpoint v0.5.0 // indirect - github.com/hashicorp/go-hclog v1.2.1 // indirect - github.com/hashicorp/go-plugin v1.4.8 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/hc-install v0.4.0 // indirect - github.com/hashicorp/hcl/v2 v2.14.1 // indirect + github.com/hashicorp/hc-install v0.6.1 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-exec v0.17.3 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-registry-address v0.1.0 // indirect - github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect - github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect + github.com/hashicorp/terraform-exec v0.19.0 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect + github.com/hashicorp/yamux v0.1.1 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/oklog/run v1.0.0 // indirect + github.com/oklog/run v1.1.0 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect + github.com/vmihailenco/msgpack/v4 v4.3.13 // indirect + github.com/vmihailenco/msgpack/v5 v5.4.0 // indirect github.com/vmihailenco/tagparser v0.1.2 // indirect - github.com/zclconf/go-cty v1.11.0 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect go.opencensus.io v0.24.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/sync v0.3.0 // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/sync v0.4.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/mmv1/third_party/terraform/go.sum b/mmv1/third_party/terraform/go.sum index 647a2b8726e0..ed2fc5fa8185 100644 --- a/mmv1/third_party/terraform/go.sum +++ b/mmv1/third_party/terraform/go.sum @@ -1,31 +1,49 @@ bitbucket.org/creachadair/stringset v0.0.8 h1:gQqe4vs8XWgMyijfyKE6K8o4TcyGGrRXe0JvHgx5H+M= bitbucket.org/creachadair/stringset v0.0.8/go.mod h1:AgthVMyMxC/6FK1KBJ2ALdqkZObGN8hOetgpwXyMn34= +bitbucket.org/creachadair/stringset v0.0.11 h1:6Sv4CCv14Wm+OipW4f3tWOb0SQVpBDLW0knnJqUnmZ8= +bitbucket.org/creachadair/stringset v0.0.11/go.mod h1:wh0BHewFe+j0HrzWz7KcGbSNpFzWwnpmgPRlB57U5jU= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.9 h1:e7ITSqGFFk4rbz/JFIqZh3G4VEHguhAL4BQcFlWtU68= +cloud.google.com/go v0.110.9/go.mod h1:rpxevX/0Lqvlbc88b7Sc1SPNdyK1riNBTUU6JXhYNpM= cloud.google.com/go/bigtable v1.19.0 h1:wiq9LT0kukfInzvy1joMDijCw/OD1UChpSbORXYn0LI= cloud.google.com/go/bigtable v1.19.0/go.mod h1:xl5kPa8PTkJjdBxg6qdGH88464nNqmbISHSRU+D2yFE= +cloud.google.com/go/bigtable v1.20.0 h1:NqZC/WcesSn4O8L0I2JmuNsUigSyBQifVLYgM9LMQeQ= +cloud.google.com/go/bigtable v1.20.0/go.mod h1:upJDn8frsjzpRMfybiWkD1PG6WCCL7CRl26MgVeoXY4= cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= +cloud.google.com/go/longrunning v0.5.2 h1:u+oFqfEwwU7F9dIELigxbe0XVnBAo9wqMuQLA50CZ5k= +cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/GoogleCloudPlatform/declarative-resource-client-library v1.52.0 h1:KswxXF4E5iWv2ggktqv265zOvwmXA3mgma3UQfYA4tU= github.com/GoogleCloudPlatform/declarative-resource-client-library v1.52.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k= +github.com/GoogleCloudPlatform/declarative-resource-client-library v1.54.0 h1:PUiaG5Xz1rzBU/GBO1OvyRz5O+Tog42Zg9+a/YFcpFc= +github.com/GoogleCloudPlatform/declarative-resource-client-library v1.54.0/go.mod h1:pL2Qt5HT+x6xrTd806oMiM3awW6kNIXB/iiuClz6m6k= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c h1:kMFnB0vCcX7IL/m9Y5LO+KQYv+t1CQOiFe6+SV2J7bE= +github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= +github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= @@ -34,7 +52,11 @@ github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/ github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -43,12 +65,17 @@ github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91 github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= +github.com/cloudflare/circl v1.3.5 h1:g+wWynZqVALYAlpSQFAa7TscDnUK8mKYtrxMpw6AUKo= +github.com/cloudflare/circl v1.3.5/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20231016030527-8bd2eac9fb4a h1:SZL0tarhuhoN0kvo5pfO4i6vxYghwzXUo9w0WHIjI4k= +github.com/cncf/xds/go v0.0.0-20231016030527-8bd2eac9fb4a/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/creachadair/staticfile v0.1.2/go.mod h1:a3qySzCIXEprDGxk6tSxSI+dBBdLzqeBOMhZ+o2d3pM= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -63,16 +90,26 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f h1:7T++XKzy4xg7PKy+bM+Sa9/oe1OC88yz2hXQUISoXfA= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= +github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= +github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= +github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= +github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4 h1:R+19WKQClnfMXS60cP5BmMe1wjZ4u0evY2p2Ar0ZTXo= github.com/gammazero/deque v0.0.0-20180920172122-f6adf94963e4/go.mod h1:GeIq9qoE43YdGnDXURnmKTnGg15pQz4mYkXSTChbneI= +github.com/gammazero/deque v0.2.1 h1:qSdsbG6pgp6nL7A0+K/B7s12mcCY/5l5SIUpMOl+dC0= +github.com/gammazero/deque v0.2.1/go.mod h1:LFroj8x4cMYCukHJDbxFCkT+r9AndaJnFMuZDV34tuU= github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92 h1:EipXK6U05IQ2wtuFRn4k3h0+2lXypzItoXGVyf4r9Io= github.com/gammazero/workerpool v0.0.0-20181230203049-86a96b5d5d92/go.mod h1:w9RqFVO2BM3xwWEcAB8Fwp0OviTBBEiRmSBDfbXnd3w= +github.com/gammazero/workerpool v1.1.3 h1:WixN4xzukFoN0XSeXF6puqEqFTl2mECI9S6W44HWy9Q= +github.com/gammazero/workerpool v1.1.3/go.mod h1:wPjyBLDbyKnUn2XwwyD3EEwo9dHutia9/fwNmSHWACc= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= @@ -83,7 +120,9 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6 github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -91,6 +130,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -109,6 +150,7 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= @@ -122,6 +164,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932 h1:5/4TSDzpDnHQ8rKEEQBjRlYx77mHOvXu08oGchxej7o= github.com/google/go-cpy v0.0.0-20211218193943-a9c933c06932/go.mod h1:cC6EdPbj/17GFCPDK39NRarlMI+kt+O60S12cNB5J9Y= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -131,12 +175,18 @@ github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.1 h1:SBWmZhjUDRorQxrN0nwzf+AHBxnbFjViHQS4P0yVpmQ= github.com/googleapis/enterprise-certificate-proxy v0.3.1/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -147,10 +197,14 @@ github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUK github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -160,32 +214,58 @@ github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mO github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= +github.com/hashicorp/hc-install v0.6.1 h1:IGxShH7AVhPaSuSJpKtVi/EFORNjO+OYVJJrAtGG2mY= +github.com/hashicorp/hc-install v0.6.1/go.mod h1:0fW3jpg+wraYSnFDJ6Rlie3RvLf1bIqVIkzoon4KoVE= github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= github.com/hashicorp/terraform-exec v0.17.3/go.mod h1:+NELG0EqQekJzhvikkeQsOAZpsw0cv/03rbeQJqscAI= +github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM= +github.com/hashicorp/terraform-exec v0.19.0/go.mod h1:tbxUpe3JKruE9Cuf65mycSIT8KiNPZ0FkuTE3H4urQg= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= +github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= github.com/hashicorp/terraform-plugin-framework v1.1.1 h1:PbnEKHsIU8KTTzoztHQGgjZUWx7Kk8uGtpGMMc1p+oI= github.com/hashicorp/terraform-plugin-framework v1.1.1/go.mod h1:DyZPxQA+4OKK5ELxFIIcqggcszqdWWUpTLPHAhS/tkY= +github.com/hashicorp/terraform-plugin-framework v1.4.1 h1:ZC29MoB3Nbov6axHdgPbMz7799pT5H8kIrM8YAsaVrs= +github.com/hashicorp/terraform-plugin-framework v1.4.1/go.mod h1:XC0hPcQbBvlbxwmjxuV/8sn8SbZRg4XwGMs22f+kqV0= github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 h1:LYz4bXh3t7bTEydXOmPDPupRRnA480B/9+jV8yZvxBA= github.com/hashicorp/terraform-plugin-framework-validators v0.9.0/go.mod h1:+BVERsnfdlhYR2YkXMBtPnmn9UsL19U3qUtSZ+Y/5MY= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0 h1:HOjBuMbOEzl7snOdOoUfE2Jgeto6JOjLVQ39Ls2nksc= +github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg= github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= +github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= +github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= github.com/hashicorp/terraform-plugin-mux v0.8.0 h1:WCTP66mZ+iIaIrCNJnjPEYnVjawTshnDJu12BcXK1EI= github.com/hashicorp/terraform-plugin-mux v0.8.0/go.mod h1:vdW0daEi8Kd4RFJmet5Ot+SIVB/B8SwQVJiYKQwdCy8= +github.com/hashicorp/terraform-plugin-mux v0.12.0 h1:TJlmeslQ11WlQtIFAfth0vXx+gSNgvMEng2Rn9z3WZY= +github.com/hashicorp/terraform-plugin-mux v0.12.0/go.mod h1:8MR0AgmV+Q03DIjyrAKxXyYlq2EUnYBQP8gxAAA0zeM= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0 h1:wcOKYwPI9IorAJEBLzgclh3xVolO7ZorYd6U1vnok14= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.29.0/go.mod h1:qH/34G25Ugdj5FcM95cSoXzUgIbgfhVLXCcEcYaMwq8= github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= +github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -212,9 +292,14 @@ github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlW github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -223,6 +308,8 @@ github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJ github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= +github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0= github.com/mitchellh/hashstructure v1.1.0/go.mod h1:xUDAozZz0Wmdiufv0uyhnHkUTN6/6d8ulp4AwfLKrmA= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -232,6 +319,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -245,6 +334,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -263,24 +354,37 @@ github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaU github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= +github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= +github.com/vmihailenco/msgpack/v5 v5.4.0 h1:hRM0digJwyR6vll33NNAwCFguy5JuBD6jxDmQP3l608= +github.com/vmihailenco/msgpack/v5 v5.4.0/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21PIudVV/E3rRQok= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -288,14 +392,22 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -313,8 +425,14 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= @@ -325,8 +443,12 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -346,15 +468,33 @@ golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -362,32 +502,47 @@ golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.143.0 h1:o8cekTkqhywkbZT6p1UHJPZ9+9uuCAJs/KYomxZB8fA= google.golang.org/api v0.143.0/go.mod h1:FoX9DO9hT7DLNn97OuoZAGSDuNAXdJRuGK98rSUgurk= +google.golang.org/api v0.148.0 h1:HBq4TZlN4/1pNcu0geJZ/Q50vIwIXT532UIMYoo0vOs= +google.golang.org/api v0.148.0/go.mod h1:8/TBgwaKjfqTdacOJrOv2+2Q6fBDU1uHKK06oGSkxzU= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= +google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -396,6 +551,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -419,10 +576,12 @@ gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/mmv1/third_party/terraform/services/composer/resource_composer_environment.go.erb b/mmv1/third_party/terraform/services/composer/resource_composer_environment.go.erb index 01f803757b46..8db2bd9fdbc5 100644 --- a/mmv1/third_party/terraform/services/composer/resource_composer_environment.go.erb +++ b/mmv1/third_party/terraform/services/composer/resource_composer_environment.go.erb @@ -583,9 +583,15 @@ func ResourceComposerEnvironment() *schema.Resource { Schema: map[string]*schema.Schema{ "machine_type": { Type: schema.TypeString, - Required: true, + Optional: true, Description: `Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used.`, }, + "zone": { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Description: `Optional. Cloud SQL database preferred zone.`, + }, }, }, }, @@ -1407,6 +1413,7 @@ func flattenComposerEnvironmentConfigDatabaseConfig(databaseCfg *composer.Databa transformed := make(map[string]interface{}) transformed["machine_type"] = databaseCfg.MachineType + transformed["zone"] = databaseCfg.Zone return []interface{}{transformed} } @@ -1827,6 +1834,7 @@ func expandComposerEnvironmentConfigDatabaseConfig(v interface{}, d *schema.Reso transformed := &composer.DatabaseConfig{} transformed.MachineType = original["machine_type"].(string) + transformed.Zone = original["zone"].(string) return transformed, nil } diff --git a/mmv1/third_party/terraform/services/composer/resource_composer_environment_test.go.erb b/mmv1/third_party/terraform/services/composer/resource_composer_environment_test.go.erb index 83725a9bb8f7..27036ff03ca8 100644 --- a/mmv1/third_party/terraform/services/composer/resource_composer_environment_test.go.erb +++ b/mmv1/third_party/terraform/services/composer/resource_composer_environment_test.go.erb @@ -1680,6 +1680,9 @@ resource "google_composer_environment" "test" { count = 1 } } + database_config { + zone = "us-east1-c" + } environment_size = "ENVIRONMENT_SIZE_MEDIUM" private_environment_config { enable_private_endpoint = true diff --git a/mmv1/third_party/terraform/website/docs/r/composer_environment.html.markdown b/mmv1/third_party/terraform/website/docs/r/composer_environment.html.markdown index 3ddb514dd449..9d4a5d6f7170 100644 --- a/mmv1/third_party/terraform/website/docs/r/composer_environment.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/composer_environment.html.markdown @@ -572,6 +572,11 @@ The `web_server_network_access_control` supports: (Required) Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. + +* `Zone` - + (Optional) + Preferred Cloud SQL database zone. + The `web_server_config` block supports: From 585b10b98000ba8135b211c8994478fc486ec8e4 Mon Sep 17 00:00:00 2001 From: Shuya Ma <87669292+shuyama1@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:00:29 -0700 Subject: [PATCH 3/3] Update node pool tests to use bootstrapped network (#9348) --- ...ta_source_google_container_cluster_test.go | 24 +- .../resource_container_node_pool_test.go.erb | 696 +++++++++++------- 2 files changed, 465 insertions(+), 255 deletions(-) diff --git a/mmv1/third_party/terraform/services/container/data_source_google_container_cluster_test.go b/mmv1/third_party/terraform/services/container/data_source_google_container_cluster_test.go index 81fa64c14c9f..5389d6f15bb0 100644 --- a/mmv1/third_party/terraform/services/container/data_source_google_container_cluster_test.go +++ b/mmv1/third_party/terraform/services/container/data_source_google_container_cluster_test.go @@ -11,12 +11,15 @@ import ( func TestAccContainerClusterDatasource_zonal(t *testing.T) { t.Parallel() + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) + acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { - Config: testAccContainerClusterDatasource_zonal(acctest.RandString(t, 10)), + Config: testAccContainerClusterDatasource_zonal(acctest.RandString(t, 10), networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( acctest.CheckDataSourceStateMatchesResourceStateWithIgnores( "data.google_container_cluster.kubes", @@ -38,12 +41,15 @@ func TestAccContainerClusterDatasource_zonal(t *testing.T) { func TestAccContainerClusterDatasource_regional(t *testing.T) { t.Parallel() + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) + acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), Steps: []resource.TestStep{ { - Config: testAccContainerClusterDatasource_regional(acctest.RandString(t, 10)), + Config: testAccContainerClusterDatasource_regional(acctest.RandString(t, 10), networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( acctest.CheckDataSourceStateMatchesResourceStateWithIgnores( "data.google_container_cluster.kubes", @@ -62,34 +68,40 @@ func TestAccContainerClusterDatasource_regional(t *testing.T) { }) } -func testAccContainerClusterDatasource_zonal(suffix string) string { +func testAccContainerClusterDatasource_zonal(suffix, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "kubes" { name = "tf-test-cluster-%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" + } data "google_container_cluster" "kubes" { name = google_container_cluster.kubes.name location = google_container_cluster.kubes.location } -`, suffix) +`, suffix, networkName, subnetworkName) } -func testAccContainerClusterDatasource_regional(suffix string) string { +func testAccContainerClusterDatasource_regional(suffix, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "kubes" { name = "tf-test-cluster-%s" location = "us-central1" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" + } data "google_container_cluster" "kubes" { name = google_container_cluster.kubes.name location = google_container_cluster.kubes.location } -`, suffix) +`, suffix, networkName, subnetworkName) } diff --git a/mmv1/third_party/terraform/services/container/resource_container_node_pool_test.go.erb b/mmv1/third_party/terraform/services/container/resource_container_node_pool_test.go.erb index bf3663095dc6..aac2bfc21ce3 100644 --- a/mmv1/third_party/terraform/services/container/resource_container_node_pool_test.go.erb +++ b/mmv1/third_party/terraform/services/container/resource_container_node_pool_test.go.erb @@ -17,6 +17,8 @@ func TestAccContainerNodePool_basic(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -24,7 +26,7 @@ func TestAccContainerNodePool_basic(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_basic(cluster, np), + Config: testAccContainerNodePool_basic(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -40,6 +42,8 @@ func TestAccContainerNodePool_basicWithClusterId(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -47,7 +51,7 @@ func TestAccContainerNodePool_basicWithClusterId(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_basicWithClusterId(cluster, np), + Config: testAccContainerNodePool_basicWithClusterId(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -113,6 +117,8 @@ func TestAccContainerNodePool_namePrefix(t *testing.T) { t.Parallel() cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -120,7 +126,7 @@ func TestAccContainerNodePool_namePrefix(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_namePrefix(cluster, "tf-np-"), + Config: testAccContainerNodePool_namePrefix(cluster, "tf-np-", networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -138,6 +144,8 @@ func TestAccContainerNodePool_noName(t *testing.T) { t.Parallel() cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -145,7 +153,7 @@ func TestAccContainerNodePool_noName(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_noName(cluster), + Config: testAccContainerNodePool_noName(cluster, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -161,6 +169,8 @@ func TestAccContainerNodePool_withLoggingVariantUpdates(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -168,7 +178,7 @@ func TestAccContainerNodePool_withLoggingVariantUpdates(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "DEFAULT"), + Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "DEFAULT", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_logging_variant", @@ -176,7 +186,7 @@ func TestAccContainerNodePool_withLoggingVariantUpdates(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "MAX_THROUGHPUT"), + Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "MAX_THROUGHPUT", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_logging_variant", @@ -184,7 +194,7 @@ func TestAccContainerNodePool_withLoggingVariantUpdates(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "DEFAULT"), + Config: testAccContainerNodePool_withLoggingVariant(cluster, nodePool, "DEFAULT", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_logging_variant", @@ -200,6 +210,8 @@ func TestAccContainerNodePool_withNodeConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -207,7 +219,7 @@ func TestAccContainerNodePool_withNodeConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_withNodeConfig(cluster, nodePool), + Config: testAccContainerNodePool_withNodeConfig(cluster, nodePool, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np_with_node_config", @@ -218,7 +230,7 @@ func TestAccContainerNodePool_withNodeConfig(t *testing.T) { ImportStateVerifyIgnore: []string{"autoscaling.#", "node_config.0.taint"}, }, resource.TestStep{ - Config: testAccContainerNodePool_withNodeConfigUpdate(cluster, nodePool), + Config: testAccContainerNodePool_withNodeConfigUpdate(cluster, nodePool, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np_with_node_config", @@ -237,6 +249,8 @@ func TestAccContainerNodePool_withTaintsUpdate(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -244,7 +258,7 @@ func TestAccContainerNodePool_withTaintsUpdate(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_basic(cluster, nodePool), + Config: testAccContainerNodePool_basic(cluster, nodePool, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -252,7 +266,7 @@ func TestAccContainerNodePool_withTaintsUpdate(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_withTaintsUpdate(cluster, nodePool), + Config: testAccContainerNodePool_withTaintsUpdate(cluster, nodePool, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -271,6 +285,8 @@ func TestAccContainerNodePool_withReservationAffinity(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -278,7 +294,7 @@ func TestAccContainerNodePool_withReservationAffinity(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withReservationAffinity(cluster, np), + Config: testAccContainerNodePool_withReservationAffinity(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_reservation_affinity", "node_config.0.reservation_affinity.#", "1"), @@ -301,6 +317,8 @@ func TestAccContainerNodePool_withReservationAffinitySpecific(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) reservation := fmt.Sprintf("tf-test-reservation-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -308,7 +326,7 @@ func TestAccContainerNodePool_withReservationAffinitySpecific(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withReservationAffinitySpecific(cluster, reservation, np), + Config: testAccContainerNodePool_withReservationAffinitySpecific(cluster, reservation, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_reservation_affinity", "node_config.0.reservation_affinity.#", "1"), @@ -337,6 +355,8 @@ func TestAccContainerNodePool_withWorkloadIdentityConfig(t *testing.T) { pid := envvar.GetTestProjectFromEnv() cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -344,7 +364,7 @@ func TestAccContainerNodePool_withWorkloadIdentityConfig(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withWorkloadMetadataConfig(cluster, np), + Config: testAccContainerNodePool_withWorkloadMetadataConfig(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_workload_metadata_config", "node_config.0.workload_metadata_config.0.mode", "GCE_METADATA"), @@ -356,7 +376,7 @@ func TestAccContainerNodePool_withWorkloadIdentityConfig(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withWorkloadMetadataConfig_gkeMetadata(pid, cluster, np), + Config: testAccContainerNodePool_withWorkloadMetadataConfig_gkeMetadata(pid, cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_workload_metadata_config", "node_config.0.workload_metadata_config.0.mode", "GKE_METADATA"), @@ -377,6 +397,8 @@ func TestAccContainerNodePool_withSandboxConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -384,7 +406,7 @@ func TestAccContainerNodePool_withSandboxConfig(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withSandboxConfig(cluster, np), + Config: testAccContainerNodePool_withSandboxConfig(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_sandbox_config", "node_config.0.sandbox_config.0.sandbox_type", "gvisor"), @@ -406,6 +428,8 @@ func TestAccContainerNodePool_withKubeletConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -413,7 +437,7 @@ func TestAccContainerNodePool_withKubeletConfig(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "static", "100us", true, 2048), + Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "static", "100us", networkName, subnetworkName, true, 2048), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_kubelet_config", "node_config.0.kubelet_config.0.cpu_cfs_quota", "true"), @@ -427,7 +451,7 @@ func TestAccContainerNodePool_withKubeletConfig(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "", "", false, 1024), + Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "", "", networkName, subnetworkName, false, 1024), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.with_kubelet_config", "node_config.0.kubelet_config.0.cpu_cfs_quota", "false"), @@ -449,6 +473,8 @@ func TestAccContainerNodePool_withInvalidKubeletCpuManagerPolicy(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -456,7 +482,7 @@ func TestAccContainerNodePool_withInvalidKubeletCpuManagerPolicy(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "dontexist", "100us", true, 1024), + Config: testAccContainerNodePool_withKubeletConfig(cluster, np, "dontexist", "100us", networkName, subnetworkName, true, 1024), ExpectError: regexp.MustCompile(`.*to be one of \[static none \].*`), }, }, @@ -468,6 +494,8 @@ func TestAccContainerNodePool_withLinuxNodeConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -476,7 +504,7 @@ func TestAccContainerNodePool_withLinuxNodeConfig(t *testing.T) { Steps: []resource.TestStep{ // Create a node pool with empty `linux_node_config.sysctls`. { - Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, ""), + Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, "", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_linux_node_config", @@ -484,7 +512,7 @@ func TestAccContainerNodePool_withLinuxNodeConfig(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, "1000 20000 100000"), + Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, "1000 20000 100000", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_linux_node_config", @@ -493,7 +521,7 @@ func TestAccContainerNodePool_withLinuxNodeConfig(t *testing.T) { }, // Perform an update. { - Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, "1000 20000 200000"), + Config: testAccContainerNodePool_withLinuxNodeConfig(cluster, np, "1000 20000 200000", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_linux_node_config", @@ -509,6 +537,8 @@ func TestAccContainerNodePool_withCgroupMode(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -516,7 +546,7 @@ func TestAccContainerNodePool_withCgroupMode(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withCgroupMode(cluster, np, "CGROUP_MODE_V2"), + Config: testAccContainerNodePool_withCgroupMode(cluster, np, "CGROUP_MODE_V2", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -525,7 +555,7 @@ func TestAccContainerNodePool_withCgroupMode(t *testing.T) { }, // Perform an update. { - Config: testAccContainerNodePool_withCgroupMode(cluster, np, "CGROUP_MODE_UNSPECIFIED"), + Config: testAccContainerNodePool_withCgroupMode(cluster, np, "CGROUP_MODE_UNSPECIFIED", networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -701,6 +731,8 @@ func TestAccContainerNodePool_withBootDiskKmsKey(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) if acctest.BootstrapPSARole(t, "service-", "compute-system", "roles/cloudkms.cryptoKeyEncrypterDecrypter") { t.Fatal("Stopping the test because a role was added to the policy.") @@ -712,7 +744,7 @@ func TestAccContainerNodePool_withBootDiskKmsKey(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withBootDiskKmsKey(cluster, np), + Config: testAccContainerNodePool_withBootDiskKmsKey(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_boot_disk_kms_key", @@ -730,6 +762,8 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -737,7 +771,7 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 2, 3, "SURGE", "", 0, 0.0, ""), + Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, networkName, subnetworkName, 2, 3, "SURGE", "", 0, 0.0, ""), }, { ResourceName: "google_container_node_pool.with_upgrade_settings", @@ -745,7 +779,7 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 2, 1, "SURGE", "", 0, 0.0, ""), + Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, networkName, subnetworkName, 2, 1, "SURGE", "", 0, 0.0, ""), }, { ResourceName: "google_container_node_pool.with_upgrade_settings", @@ -753,7 +787,7 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 1, 1, "SURGE", "", 0, 0.0, ""), + Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, networkName, subnetworkName, 1, 1, "SURGE", "", 0, 0.0, ""), }, { ResourceName: "google_container_node_pool.with_upgrade_settings", @@ -761,7 +795,7 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 0, 0, "BLUE_GREEN", "100s", 1, 0.0, "0s"), + Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, networkName, subnetworkName, 0, 0, "BLUE_GREEN", "100s", 1, 0.0, "0s"), }, { ResourceName: "google_container_node_pool.with_upgrade_settings", @@ -769,7 +803,7 @@ func TestAccContainerNodePool_withUpgradeSettings(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, 0, 0, "BLUE_GREEN", "100s", 0, 0.5, "1s"), + Config: testAccContainerNodePool_withUpgradeSettings(cluster, np, networkName, subnetworkName, 0, 0, "BLUE_GREEN", "100s", 0, 0.5, "1s"), }, { ResourceName: "google_container_node_pool.with_upgrade_settings", @@ -785,6 +819,8 @@ func TestAccContainerNodePool_withGPU(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -792,7 +828,7 @@ func TestAccContainerNodePool_withGPU(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_withGPU(cluster, np), + Config: testAccContainerNodePool_withGPU(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np_with_gpu", @@ -808,6 +844,9 @@ func TestAccContainerNodePool_withManagement(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) nodePool := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) + management := ` management { auto_repair = "false" @@ -820,7 +859,7 @@ func TestAccContainerNodePool_withManagement(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_withManagement(cluster, nodePool, ""), + Config: testAccContainerNodePool_withManagement(cluster, nodePool, "", networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr( "google_container_node_pool.np_with_management", "management.#", "1"), @@ -836,7 +875,7 @@ func TestAccContainerNodePool_withManagement(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_withManagement(cluster, nodePool, management), + Config: testAccContainerNodePool_withManagement(cluster, nodePool, management, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr( "google_container_node_pool.np_with_management", "management.#", "1"), @@ -860,6 +899,8 @@ func TestAccContainerNodePool_withNodeConfigScopeAlias(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -867,7 +908,7 @@ func TestAccContainerNodePool_withNodeConfigScopeAlias(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_withNodeConfigScopeAlias(cluster, np), + Config: testAccContainerNodePool_withNodeConfigScopeAlias(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np_with_node_config_scope_alias", @@ -884,6 +925,8 @@ func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -891,7 +934,7 @@ func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_regionalAutoscaling(cluster, np), + Config: testAccContainerNodePool_regionalAutoscaling(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count", "1"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count", "3"), @@ -903,7 +946,7 @@ func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_updateAutoscaling(cluster, np), + Config: testAccContainerNodePool_updateAutoscaling(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count", "0"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count", "5"), @@ -915,7 +958,7 @@ func TestAccContainerNodePool_regionalAutoscaling(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_basic(cluster, np), + Config: testAccContainerNodePool_basic(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count"), resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count"), @@ -939,6 +982,8 @@ func TestAccContainerNodePool_totalSize(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -946,7 +991,7 @@ func TestAccContainerNodePool_totalSize(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_totalSize(cluster, np), + Config: testAccContainerNodePool_totalSize(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.total_min_node_count", "4"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.total_max_node_count", "12"), @@ -959,7 +1004,7 @@ func TestAccContainerNodePool_totalSize(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_updateTotalSize(cluster, np), + Config: testAccContainerNodePool_updateTotalSize(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.total_min_node_count", "2"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.total_max_node_count", "22"), @@ -972,7 +1017,7 @@ func TestAccContainerNodePool_totalSize(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_basicTotalSize(cluster, np), + Config: testAccContainerNodePool_basicTotalSize(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count"), resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count"), @@ -995,6 +1040,8 @@ func TestAccContainerNodePool_autoscaling(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1002,7 +1049,7 @@ func TestAccContainerNodePool_autoscaling(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_autoscaling(cluster, np), + Config: testAccContainerNodePool_autoscaling(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count", "1"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count", "3"), @@ -1014,7 +1061,7 @@ func TestAccContainerNodePool_autoscaling(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_updateAutoscaling(cluster, np), + Config: testAccContainerNodePool_updateAutoscaling(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count", "0"), resource.TestCheckResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count", "5"), @@ -1026,7 +1073,7 @@ func TestAccContainerNodePool_autoscaling(t *testing.T) { ImportStateVerify: true, }, resource.TestStep{ - Config: testAccContainerNodePool_basic(cluster, np), + Config: testAccContainerNodePool_basic(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.min_node_count"), resource.TestCheckNoResourceAttr("google_container_node_pool.np", "autoscaling.0.max_node_count"), @@ -1049,6 +1096,8 @@ func TestAccContainerNodePool_resize(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1056,7 +1105,7 @@ func TestAccContainerNodePool_resize(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_additionalZones(cluster, np), + Config: testAccContainerNodePool_additionalZones(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "node_count", "2"), ), @@ -1067,7 +1116,7 @@ func TestAccContainerNodePool_resize(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_resize(cluster, np), + Config: testAccContainerNodePool_resize(cluster, np, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "node_count", "3"), ), @@ -1086,6 +1135,8 @@ func TestAccContainerNodePool_version(t *testing.T) { t.Parallel() cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1093,7 +1144,7 @@ func TestAccContainerNodePool_version(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_version(cluster, np), + Config: testAccContainerNodePool_version(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1101,7 +1152,7 @@ func TestAccContainerNodePool_version(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_updateVersion(cluster, np), + Config: testAccContainerNodePool_updateVersion(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1109,7 +1160,7 @@ func TestAccContainerNodePool_version(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_version(cluster, np), + Config: testAccContainerNodePool_version(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1125,6 +1176,8 @@ func TestAccContainerNodePool_regionalClusters(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1132,7 +1185,7 @@ func TestAccContainerNodePool_regionalClusters(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_regionalClusters(cluster, np), + Config: testAccContainerNodePool_regionalClusters(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -1148,6 +1201,8 @@ func TestAccContainerNodePool_012_ConfigModeAttr(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1155,7 +1210,7 @@ func TestAccContainerNodePool_012_ConfigModeAttr(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_012_ConfigModeAttr1(cluster, np), + Config: testAccContainerNodePool_012_ConfigModeAttr1(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1163,7 +1218,7 @@ func TestAccContainerNodePool_012_ConfigModeAttr(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_012_ConfigModeAttr2(cluster, np), + Config: testAccContainerNodePool_012_ConfigModeAttr2(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1179,6 +1234,8 @@ func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1187,7 +1244,7 @@ func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) { Steps: []resource.TestStep{ { // Test alternative way to specify an empty node pool - Config: testAccContainerNodePool_EmptyGuestAccelerator(cluster, np), + Config: testAccContainerNodePool_EmptyGuestAccelerator(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1196,7 +1253,7 @@ func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) { }, { // Test alternative way to specify an empty node pool - Config: testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np, 1), + Config: testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np, networkName, subnetworkName, 1), }, { ResourceName: "google_container_node_pool.np", @@ -1205,13 +1262,13 @@ func TestAccContainerNodePool_EmptyGuestAccelerator(t *testing.T) { }, { // Assert that changes in count from 1 result in a diff - Config: testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np, 2), + Config: testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np, networkName, subnetworkName, 2), ExpectNonEmptyPlan: true, PlanOnly: true, }, { // Assert that adding another accelerator block will also result in a diff - Config: testAccContainerNodePool_PartialEmptyGuestAccelerator2(cluster, np), + Config: testAccContainerNodePool_PartialEmptyGuestAccelerator2(cluster, np, networkName, subnetworkName), ExpectNonEmptyPlan: true, PlanOnly: true, }, @@ -1224,6 +1281,8 @@ func TestAccContainerNodePool_shieldedInstanceConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1231,7 +1290,7 @@ func TestAccContainerNodePool_shieldedInstanceConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_shieldedInstanceConfig(cluster, np), + Config: testAccContainerNodePool_shieldedInstanceConfig(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -1249,6 +1308,8 @@ func TestAccContainerNodePool_concurrent(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np1 := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) np2 := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1256,7 +1317,7 @@ func TestAccContainerNodePool_concurrent(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_concurrentCreate(cluster, np1, np2), + Config: testAccContainerNodePool_concurrentCreate(cluster, np1, np2, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np1", @@ -1269,7 +1330,7 @@ func TestAccContainerNodePool_concurrent(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_concurrentUpdate(cluster, np1, np2), + Config: testAccContainerNodePool_concurrentUpdate(cluster, np1, np2, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np1", @@ -1286,26 +1347,28 @@ func TestAccContainerNodePool_concurrent(t *testing.T) { } func TestAccContainerNodePool_withSoleTenantConfig(t *testing.T) { - t.Parallel() + t.Parallel() - cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) - np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) + np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) - acctest.VcrTest(t, resource.TestCase{ - PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), - CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), - Steps: []resource.TestStep{ - { - Config: testAccContainerNodePool_withSoleTenantConfig(cluster, np), - }, - { - ResourceName: "google_container_node_pool.with_sole_tenant_config", - ImportState: true, - ImportStateVerify: true, - }, - }, - }) + acctest.VcrTest(t, resource.TestCase{ + PreCheck: func() { acctest.AccTestPreCheck(t) }, + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), + Steps: []resource.TestStep{ + { + Config: testAccContainerNodePool_withSoleTenantConfig(cluster, np, networkName, subnetworkName), + }, + { + ResourceName: "google_container_node_pool.with_sole_tenant_config", + ImportState: true, + ImportStateVerify: true, + }, + }, + }) } @@ -1316,6 +1379,8 @@ func TestAccContainerNodePool_ephemeralStorageConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1323,7 +1388,7 @@ func TestAccContainerNodePool_ephemeralStorageConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_ephemeralStorageConfig(cluster, np), + Config: testAccContainerNodePool_ephemeralStorageConfig(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -1334,13 +1399,15 @@ func TestAccContainerNodePool_ephemeralStorageConfig(t *testing.T) { }) } -func testAccContainerNodePool_ephemeralStorageConfig(cluster, np string) string { +func testAccContainerNodePool_ephemeralStorageConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1356,7 +1423,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } <% end %> @@ -1365,6 +1432,8 @@ func TestAccContainerNodePool_ephemeralStorageLocalSsdConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1372,7 +1441,7 @@ func TestAccContainerNodePool_ephemeralStorageLocalSsdConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_ephemeralStorageLocalSsdConfig(cluster, np), + Config: testAccContainerNodePool_ephemeralStorageLocalSsdConfig(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1383,7 +1452,7 @@ func TestAccContainerNodePool_ephemeralStorageLocalSsdConfig(t *testing.T) { }) } -func testAccContainerNodePool_ephemeralStorageLocalSsdConfig(cluster, np string) string { +func testAccContainerNodePool_ephemeralStorageLocalSsdConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -1397,6 +1466,8 @@ resource "google_container_cluster" "cluster" { min_master_version = data.google_container_engine_versions.central1a.latest_master_version initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1412,7 +1483,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func TestAccContainerNodePool_localNvmeSsdBlockConfig(t *testing.T) { @@ -1420,6 +1491,8 @@ func TestAccContainerNodePool_localNvmeSsdBlockConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1427,7 +1500,7 @@ func TestAccContainerNodePool_localNvmeSsdBlockConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_localNvmeSsdBlockConfig(cluster, np), + Config: testAccContainerNodePool_localNvmeSsdBlockConfig(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1438,7 +1511,7 @@ func TestAccContainerNodePool_localNvmeSsdBlockConfig(t *testing.T) { }) } -func testAccContainerNodePool_localNvmeSsdBlockConfig(cluster, np string) string { +func testAccContainerNodePool_localNvmeSsdBlockConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -1452,6 +1525,8 @@ resource "google_container_cluster" "cluster" { min_master_version = data.google_container_engine_versions.central1a.latest_master_version initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1467,7 +1542,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func TestAccContainerNodePool_gcfsConfig(t *testing.T) { @@ -1475,6 +1550,8 @@ func TestAccContainerNodePool_gcfsConfig(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1482,7 +1559,7 @@ func TestAccContainerNodePool_gcfsConfig(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccContainerNodePool_gcfsConfig(cluster, np), + Config: testAccContainerNodePool_gcfsConfig(cluster, np, networkName, subnetworkName), }, resource.TestStep{ ResourceName: "google_container_node_pool.np", @@ -1493,13 +1570,15 @@ func TestAccContainerNodePool_gcfsConfig(t *testing.T) { }) } -func testAccContainerNodePool_gcfsConfig(cluster, np string) string { +func testAccContainerNodePool_gcfsConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1516,7 +1595,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func TestAccContainerNodePool_gvnic(t *testing.T) { @@ -1524,6 +1603,8 @@ func TestAccContainerNodePool_gvnic(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1531,7 +1612,7 @@ func TestAccContainerNodePool_gvnic(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_gvnic(cluster, np), + Config: testAccContainerNodePool_gvnic(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -1542,13 +1623,15 @@ func TestAccContainerNodePool_gvnic(t *testing.T) { }) } -func testAccContainerNodePool_gvnic(cluster, np string) string { +func testAccContainerNodePool_gvnic(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1565,7 +1648,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func TestAccContainerNodePool_fastSocket(t *testing.T) { @@ -1573,6 +1656,8 @@ func TestAccContainerNodePool_fastSocket(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1580,7 +1665,7 @@ func TestAccContainerNodePool_fastSocket(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_fastSocket(cluster, np, true), + Config: testAccContainerNodePool_fastSocket(cluster, np, networkName, subnetworkName, true), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "node_config.0.fast_socket.0.enabled", "true"), @@ -1592,7 +1677,7 @@ func TestAccContainerNodePool_fastSocket(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_fastSocket(cluster, np, false), + Config: testAccContainerNodePool_fastSocket(cluster, np, networkName, subnetworkName, false), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "node_config.0.fast_socket.0.enabled", "false"), @@ -1607,7 +1692,7 @@ func TestAccContainerNodePool_fastSocket(t *testing.T) { }) } -func testAccContainerNodePool_fastSocket(cluster, np string, enabled bool) string { +func testAccContainerNodePool_fastSocket(cluster, np, networkName, subnetworkName string, enabled bool) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -1615,6 +1700,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = "1.25" deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1638,7 +1725,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np, enabled) +`, cluster, networkName, subnetworkName, np, enabled) } func TestAccContainerNodePool_compactPlacement(t *testing.T) { @@ -1646,6 +1733,8 @@ func TestAccContainerNodePool_compactPlacement(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1653,7 +1742,7 @@ func TestAccContainerNodePool_compactPlacement(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_compactPlacement(cluster, np, "COMPACT"), + Config: testAccContainerNodePool_compactPlacement(cluster, np, "COMPACT", networkName, subnetworkName), }, { ResourceName: "google_container_cluster.cluster", @@ -1665,13 +1754,15 @@ func TestAccContainerNodePool_compactPlacement(t *testing.T) { }) } -func testAccContainerNodePool_compactPlacement(cluster, np, placementType string) string { +func testAccContainerNodePool_compactPlacement(cluster, np, placementType, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1687,7 +1778,7 @@ resource "google_container_node_pool" "np" { type = "%s" } } -`, cluster, np, placementType) +`, cluster, networkName, subnetworkName, np, placementType) } func TestAccContainerNodePool_customPlacementPolicy(t *testing.T) { @@ -1696,6 +1787,8 @@ func TestAccContainerNodePool_customPlacementPolicy(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) policy := fmt.Sprintf("tf-test-policy-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1703,7 +1796,7 @@ func TestAccContainerNodePool_customPlacementPolicy(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_customPlacementPolicy(cluster, np, policy), + Config: testAccContainerNodePool_customPlacementPolicy(cluster, np, policy, networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.np", "node_config.0.machine_type", "c2-standard-4"), resource.TestCheckResourceAttr("google_container_node_pool.np", "placement_policy.0.policy_name", policy), @@ -1719,13 +1812,15 @@ func TestAccContainerNodePool_customPlacementPolicy(t *testing.T) { }) } -func testAccContainerNodePool_customPlacementPolicy(cluster, np, policyName string) string { +func testAccContainerNodePool_customPlacementPolicy(cluster, np, policyName, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_compute_resource_policy" "policy" { @@ -1751,7 +1846,7 @@ resource "google_container_node_pool" "np" { policy_name = google_compute_resource_policy.policy.name } } -`, cluster, policyName, np) +`, cluster, networkName, subnetworkName, policyName, np) } func TestAccContainerNodePool_threadsPerCore(t *testing.T) { @@ -1759,6 +1854,8 @@ func TestAccContainerNodePool_threadsPerCore(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -1766,7 +1863,7 @@ func TestAccContainerNodePool_threadsPerCore(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_threadsPerCore(cluster, np, 1), + Config: testAccContainerNodePool_threadsPerCore(cluster, np, networkName, subnetworkName, 1), }, { ResourceName: "google_container_cluster.cluster", @@ -1778,13 +1875,15 @@ func TestAccContainerNodePool_threadsPerCore(t *testing.T) { }) } -func testAccContainerNodePool_threadsPerCore(cluster, np string, threadsPerCore int) string { +func testAccContainerNodePool_threadsPerCore(cluster, np, networkName, subnetworkName string, threadsPerCore int) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" node_config { machine_type = "c2-standard-4" @@ -1807,7 +1906,7 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, threadsPerCore, np, threadsPerCore) +`, cluster, networkName, subnetworkName, threadsPerCore, np, threadsPerCore) } func testAccCheckContainerNodePoolDestroyProducer(t *testing.T) func(s *terraform.State) error { @@ -1846,7 +1945,7 @@ func testAccCheckContainerNodePoolDestroyProducer(t *testing.T) func(s *terrafor } } -func testAccContainerNodePool_basic(cluster, np string) string { +func testAccContainerNodePool_basic(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` provider "google" { alias = "user-project-override" @@ -1858,6 +1957,8 @@ resource "google_container_cluster" "cluster" { location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1867,16 +1968,18 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name initial_node_count = 2 } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_withLoggingVariant(cluster, np, loggingVariant string) string { +func testAccContainerNodePool_withLoggingVariant(cluster, np, loggingVariant, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "with_logging_variant" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_logging_variant" { @@ -1888,10 +1991,10 @@ resource "google_container_node_pool" "with_logging_variant" { logging_variant = "%s" } } -`, cluster, np, loggingVariant) +`, cluster, networkName, subnetworkName, np, loggingVariant) } -func testAccContainerNodePool_basicWithClusterId(cluster, np string) string { +func testAccContainerNodePool_basicWithClusterId(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` provider "google" { alias = "user-project-override" @@ -1903,6 +2006,8 @@ resource "google_container_cluster" "cluster" { location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -1911,7 +2016,7 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.id initial_node_count = 2 } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func testAccContainerNodePool_nodeLocations(cluster, np, network string) string { @@ -2031,13 +2136,15 @@ resource "google_container_node_pool" "np" { `, network, cluster, np) } -func testAccContainerNodePool_regionalClusters(cluster, np string) string { +func testAccContainerNodePool_regionalClusters(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2046,16 +2153,18 @@ resource "google_container_node_pool" "np" { location = "us-central1" initial_node_count = 2 } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_namePrefix(cluster, np string) string { +func testAccContainerNodePool_namePrefix(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2064,16 +2173,18 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name initial_node_count = 2 } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_noName(cluster string) string { +func testAccContainerNodePool_noName(cluster, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2081,16 +2192,18 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name initial_node_count = 2 } -`, cluster) +`, cluster, networkName, subnetworkName) } -func testAccContainerNodePool_regionalAutoscaling(cluster, np string) string { +func testAccContainerNodePool_regionalAutoscaling(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2103,10 +2216,10 @@ resource "google_container_node_pool" "np" { max_node_count = 3 } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_totalSize(cluster, np string) string { +func testAccContainerNodePool_totalSize(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -2114,6 +2227,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 3 min_master_version = "1.27" deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2127,10 +2242,10 @@ resource "google_container_node_pool" "np" { location_policy = "BALANCED" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_updateTotalSize(cluster, np string) string { +func testAccContainerNodePool_updateTotalSize(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -2138,6 +2253,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 3 min_master_version = "1.27" deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2151,11 +2268,11 @@ resource "google_container_node_pool" "np" { location_policy = "ANY" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_basicTotalSize(cluster, np string) string { +func testAccContainerNodePool_basicTotalSize(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` provider "google" { alias = "user-project-override" @@ -2168,6 +2285,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 3 min_master_version = "1.27" deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2177,16 +2296,18 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name initial_node_count = 2 } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_autoscaling(cluster, np string) string { +func testAccContainerNodePool_autoscaling(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2199,16 +2320,18 @@ resource "google_container_node_pool" "np" { max_node_count = 3 } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_updateAutoscaling(cluster, np string) string { +func testAccContainerNodePool_updateAutoscaling(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2221,10 +2344,10 @@ resource "google_container_node_pool" "np" { max_node_count = 5 } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_additionalZones(cluster, nodePool string) string { +func testAccContainerNodePool_additionalZones(cluster, nodePool, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -2236,6 +2359,8 @@ resource "google_container_cluster" "cluster" { "us-central1-c", ] deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2244,10 +2369,10 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name node_count = 2 } -`, cluster, nodePool) +`, cluster, networkName, subnetworkName, nodePool) } -func testAccContainerNodePool_resize(cluster, nodePool string) string { +func testAccContainerNodePool_resize(cluster, nodePool, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -2259,6 +2384,8 @@ resource "google_container_cluster" "cluster" { "us-central1-c", ] deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2267,10 +2394,10 @@ resource "google_container_node_pool" "np" { cluster = google_container_cluster.cluster.name node_count = 3 } -`, cluster, nodePool) +`, cluster, networkName, subnetworkName, nodePool) } -func testAccContainerNodePool_withManagement(cluster, nodePool, management string) string { +func testAccContainerNodePool_withManagement(cluster, nodePool, management, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" @@ -2280,6 +2407,8 @@ resource "google_container_cluster" "cluster" { channel = "UNSPECIFIED" } deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np_with_management" { @@ -2296,16 +2425,18 @@ resource "google_container_node_pool" "np_with_management" { oauth_scopes = ["compute-rw", "storage-ro", "logging-write", "monitoring"] } } -`, cluster, nodePool, management) +`, cluster, networkName, subnetworkName, nodePool, management) } -func testAccContainerNodePool_withNodeConfig(cluster, nodePool string) string { +func testAccContainerNodePool_withNodeConfig(cluster, nodePool, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np_with_node_config" { @@ -2351,16 +2482,18 @@ resource "google_container_node_pool" "np_with_node_config" { } } } -`, cluster, nodePool) +`, cluster, networkName, subnetworkName, nodePool) } -func testAccContainerNodePool_withNodeConfigUpdate(cluster, nodePool string) string { +func testAccContainerNodePool_withNodeConfigUpdate(cluster, nodePool, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np_with_node_config" { @@ -2408,10 +2541,10 @@ resource "google_container_node_pool" "np_with_node_config" { } } } -`, cluster, nodePool) +`, cluster, networkName, subnetworkName, nodePool) } -func testAccContainerNodePool_withTaintsUpdate(cluster, np string) string { +func testAccContainerNodePool_withTaintsUpdate(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` provider "google" { alias = "user-project-override" @@ -2423,6 +2556,8 @@ resource "google_container_cluster" "cluster" { location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2442,10 +2577,10 @@ resource "google_container_node_pool" "np" { } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_withReservationAffinity(cluster, np string) string { +func testAccContainerNodePool_withReservationAffinity(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2457,6 +2592,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_reservation_affinity" { @@ -2475,10 +2612,10 @@ resource "google_container_node_pool" "with_reservation_affinity" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_withReservationAffinitySpecific(cluster, reservation, np string) string { +func testAccContainerNodePool_withReservationAffinitySpecific(cluster, reservation, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2490,6 +2627,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_compute_reservation" "gce_reservation" { @@ -2526,11 +2665,11 @@ resource "google_container_node_pool" "with_reservation_affinity" { } } } -`, cluster, reservation, np) +`, cluster, networkName, subnetworkName, reservation, np) } -func testAccContainerNodePool_withWorkloadMetadataConfig(cluster, np string) string { +func testAccContainerNodePool_withWorkloadMetadataConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2542,6 +2681,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_workload_metadata_config" { @@ -2561,10 +2702,10 @@ resource "google_container_node_pool" "with_workload_metadata_config" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_withWorkloadMetadataConfig_gkeMetadata(projectID, cluster, np string) string { +func testAccContainerNodePool_withWorkloadMetadataConfig_gkeMetadata(projectID, cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_project" "project" { project_id = "%s" @@ -2584,6 +2725,8 @@ resource "google_container_cluster" "cluster" { workload_pool = "${data.google_project.project.project_id}.svc.id.goog" } deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_workload_metadata_config" { @@ -2602,11 +2745,11 @@ resource "google_container_node_pool" "with_workload_metadata_config" { } } } -`, projectID, cluster, np) +`, projectID, cluster, networkName, subnetworkName, np) } <% unless version.nil? || version == 'ga' -%> -func testAccContainerNodePool_withSandboxConfig(cluster, np string) string { +func testAccContainerNodePool_withSandboxConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2618,6 +2761,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_sandbox_config" { @@ -2643,11 +2788,11 @@ resource "google_container_node_pool" "with_sandbox_config" { ] } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } <% end -%> -func testAccContainerNodePool_withKubeletConfig(cluster, np, policy, period string, quota bool, podPidsLimit int) string { +func testAccContainerNodePool_withKubeletConfig(cluster, np, policy, period, networkName, subnetworkName string, quota bool, podPidsLimit int) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2659,6 +2804,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } # cpu_manager_policy & cpu_cfs_quota_period cannot be blank if cpu_cfs_quota is set to true @@ -2683,10 +2830,10 @@ resource "google_container_node_pool" "with_kubelet_config" { logging_variant = "DEFAULT" } } -`, cluster, np, policy, quota, period, podPidsLimit) +`, cluster, networkName, subnetworkName, np, policy, quota, period, podPidsLimit) } -func testAccContainerNodePool_withLinuxNodeConfig(cluster, np string, tcpMem string) string { +func testAccContainerNodePool_withLinuxNodeConfig(cluster, np, tcpMem, networkName, subnetworkName string) string { linuxNodeConfig := ` linux_node_config { sysctls = {} @@ -2721,6 +2868,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_linux_node_config" { @@ -2737,10 +2886,10 @@ resource "google_container_node_pool" "with_linux_node_config" { ] } } -`, cluster, np, linuxNodeConfig) +`, cluster, networkName, subnetworkName, np, linuxNodeConfig) } -func testAccContainerNodePool_withCgroupMode(cluster, np string, mode string) string { +func testAccContainerNodePool_withCgroupMode(cluster, np, mode, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -2752,6 +2901,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -2770,7 +2921,7 @@ resource "google_container_node_pool" "np" { ] } } -`, cluster, np, mode) +`, cluster, networkName, subnetworkName, np, mode) } func testAccContainerNodePool_withNetworkConfig(cluster, np, network string) string { @@ -3002,7 +3153,7 @@ resource "google_container_node_pool" "with_multi_nic" { <% end -%> <% unless version.nil? || version == 'ga' -%> -func testAccContainerNodePool_withBootDiskKmsKey(cluster, np string) string { +func testAccContainerNodePool_withBootDiskKmsKey(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -3025,6 +3176,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_boot_disk_kms_key" { @@ -3042,7 +3195,7 @@ resource "google_container_node_pool" "with_boot_disk_kms_key" { ] } } -`, cluster, cluster, cluster, np) +`, cluster, cluster, cluster, networkName, subnetworkName, np) } <% end -%> @@ -3071,7 +3224,7 @@ upgrade_settings { `, maxSurge, maxUnavailable, strategy) } -func testAccContainerNodePool_withUpgradeSettings(clusterName string, nodePoolName string, maxSurge int, maxUnavailable int, strategy string, nodePoolSoakDuration string, batchNodeCount int, batchPercentage float64, batchSoakDuration string) string { +func testAccContainerNodePool_withUpgradeSettings(clusterName, nodePoolName, networkName, subnetworkName string, maxSurge int, maxUnavailable int, strategy string, nodePoolSoakDuration string, batchNodeCount int, batchPercentage float64, batchSoakDuration string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1" { location = "us-central1" @@ -3083,6 +3236,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = "${data.google_container_engine_versions.central1.latest_master_version}" deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_upgrade_settings" { @@ -3092,10 +3247,10 @@ resource "google_container_node_pool" "with_upgrade_settings" { initial_node_count = 1 %s } -`, clusterName, nodePoolName, makeUpgradeSettings(maxSurge, maxUnavailable, strategy, nodePoolSoakDuration, batchNodeCount, batchPercentage, batchSoakDuration)) +`, clusterName, networkName, subnetworkName, nodePoolName, makeUpgradeSettings(maxSurge, maxUnavailable, strategy, nodePoolSoakDuration, batchNodeCount, batchPercentage, batchSoakDuration)) } -func testAccContainerNodePool_withGPU(cluster, np string) string { +func testAccContainerNodePool_withGPU(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1c" { location = "us-central1-c" @@ -3107,6 +3262,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1c.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np_with_gpu" { @@ -3147,16 +3304,18 @@ resource "google_container_node_pool" "np_with_gpu" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_withNodeConfigScopeAlias(cluster, np string) string { +func testAccContainerNodePool_withNodeConfigScopeAlias(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np_with_node_config_scope_alias" { @@ -3170,10 +3329,10 @@ resource "google_container_node_pool" "np_with_node_config_scope_alias" { oauth_scopes = ["compute-rw", "storage-ro", "logging-write", "monitoring"] } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_version(cluster, np string) string { +func testAccContainerNodePool_version(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -3185,6 +3344,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3195,10 +3356,10 @@ resource "google_container_node_pool" "np" { version = data.google_container_engine_versions.central1a.valid_node_versions[1] } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_updateVersion(cluster, np string) string { +func testAccContainerNodePool_updateVersion(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -3210,6 +3371,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3220,16 +3383,18 @@ resource "google_container_node_pool" "np" { version = data.google_container_engine_versions.central1a.valid_node_versions[0] } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_012_ConfigModeAttr1(cluster, np string) string { +func testAccContainerNodePool_012_ConfigModeAttr1(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-f" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3246,16 +3411,18 @@ resource "google_container_node_pool" "np" { machine_type = "n1-highmem-4" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_012_ConfigModeAttr2(cluster, np string) string { +func testAccContainerNodePool_012_ConfigModeAttr2(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-f" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3268,16 +3435,18 @@ resource "google_container_node_pool" "np" { guest_accelerator = [] } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_EmptyGuestAccelerator(cluster, np string) string { +func testAccContainerNodePool_EmptyGuestAccelerator(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-f" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3294,16 +3463,18 @@ resource "google_container_node_pool" "np" { machine_type = "n1-highmem-4" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np string, count int) string { +func testAccContainerNodePool_PartialEmptyGuestAccelerator(cluster, np, networkName, subnetworkName string, count int) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-f" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3325,16 +3496,18 @@ resource "google_container_node_pool" "np" { machine_type = "n1-highmem-4" } } -`, cluster, np, count) +`, cluster, networkName, subnetworkName, np, count) } -func testAccContainerNodePool_PartialEmptyGuestAccelerator2(cluster, np string) string { +func testAccContainerNodePool_PartialEmptyGuestAccelerator2(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-f" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3361,16 +3534,18 @@ resource "google_container_node_pool" "np" { machine_type = "n1-highmem-4" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_shieldedInstanceConfig(cluster, np string) string { +func testAccContainerNodePool_shieldedInstanceConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { @@ -3385,16 +3560,18 @@ resource "google_container_node_pool" "np" { } } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } -func testAccContainerNodePool_concurrentCreate(cluster, np1, np2 string) string { +func testAccContainerNodePool_concurrentCreate(cluster, np1, np2, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np1" { @@ -3410,16 +3587,18 @@ resource "google_container_node_pool" "np2" { cluster = google_container_cluster.cluster.name initial_node_count = 2 } -`, cluster, np1, np2) +`, cluster, networkName, subnetworkName, np1, np2) } -func testAccContainerNodePool_concurrentUpdate(cluster, np1, np2 string) string { +func testAccContainerNodePool_concurrentUpdate(cluster, np1, np2, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 3 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np1" { @@ -3437,10 +3616,10 @@ resource "google_container_node_pool" "np2" { initial_node_count = 2 version = "1.27.3-gke.1700" } -`, cluster, np1, np2) +`, cluster, networkName, subnetworkName, np1, np2) } -func testAccContainerNodePool_withSoleTenantConfig(cluster, np string) string { +func testAccContainerNodePool_withSoleTenantConfig(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" @@ -3465,6 +3644,8 @@ resource "google_container_cluster" "cluster" { initial_node_count = 1 min_master_version = data.google_container_engine_versions.central1a.latest_master_version deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_sole_tenant_config" { @@ -3487,7 +3668,7 @@ resource "google_container_node_pool" "with_sole_tenant_config" { ] } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { @@ -3495,6 +3676,8 @@ func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { clusterName := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-cluster-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -3502,7 +3685,7 @@ func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withConfidentialNodes(clusterName, np), + Config: testAccContainerNodePool_withConfidentialNodes(clusterName, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -3510,7 +3693,7 @@ func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_disableConfidentialNodes(clusterName, np), + Config: testAccContainerNodePool_disableConfidentialNodes(clusterName, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -3518,7 +3701,7 @@ func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { ImportStateVerify: true, }, { - Config: testAccContainerNodePool_withConfidentialNodes(clusterName, np), + Config: testAccContainerNodePool_withConfidentialNodes(clusterName, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.np", @@ -3529,11 +3712,11 @@ func TestAccContainerNodePool_withConfidentialNodes(t *testing.T) { }) } -func testAccContainerNodePool_withConfidentialNodes(clusterName string, np string) string { +func testAccContainerNodePool_withConfidentialNodes(clusterName, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" - location = "asia-east1-c" + location = "us-central1-a" initial_node_count = 1 node_config { confidential_nodes { @@ -3542,11 +3725,13 @@ resource "google_container_cluster" "cluster" { machine_type = "n2-standard-2" } deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { name = "%s" - location = "asia-east1-c" + location = "us-central1-a" cluster = google_container_cluster.cluster.name initial_node_count = 1 node_config { @@ -3556,14 +3741,14 @@ resource "google_container_node_pool" "np" { } } } -`, clusterName, np) +`, clusterName, networkName, subnetworkName, np) } -func testAccContainerNodePool_disableConfidentialNodes(clusterName string, np string) string { +func testAccContainerNodePool_disableConfidentialNodes(clusterName, np, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" - location = "asia-east1-c" + location = "us-central1-a" initial_node_count = 1 node_config { confidential_nodes { @@ -3572,11 +3757,13 @@ resource "google_container_cluster" "cluster" { machine_type = "n2-standard-2" } deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "np" { name = "%s" - location = "asia-east1-c" + location = "us-central1-a" cluster = google_container_cluster.cluster.name initial_node_count = 1 node_config { @@ -3586,7 +3773,7 @@ resource "google_container_node_pool" "np" { } } } -`, clusterName, np) +`, clusterName, networkName, subnetworkName, np) } func TestAccContainerNodePool_tpuTopology(t *testing.T) { @@ -3596,6 +3783,8 @@ func TestAccContainerNodePool_tpuTopology(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np1 := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) np2 := fmt.Sprintf("tf-test-nodepool-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -3603,7 +3792,7 @@ func TestAccContainerNodePool_tpuTopology(t *testing.T) { CheckDestroy: testAccCheckContainerNodePoolDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_tpuTopology(cluster, np1, np2, "2x2x2"), + Config: testAccContainerNodePool_tpuTopology(cluster, np1, np2, "2x2x2", networkName, subnetworkName), Check: resource.ComposeTestCheckFunc( resource.TestCheckResourceAttr("google_container_node_pool.regular_pool", "node_config.0.machine_type", "n1-standard-4"), resource.TestCheckResourceAttr("google_container_node_pool.with_tpu_topology", "node_config.0.machine_type", "ct4p-hightpu-4t"), @@ -3620,30 +3809,31 @@ func TestAccContainerNodePool_tpuTopology(t *testing.T) { }) } -func testAccContainerNodePool_tpuTopology(cluster, np1, np2, tpuTopology string) string { +func testAccContainerNodePool_tpuTopology(cluster, np1, np2, tpuTopology, networkName, subnetworkName string) string { return fmt.Sprintf(` resource "google_container_cluster" "cluster" { name = "%s" - location = "us-central2-b" + location = "us-central1-a" initial_node_count = 1 deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "regular_pool" { - name = "%s" - location = "us-central2-b" - cluster = google_container_cluster.cluster.name - initial_node_count = 1 - - node_config { - machine_type = "n1-standard-4" + name = "%s" + location = "us-central1-a" + cluster = google_container_cluster.cluster.name + initial_node_count = 1 - } + node_config { + machine_type = "n1-standard-4" } +} resource "google_container_node_pool" "with_tpu_topology" { name = "%s" - location = "us-central2-b" + location = "us-central1-a" cluster = google_container_cluster.cluster.name initial_node_count = 2 @@ -3652,11 +3842,11 @@ resource "google_container_node_pool" "with_tpu_topology" { } placement_policy { - type = "COMPACT" - tpu_topology = "%s" + type = "COMPACT" + tpu_topology = "%s" } } -`, cluster, np1, np2, tpuTopology) +`, cluster, networkName, subnetworkName, np1, np2, tpuTopology) } <% unless version == 'ga' -%> @@ -3722,6 +3912,8 @@ func TestAccContainerNodePool_withConfidentialBootDisk(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) kms := acctest.BootstrapKMSKeyInLocation(t, "us-central1") + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) if acctest.BootstrapPSARole(t, "service-", "compute-system", "roles/cloudkms.cryptoKeyEncrypterDecrypter") { t.Fatal("Stopping the test because a role was added to the policy.") @@ -3733,7 +3925,7 @@ func TestAccContainerNodePool_withConfidentialBootDisk(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withConfidentialBootDisk(cluster, np, kms.CryptoKey.Name), + Config: testAccContainerNodePool_withConfidentialBootDisk(cluster, np, kms.CryptoKey.Name, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.with_confidential_boot_disk", @@ -3744,38 +3936,40 @@ func TestAccContainerNodePool_withConfidentialBootDisk(t *testing.T) { }) } -func testAccContainerNodePool_withConfidentialBootDisk(cluster, np string, kmsKeyName string) string { +func testAccContainerNodePool_withConfidentialBootDisk(cluster, np string, kmsKeyName, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" } resource "google_container_cluster" "cluster" { - name = "%s" - location = "us-central1-a" - initial_node_count = 1 - min_master_version = data.google_container_engine_versions.central1a.latest_master_version - deletion_protection = false + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + min_master_version = data.google_container_engine_versions.central1a.latest_master_version + deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "with_confidential_boot_disk" { - name = "%s" - location = "us-central1-a" - cluster = google_container_cluster.cluster.name - -node_config { - image_type = "COS_CONTAINERD" - boot_disk_kms_key = "%s" - oauth_scopes = [ + name = "%s" + location = "us-central1-a" + cluster = google_container_cluster.cluster.name + + node_config { + image_type = "COS_CONTAINERD" + boot_disk_kms_key = "%s" + oauth_scopes = [ "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring", ] - enable_confidential_storage = true - machine_type = "n2-standard-2" - disk_type = "hyperdisk-balanced" + enable_confidential_storage = true + machine_type = "n2-standard-2" + disk_type = "hyperdisk-balanced" } } -`, cluster, np, kmsKeyName) +`, cluster, networkName, subnetworkName, np, kmsKeyName) } func TestAccContainerNodePool_withoutConfidentialBootDisk(t *testing.T) { @@ -3783,6 +3977,8 @@ func TestAccContainerNodePool_withoutConfidentialBootDisk(t *testing.T) { cluster := fmt.Sprintf("tf-test-cluster-%s", acctest.RandString(t, 10)) np := fmt.Sprintf("tf-test-np-%s", acctest.RandString(t, 10)) + networkName := acctest.BootstrapSharedTestNetwork(t, "gke-cluster") + subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName) acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, @@ -3790,7 +3986,7 @@ func TestAccContainerNodePool_withoutConfidentialBootDisk(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerNodePool_withoutConfidentialBootDisk(cluster, np), + Config: testAccContainerNodePool_withoutConfidentialBootDisk(cluster, np, networkName, subnetworkName), }, { ResourceName: "google_container_node_pool.without_confidential_boot_disk", @@ -3801,36 +3997,38 @@ func TestAccContainerNodePool_withoutConfidentialBootDisk(t *testing.T) { }) } -func testAccContainerNodePool_withoutConfidentialBootDisk(cluster, np string) string { +func testAccContainerNodePool_withoutConfidentialBootDisk(cluster, np, networkName, subnetworkName string) string { return fmt.Sprintf(` data "google_container_engine_versions" "central1a" { location = "us-central1-a" } resource "google_container_cluster" "cluster" { - name = "%s" - location = "us-central1-a" - initial_node_count = 1 - min_master_version = data.google_container_engine_versions.central1a.latest_master_version - deletion_protection = false + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + min_master_version = data.google_container_engine_versions.central1a.latest_master_version + deletion_protection = false + network = "%s" + subnetwork = "%s" } resource "google_container_node_pool" "without_confidential_boot_disk" { - name = "%s" - location = "us-central1-a" - cluster = google_container_cluster.cluster.name - - node_config { - image_type = "COS_CONTAINERD" - oauth_scopes = [ + name = "%s" + location = "us-central1-a" + cluster = google_container_cluster.cluster.name + + node_config { + image_type = "COS_CONTAINERD" + oauth_scopes = [ "https://www.googleapis.com/auth/logging.write", "https://www.googleapis.com/auth/monitoring", ] - enable_confidential_storage = false - machine_type = "n2-standard-2" - disk_type = "pd-balanced" + enable_confidential_storage = false + machine_type = "n2-standard-2" + disk_type = "pd-balanced" } } -`, cluster, np) +`, cluster, networkName, subnetworkName, np) } <% end -%> \ No newline at end of file