diff --git a/modules/acm/README.md b/modules/acm/README.md index 88249e532..590848552 100644 --- a/modules/acm/README.md +++ b/modules/acm/README.md @@ -66,6 +66,7 @@ data "google_client_config" "default" {} |------|-------------|------|---------|:--------:| | cluster\_membership\_id | The cluster membership ID. If unset, one will be autogenerated. | `string` | `""` | no | | cluster\_name | GCP cluster Name used to reach cluster and which becomes the cluster name in the Config Sync kubernetes custom resource. | `string` | n/a | yes | +| configmanagement\_version | Version of ACM. | `string` | `""` | no | | create\_ssh\_key | Controls whether a key will be generated for Git authentication | `bool` | `true` | no | | enable\_fleet\_feature | Whether to enable the ACM feature on the fleet. | `bool` | `true` | no | | enable\_fleet\_registration | Whether to create a new membership. | `bool` | `true` | no | @@ -87,6 +88,7 @@ data "google_client_config" "default" {} | Name | Description | |------|-------------| +| configmanagement\_version | Version of ACM installed. | | git\_creds\_public | Public key of SSH keypair to allow the Anthos Config Management Operator to authenticate to your Git repository. | | wait | An output to use when you want to depend on cmd finishing | diff --git a/modules/acm/feature.tf b/modules/acm/feature.tf index e80df8368..3b523ffb6 100644 --- a/modules/acm/feature.tf +++ b/modules/acm/feature.tf @@ -36,7 +36,7 @@ resource "google_gke_hub_feature_membership" "main" { project = var.project_id configmanagement { - version = "1.11.0" + version = var.configmanagement_version config_sync { source_format = var.source_format != "" ? var.source_format : null diff --git a/modules/acm/outputs.tf b/modules/acm/outputs.tf index 316bea10c..063d5f171 100644 --- a/modules/acm/outputs.tf +++ b/modules/acm/outputs.tf @@ -19,6 +19,11 @@ output "git_creds_public" { value = var.create_ssh_key ? coalesce(tls_private_key.k8sop_creds.*.public_key_openssh...) : null } +output "configmanagement_version" { + description = "Version of ACM installed." + value = google_gke_hub_feature_membership.main.configmanagement[0].version +} + output "wait" { description = "An output to use when you want to depend on cmd finishing" value = google_gke_hub_feature_membership.main.membership diff --git a/modules/acm/variables.tf b/modules/acm/variables.tf index 040e1468a..6c576bb64 100644 --- a/modules/acm/variables.tf +++ b/modules/acm/variables.tf @@ -47,6 +47,12 @@ variable "cluster_membership_id" { default = "" } +variable "configmanagement_version" { + description = "Version of ACM." + type = string + default = "" +} + # Config Sync variables variable "sync_repo" { description = "ACM Git repo address"