The Google Kubernetes Engine cluster $GKE_CLUSTER_NAME
is running inside of Google Cloud Platform (GCP) project $GCP_PROJECT_NAME
with a matching Terraform configuration stored inside of container_cluster.tf
that can be checked with:
terraform plan
#=>
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
I wish to enable Config Connector (more on that here) for $GKE_CLUSTER_NAME
using Terraform by adding the following arguments to container_cluster.tf
:
resource "google_container_cluster" ". . ." {
addons_config {
config_connector_config {
enabled = true
}
. . .
}
but when I go to plan
this change I encounter the following error:
terraform plan
#=>
╷
│ Error: Unsupported block type
│
│ on container_cluster.tf line 3, in resource "google_container_cluster" ". . .":
│ 3: config_connector_config {
│
│ Blocks of type "config_connector_config" are not expected here.
even though the official documentation, found here, states that config_connector_config
is supported by the addons_config
block.
I am using the latest versions of Terraform and the google
provider:
terraform version
#=>
Terraform v1.0.6
on . . .
+ provider registry.terraform.io/hashicorp/google v3.84.0
What change do I need to make so that I can successfully enable Config Connector for $GKE_CLUSTER_NAME
using Terraform?