|
| 1 | +######################################################################################################################## |
| 2 | +# Input Variables |
| 3 | +######################################################################################################################## |
| 4 | + |
| 5 | +variable "ibmcloud_api_key" { |
| 6 | + type = string |
| 7 | + description = "The IBM Cloud api key" |
| 8 | + sensitive = true |
| 9 | +} |
| 10 | + |
| 11 | +variable "prefix" { |
| 12 | + type = string |
| 13 | + description = "Prefix for name of all resource created by this example" |
| 14 | + validation { |
| 15 | + error_message = "Prefix must begin and end with a letter and contain only letters, numbers, and - characters." |
| 16 | + condition = can(regex("^([A-z]|[a-z][-a-z0-9]*[a-z0-9])$", var.prefix)) |
| 17 | + } |
| 18 | +} |
| 19 | + |
| 20 | +variable "region" { |
| 21 | + type = string |
| 22 | + description = "Region where resources are created" |
| 23 | +} |
| 24 | + |
| 25 | +variable "resource_group" { |
| 26 | + type = string |
| 27 | + description = "An existing resource group name to use for this example, if unset a new resource group will be created" |
| 28 | + default = null |
| 29 | +} |
| 30 | + |
| 31 | +variable "cluster_id" { |
| 32 | + type = string |
| 33 | + description = "The ID of the cluster" |
| 34 | +} |
| 35 | + |
| 36 | +variable "worker_pools" { |
| 37 | + type = list(object({ |
| 38 | + subnet_prefix = optional(string) |
| 39 | + vpc_subnets = optional(list(object({ |
| 40 | + id = string |
| 41 | + zone = string |
| 42 | + cidr_block = string |
| 43 | + }))) |
| 44 | + pool_name = string |
| 45 | + machine_type = string |
| 46 | + workers_per_zone = number |
| 47 | + resource_group_id = optional(string) |
| 48 | + operating_system = string |
| 49 | + labels = optional(map(string)) |
| 50 | + minSize = optional(number) |
| 51 | + secondary_storage = optional(string) |
| 52 | + maxSize = optional(number) |
| 53 | + enableAutoscaling = optional(bool) |
| 54 | + boot_volume_encryption_kms_config = optional(object({ |
| 55 | + crk = string |
| 56 | + kms_instance_id = string |
| 57 | + kms_account_id = optional(string) |
| 58 | + })) |
| 59 | + additional_security_group_ids = optional(list(string)) |
| 60 | + })) |
| 61 | + description = "List of worker pools" |
| 62 | +} |
| 63 | + |
| 64 | +variable "vpc_subnets" { |
| 65 | + type = map(list(object({ |
| 66 | + id = string |
| 67 | + zone = string |
| 68 | + cidr_block = string |
| 69 | + }))) |
| 70 | + description = "Metadata that describes the VPC's subnets. Obtain this information from the VPC where this cluster is created." |
| 71 | +} |
| 72 | + |
| 73 | +variable "vpc_id" { |
| 74 | + type = string |
| 75 | + description = "ID of the VPC instance where this cluster is provisioned." |
| 76 | +} |
| 77 | + |
0 commit comments