Allow fleet project to be specified by the user
This commit is contained in:
parent
fa8990dc76
commit
c3e6a03eaa
|
@ -141,7 +141,8 @@ fleet_features = {
|
||||||
| [folder_id](variables.tf#L163) | Folder used for the GKE project in folders/nnnnnnnnnnn format. | <code>string</code> | ✓ | | |
|
| [folder_id](variables.tf#L163) | Folder used for the GKE project in folders/nnnnnnnnnnn format. | <code>string</code> | ✓ | | |
|
||||||
| [nodepools](variables.tf#L206) | | <code title="map(map(object({ node_count = number node_type = string initial_node_count = number overrides = object({ image_type = string max_pods_per_node = number node_locations = list(string) node_tags = list(string) node_taints = list(string) }) spot = bool })))">map(map(object({…})))</code> | ✓ | | |
|
| [nodepools](variables.tf#L206) | | <code title="map(map(object({ node_count = number node_type = string initial_node_count = number overrides = object({ image_type = string max_pods_per_node = number node_locations = list(string) node_tags = list(string) node_taints = list(string) }) spot = bool })))">map(map(object({…})))</code> | ✓ | | |
|
||||||
| [prefix](variables.tf#L223) | Prefix used for resources that need unique names. | <code>string</code> | ✓ | | |
|
| [prefix](variables.tf#L223) | Prefix used for resources that need unique names. | <code>string</code> | ✓ | | |
|
||||||
| [vpc_config](variables.tf#L235) | Shared VPC project and VPC details. | <code title="object({ host_project_id = string vpc_self_link = string })">object({…})</code> | ✓ | | |
|
| [project_id](variables.tf#L228) | ID of the project that will contain all the clusters. | <code>string</code> | ✓ | | |
|
||||||
|
| [vpc_config](variables.tf#L240) | Shared VPC project and VPC details. | <code title="object({ host_project_id = string vpc_self_link = string })">object({…})</code> | ✓ | | |
|
||||||
| [authenticator_security_group](variables.tf#L21) | Optional group used for Groups for GKE. | <code>string</code> | | <code>null</code> | |
|
| [authenticator_security_group](variables.tf#L21) | Optional group used for Groups for GKE. | <code>string</code> | | <code>null</code> | |
|
||||||
| [cluster_defaults](variables.tf#L32) | Default values for optional cluster configurations. | <code title="object({ cloudrun_config = bool database_encryption_key = string master_authorized_ranges = map(string) max_pods_per_node = number pod_security_policy = bool release_channel = string vertical_pod_autoscaling = bool gcp_filestore_csi_driver_config = bool })">object({…})</code> | | <code title="{ cloudrun_config = false database_encryption_key = null master_authorized_ranges = { rfc1918_1 = "10.0.0.0/8" rfc1918_2 = "172.16.0.0/12" rfc1918_3 = "192.168.0.0/16" } max_pods_per_node = 110 pod_security_policy = false release_channel = "STABLE" vertical_pod_autoscaling = false gcp_filestore_csi_driver_config = false }">{…}</code> | |
|
| [cluster_defaults](variables.tf#L32) | Default values for optional cluster configurations. | <code title="object({ cloudrun_config = bool database_encryption_key = string master_authorized_ranges = map(string) max_pods_per_node = number pod_security_policy = bool release_channel = string vertical_pod_autoscaling = bool gcp_filestore_csi_driver_config = bool })">object({…})</code> | | <code title="{ cloudrun_config = false database_encryption_key = null master_authorized_ranges = { rfc1918_1 = "10.0.0.0/8" rfc1918_2 = "172.16.0.0/12" rfc1918_3 = "192.168.0.0/16" } max_pods_per_node = 110 pod_security_policy = false release_channel = "STABLE" vertical_pod_autoscaling = false gcp_filestore_csi_driver_config = false }">{…}</code> | |
|
||||||
| [dns_domain](variables.tf#L94) | Domain name used for clusters, prefixed by each cluster name. Leave null to disable Cloud DNS for GKE. | <code>string</code> | | <code>null</code> | |
|
| [dns_domain](variables.tf#L94) | Domain name used for clusters, prefixed by each cluster name. Leave null to disable Cloud DNS for GKE. | <code>string</code> | | <code>null</code> | |
|
||||||
|
@ -153,7 +154,7 @@ fleet_features = {
|
||||||
| [iam](variables.tf#L175) | Project-level authoritative IAM bindings for users and service accounts in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>{}</code> | |
|
| [iam](variables.tf#L175) | Project-level authoritative IAM bindings for users and service accounts in {ROLE => [MEMBERS]} format. | <code>map(list(string))</code> | | <code>{}</code> | |
|
||||||
| [labels](variables.tf#L182) | Project-level labels. | <code>map(string)</code> | | <code>{}</code> | |
|
| [labels](variables.tf#L182) | Project-level labels. | <code>map(string)</code> | | <code>{}</code> | |
|
||||||
| [nodepool_defaults](variables.tf#L188) | | <code title="object({ image_type = string max_pods_per_node = number node_locations = list(string) node_tags = list(string) node_taints = list(string) })">object({…})</code> | | <code title="{ image_type = "COS_CONTAINERD" max_pods_per_node = 110 node_locations = null node_tags = null node_taints = [] }">{…}</code> | |
|
| [nodepool_defaults](variables.tf#L188) | | <code title="object({ image_type = string max_pods_per_node = number node_locations = list(string) node_tags = list(string) node_taints = list(string) })">object({…})</code> | | <code title="{ image_type = "COS_CONTAINERD" max_pods_per_node = 110 node_locations = null node_tags = null node_taints = [] }">{…}</code> | |
|
||||||
| [project_services](variables.tf#L228) | Additional project services to enable. | <code>list(string)</code> | | <code>[]</code> | |
|
| [project_services](variables.tf#L233) | Additional project services to enable. | <code>list(string)</code> | | <code>[]</code> | |
|
||||||
|
|
||||||
## Outputs
|
## Outputs
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
module "gke-project-0" {
|
module "gke-project-0" {
|
||||||
source = "../../../modules/project"
|
source = "../../../modules/project"
|
||||||
billing_account = var.billing_account_id
|
billing_account = var.billing_account_id
|
||||||
name = "gke-clusters-0"
|
name = var.project_id
|
||||||
parent = var.folder_id
|
parent = var.folder_id
|
||||||
prefix = var.prefix
|
prefix = var.prefix
|
||||||
group_iam = var.group_iam
|
group_iam = var.group_iam
|
||||||
|
|
|
@ -225,6 +225,11 @@ variable "prefix" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "project_id" {
|
||||||
|
description = "ID of the project that will contain all the clusters."
|
||||||
|
type = string
|
||||||
|
}
|
||||||
|
|
||||||
variable "project_services" {
|
variable "project_services" {
|
||||||
description = "Additional project services to enable."
|
description = "Additional project services to enable."
|
||||||
type = list(string)
|
type = list(string)
|
||||||
|
|
|
@ -20,6 +20,7 @@ module "gke-multitenant" {
|
||||||
source = "../../../../examples/gke-serverless/multitenant-fleet"
|
source = "../../../../examples/gke-serverless/multitenant-fleet"
|
||||||
billing_account_id = var.billing_account.id
|
billing_account_id = var.billing_account.id
|
||||||
folder_id = var.folder_ids.gke-dev
|
folder_id = var.folder_ids.gke-dev
|
||||||
|
project_id = "gke-clusters-0"
|
||||||
group_iam = var.group_iam
|
group_iam = var.group_iam
|
||||||
iam = var.iam
|
iam = var.iam
|
||||||
labels = merge(var.labels, { environment = "dev" })
|
labels = merge(var.labels, { environment = "dev" })
|
||||||
|
|
Loading…
Reference in New Issue