Skip to content

Commit

Permalink
feat: anthos modules remote fleet project (#1995)
Browse files Browse the repository at this point in the history
  • Loading branch information
CPL-markus authored Jul 24, 2024
1 parent 270a5c7 commit 674f772
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions modules/acm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ data "google_client_config" "default" {}
| enable\_mutation | Whether to enable mutations for ACM Policy Controller. | `bool` | `false` | no |
| enable\_policy\_controller | Whether to enable the ACM Policy Controller on the cluster | `bool` | `true` | no |
| enable\_referential\_rules | Enables referential constraints which reference another object in it definition and are therefore eventually consistent. | `bool` | `true` | no |
| fleet\_project\_id | The project in which the GKE fleet is located. Defaults to GKE cluster project\_id. | `string` | `""` | no |
| 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 |
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.fleet_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.fleet_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.fleet_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 "fleet_project_id" {
description = "The project in which the GKE fleet is located. Defaults to GKE cluster project_id."
type = string
default = ""
}

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

0 comments on commit 674f772

Please sign in to comment.