File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ resource "google_gke_hub_feature_membership" "main" {
33
33
feature = " configmanagement"
34
34
35
35
membership = module. registration . cluster_membership_id
36
- project = var. project_id
36
+ project = try ( var. hub_project_id , var . project_id )
37
37
38
38
configmanagement {
39
39
version = var. configmanagement_version
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ module "registration" {
24
24
25
25
cluster_name = var. cluster_name
26
26
project_id = var. project_id
27
+ hub_project_id = var. hub_project_id
27
28
location = var. location
28
29
enable_fleet_registration = var. enable_fleet_registration
29
30
membership_name = var. cluster_membership_id
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ variable "project_id" {
24
24
type = string
25
25
}
26
26
27
+ variable "hub_project_id" {
28
+ description = " The project in which the GKE Hub belongs. Defaults to GKE cluster project_id."
29
+ type = string
30
+ default = " "
31
+ }
32
+
27
33
variable "location" {
28
34
description = " GCP location used to reach cluster."
29
35
type = string
You can’t perform that action at this time.
0 commit comments