Skip to content

Commit 426f06f

Browse files
authored
feat: support configuring ACM git service account email (#1685)
1 parent 3f27bc2 commit 426f06f

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

Diff for: modules/acm/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ data "google_client_config" "default" {}
8686
| enable\_mutation | Whether to enable mutations for ACM Policy Controller. | `bool` | `false` | no |
8787
| enable\_policy\_controller | Whether to enable the ACM Policy Controller on the cluster | `bool` | `true` | no |
8888
| enable\_referential\_rules | Enables referential constraints which reference another object in it definition and are therefore eventually consistent. | `bool` | `true` | no |
89+
| gcp\_service\_account\_email | The service account email for authentication when `secret_type` is `gcpServiceAccount`. | `string` | `null` | no |
8990
| hierarchy\_controller | Configurations for Hierarchy Controller. See [Hierarchy Controller docs](https://cloud.google.com/anthos-config-management/docs/how-to/installing-hierarchy-controller) for more details | `map(any)` | `null` | no |
9091
| https\_proxy | URL for the HTTPS proxy to be used when communicating with the Git repo. | `string` | `null` | no |
9192
| install\_template\_library | Whether to install the default Policy Controller template library | `bool` | `true` | no |

Diff for: modules/acm/feature.tf

+7-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ resource "google_gke_hub_feature_membership" "main" {
4545
source_format = var.source_format != "" ? var.source_format : null
4646

4747
git {
48-
sync_repo = var.sync_repo
49-
policy_dir = var.policy_dir != "" ? var.policy_dir : null
50-
sync_branch = var.sync_branch != "" ? var.sync_branch : null
51-
sync_rev = var.sync_revision != "" ? var.sync_revision : null
52-
secret_type = var.secret_type
53-
https_proxy = var.https_proxy
48+
sync_repo = var.sync_repo
49+
policy_dir = var.policy_dir != "" ? var.policy_dir : null
50+
sync_branch = var.sync_branch != "" ? var.sync_branch : null
51+
sync_rev = var.sync_revision != "" ? var.sync_revision : null
52+
secret_type = var.secret_type
53+
https_proxy = var.https_proxy
54+
gcp_service_account_email = var.gcp_service_account_email
5455
}
5556
}
5657
}

Diff for: modules/acm/variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ variable "ssh_auth_key" {
109109
default = null
110110
}
111111

112+
variable "gcp_service_account_email" {
113+
description = "The service account email for authentication when `secret_type` is `gcpServiceAccount`."
114+
type = string
115+
default = null
116+
}
117+
112118
variable "enable_config_sync" {
113119
description = "Whether to enable the ACM Config Sync on the cluster"
114120
type = bool

0 commit comments

Comments
 (0)