Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: anthos modules remote fleet project #1995

1 change: 1 addition & 0 deletions modules/acm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ data "google_client_config" "default" {}
| gcp\_service\_account\_email | The service account email for authentication when `secret_type` is `gcpServiceAccount`. | `string` | `null` | no |
| 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 |
| https\_proxy | URL for the HTTPS proxy to be used when communicating with the Git repo. | `string` | `null` | no |
| hub\_project\_id | The project in which the GKE Hub belongs. Defaults to GKE cluster project\_id. | `string` | `""` | no |
| install\_template\_library | Whether to install the default Policy Controller template library | `bool` | `true` | no |
| location | GCP location used to reach cluster. | `string` | n/a | yes |
| metrics\_gcp\_sa\_name | The name of the Google service account for ACM metrics writing | `string` | `"acm-metrics-writer"` | no |
Expand Down
4 changes: 2 additions & 2 deletions modules/acm/feature.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "google_gke_hub_feature" "acm" {
provider = google-beta

name = "configmanagement"
project = var.project_id
project = coalesce(var.hub_project_id, var.project_id)
location = "global"
}

Expand All @@ -33,7 +33,7 @@ resource "google_gke_hub_feature_membership" "main" {
feature = "configmanagement"

membership = module.registration.cluster_membership_id
project = var.project_id
project = coalesce(var.hub_project_id, var.project_id)

configmanagement {
version = var.configmanagement_version
Expand Down
1 change: 1 addition & 0 deletions modules/acm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module "registration" {

cluster_name = var.cluster_name
project_id = var.project_id
hub_project_id = var.hub_project_id
location = var.location
enable_fleet_registration = var.enable_fleet_registration
membership_name = var.cluster_membership_id
Expand Down
6 changes: 6 additions & 0 deletions modules/acm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "project_id" {
type = string
}

variable "hub_project_id" {
CPL-markus marked this conversation as resolved.
Show resolved Hide resolved
description = "The project in which the GKE Hub belongs. Defaults to GKE cluster project_id."
type = string
default = ""
}

variable "location" {
description = "GCP location used to reach cluster."
type = string
Expand Down