diff --git a/examples/base_1cc/README.md b/examples/base_1cc/README.md index d16f55f..81636a3 100644 --- a/examples/base_1cc/README.md +++ b/examples/base_1cc/README.md @@ -98,7 +98,8 @@ From base_1cc directory execute: | [http\_probe\_port](#input\_http\_probe\_port) | Port number for Cloud Connector cloud init to enable listener port for HTTP probe from GCP LB | `number` | `50000` | no | | [image\_name](#input\_image\_name) | Custom image name to be used for deploying Cloud Connector appliances. Ideally all VMs should be on the same Image as templates always pull the latest from Google Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select CCs deployed based on the cc\_count index | `string` | `""` | no | | [instance\_group\_name](#input\_instance\_group\_name) | The name of the Instance Group Manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens | `list(string)` |
[| no | -| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix | `string` | `null` | no | +| [instance\_template\_name](#input\_instance\_template\_name) | The name of the instance template. Conflicts with variable instance\_template\_name\_prefix | `string` | `""` | no | +| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance\_template\_name | `string` | `""` | no | | [name\_prefix](#input\_name\_prefix) | The name prefix for all your resources | `string` | `"zscc"` | no | | [project](#input\_project) | Google Cloud project name | `string` | n/a | yes | | [project\_host](#input\_project\_host) | Google Cloud Host Project name. Defaults to null. This variable is intended for environments where different resources might exist in separate host and service projects | `string` | `null` | no | diff --git a/examples/base_1cc/main.tf b/examples/base_1cc/main.tf index 30abef5..5098414 100644 --- a/examples/base_1cc/main.tf +++ b/examples/base_1cc/main.tf @@ -90,7 +90,7 @@ resource "google_compute_route" "route_to_cc_vm" { dest_range = "0.0.0.0/0" priority = 600 network = module.network.service_vpc_network - tags = [module.workload.workload_network_tag] + tags = module.workload.workload_network_tag next_hop_instance = module.cc_vm.cc_instance[0] } @@ -156,6 +156,7 @@ module "cc_vm" { service_account = module.iam_service_account.service_account instance_template_name_prefix = var.instance_template_name_prefix + instance_template_name = var.instance_template_name instance_group_name = var.instance_group_name base_instance_name = var.base_instance_name diff --git a/examples/base_1cc/terraform.tfvars b/examples/base_1cc/terraform.tfvars index 6f716f5..c4e9703 100755 --- a/examples/base_1cc/terraform.tfvars +++ b/examples/base_1cc/terraform.tfvars @@ -136,6 +136,12 @@ ## Custom CC VM/Instance Group module name variables #instance_template_name_prefix = "template-name-prefix" + +#### GCP Terraform provider recommends to use template name_prefix rather than name argument per: #### +#### https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template #### +#### Setting any value for instance_template_name will set name_prefix to empty/null #### +#instance_template_name = "template-name" + #instance_group_name = ["az-1-grp-name","az-2-grp-name"] #base_instance_name = ["grp-1-base-name","grp-2-base-name"] diff --git a/examples/base_1cc/variables.tf b/examples/base_1cc/variables.tf index a179c5c..7a41e15 100644 --- a/examples/base_1cc/variables.tf +++ b/examples/base_1cc/variables.tf @@ -188,8 +188,14 @@ variable "service_account_display_name" { variable "instance_template_name_prefix" { type = string - description = "Creates a unique Instance Template name beginning with the specified prefix" - default = null + description = "Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance_template_name" + default = "" +} + +variable "instance_template_name" { + type = string + description = "The name of the instance template. Conflicts with variable instance_template_name_prefix" + default = "" } variable "instance_group_name" { diff --git a/examples/base_1cc_zpa/README.md b/examples/base_1cc_zpa/README.md index c91d3cd..17032f5 100644 --- a/examples/base_1cc_zpa/README.md +++ b/examples/base_1cc_zpa/README.md @@ -100,7 +100,8 @@ From base_1cc_zpa directory execute: | [http\_probe\_port](#input\_http\_probe\_port) | Port number for Cloud Connector cloud init to enable listener port for HTTP probe from GCP LB | `number` | `50000` | no | | [image\_name](#input\_image\_name) | Custom image name to be used for deploying Cloud Connector appliances. Ideally all VMs should be on the same Image as templates always pull the latest from Google Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select CCs deployed based on the cc\_count index | `string` | `""` | no | | [instance\_group\_name](#input\_instance\_group\_name) | The name of the Instance Group Manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens | `list(string)` |
""
]
[| no | -| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix | `string` | `null` | no | +| [instance\_template\_name](#input\_instance\_template\_name) | The name of the instance template. Conflicts with variable instance\_template\_name\_prefix | `string` | `""` | no | +| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance\_template\_name | `string` | `""` | no | | [name\_prefix](#input\_name\_prefix) | The name prefix for all your resources | `string` | `"zscc"` | no | | [project](#input\_project) | Google Cloud project name | `string` | n/a | yes | | [project\_host](#input\_project\_host) | Google Cloud Host Project name. Defaults to null. This variable is intended for environments where different resources might exist in separate host and service projects | `string` | `null` | no | diff --git a/examples/base_1cc_zpa/main.tf b/examples/base_1cc_zpa/main.tf index 19ec91a..54dc61e 100644 --- a/examples/base_1cc_zpa/main.tf +++ b/examples/base_1cc_zpa/main.tf @@ -90,7 +90,7 @@ resource "google_compute_route" "route_to_cc_vm" { dest_range = "0.0.0.0/0" priority = 600 network = module.network.service_vpc_network - tags = [module.workload.workload_network_tag] + tags = module.workload.workload_network_tag next_hop_instance = module.cc_vm.cc_instance[0] } @@ -156,6 +156,7 @@ module "cc_vm" { service_account = module.iam_service_account.service_account instance_template_name_prefix = var.instance_template_name_prefix + instance_template_name = var.instance_template_name instance_group_name = var.instance_group_name base_instance_name = var.base_instance_name } diff --git a/examples/base_1cc_zpa/terraform.tfvars b/examples/base_1cc_zpa/terraform.tfvars index 35d0b6b..8b0dce1 100755 --- a/examples/base_1cc_zpa/terraform.tfvars +++ b/examples/base_1cc_zpa/terraform.tfvars @@ -151,6 +151,12 @@ ## Custom CC VM/Instance Group module name variables #instance_template_name_prefix = "template-name-prefix" + +#### GCP Terraform provider recommends to use template name_prefix rather than name argument per: #### +#### https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template #### +#### Setting any value for instance_template_name will set name_prefix to empty/null #### +#instance_template_name = "template-name" + #instance_group_name = ["az-1-grp-name","az-2-grp-name"] #base_instance_name = ["grp-1-base-name","grp-2-base-name"] diff --git a/examples/base_1cc_zpa/variables.tf b/examples/base_1cc_zpa/variables.tf index 963a837..74c3f84 100644 --- a/examples/base_1cc_zpa/variables.tf +++ b/examples/base_1cc_zpa/variables.tf @@ -192,8 +192,14 @@ variable "service_account_display_name" { variable "instance_template_name_prefix" { type = string - description = "Creates a unique Instance Template name beginning with the specified prefix" - default = null + description = "Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance_template_name" + default = "" +} + +variable "instance_template_name" { + type = string + description = "The name of the instance template. Conflicts with variable instance_template_name_prefix" + default = "" } variable "instance_group_name" { diff --git a/examples/base_cc_ilb/README.md b/examples/base_cc_ilb/README.md index 84a2da0..c9e8f6f 100644 --- a/examples/base_cc_ilb/README.md +++ b/examples/base_cc_ilb/README.md @@ -107,7 +107,8 @@ From base_cc_ilb directory execute: | [ilb\_health\_check\_name](#input\_ilb\_health\_check\_name) | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash | `string` | `null` | no | | [image\_name](#input\_image\_name) | Custom image name to be used for deploying Cloud Connector appliances. Ideally all VMs should be on the same Image as templates always pull the latest from Google Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select CCs deployed based on the cc\_count index | `string` | `""` | no | | [instance\_group\_name](#input\_instance\_group\_name) | The name of the Instance Group Manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens | `list(string)` |
""
]
[| no | -| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix | `string` | `null` | no | +| [instance\_template\_name](#input\_instance\_template\_name) | The name of the instance template. Conflicts with variable instance\_template\_name\_prefix | `string` | `""` | no | +| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance\_template\_name | `string` | `""` | no | | [name\_prefix](#input\_name\_prefix) | The name prefix for all your resources | `string` | `"zscc"` | no | | [project](#input\_project) | Google Cloud project name | `string` | n/a | yes | | [project\_host](#input\_project\_host) | Google Cloud Host Project name. Defaults to null. This variable is intended for environments where different resources might exist in separate host and service projects | `string` | `null` | no | diff --git a/examples/base_cc_ilb/main.tf b/examples/base_cc_ilb/main.tf index f6a40c8..ab59147 100644 --- a/examples/base_cc_ilb/main.tf +++ b/examples/base_cc_ilb/main.tf @@ -156,6 +156,7 @@ module "cc_vm" { service_account = module.iam_service_account.service_account instance_template_name_prefix = var.instance_template_name_prefix + instance_template_name = var.instance_template_name instance_group_name = var.instance_group_name base_instance_name = var.base_instance_name } diff --git a/examples/base_cc_ilb/terraform.tfvars b/examples/base_cc_ilb/terraform.tfvars index 2a9fa5b..b006536 100755 --- a/examples/base_cc_ilb/terraform.tfvars +++ b/examples/base_cc_ilb/terraform.tfvars @@ -136,6 +136,12 @@ ## Custom CC VM/Instance Group module name variables #instance_template_name_prefix = "template-name-prefix" + +#### GCP Terraform provider recommends to use template name_prefix rather than name argument per: #### +#### https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template #### +#### Setting any value for instance_template_name will set name_prefix to empty/null #### +#instance_template_name = "template-name" + #instance_group_name = ["az-1-grp-name","az-2-grp-name"] #base_instance_name = ["grp-1-base-name","grp-2-base-name"] diff --git a/examples/base_cc_ilb/variables.tf b/examples/base_cc_ilb/variables.tf index 1fa241d..d6098d2 100644 --- a/examples/base_cc_ilb/variables.tf +++ b/examples/base_cc_ilb/variables.tf @@ -226,8 +226,14 @@ variable "service_account_display_name" { variable "instance_template_name_prefix" { type = string - description = "Creates a unique Instance Template name beginning with the specified prefix" - default = null + description = "Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance_template_name" + default = "" +} + +variable "instance_template_name" { + type = string + description = "The name of the instance template. Conflicts with variable instance_template_name_prefix" + default = "" } variable "instance_group_name" { diff --git a/examples/base_cc_ilb_zpa/README.md b/examples/base_cc_ilb_zpa/README.md index ef93931..c815feb 100644 --- a/examples/base_cc_ilb_zpa/README.md +++ b/examples/base_cc_ilb_zpa/README.md @@ -109,7 +109,8 @@ From base_cc_ilb_zpa directory execute: | [ilb\_health\_check\_name](#input\_ilb\_health\_check\_name) | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash | `string` | `null` | no | | [image\_name](#input\_image\_name) | Custom image name to be used for deploying Cloud Connector appliances. Ideally all VMs should be on the same Image as templates always pull the latest from Google Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select CCs deployed based on the cc\_count index | `string` | `""` | no | | [instance\_group\_name](#input\_instance\_group\_name) | The name of the Instance Group Manager. Must be 1-63 characters long and comply with RFC1035. Supported characters include lowercase letters, numbers, and hyphens | `list(string)` |
""
]
[| no | -| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix | `string` | `null` | no | +| [instance\_template\_name](#input\_instance\_template\_name) | The name of the instance template. Conflicts with variable instance\_template\_name\_prefix | `string` | `""` | no | +| [instance\_template\_name\_prefix](#input\_instance\_template\_name\_prefix) | Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance\_template\_name | `string` | `""` | no | | [name\_prefix](#input\_name\_prefix) | The name prefix for all your resources | `string` | `"zscc"` | no | | [project](#input\_project) | Google Cloud project name | `string` | n/a | yes | | [project\_host](#input\_project\_host) | Google Cloud Host Project name. Defaults to null. This variable is intended for environments where different resources might exist in separate host and service projects | `string` | `null` | no | diff --git a/examples/base_cc_ilb_zpa/main.tf b/examples/base_cc_ilb_zpa/main.tf index 7d95339..bc54c48 100755 --- a/examples/base_cc_ilb_zpa/main.tf +++ b/examples/base_cc_ilb_zpa/main.tf @@ -90,7 +90,7 @@ resource "google_compute_route" "route_to_cc_vm" { dest_range = "0.0.0.0/0" priority = 600 network = module.network.service_vpc_network - tags = [module.workload.workload_network_tag] + tags = module.workload.workload_network_tag next_hop_ilb = module.ilb.next_hop_ilb_ip_address } @@ -156,6 +156,7 @@ module "cc_vm" { service_account = module.iam_service_account.service_account instance_template_name_prefix = var.instance_template_name_prefix + instance_template_name = var.instance_template_name instance_group_name = var.instance_group_name base_instance_name = var.base_instance_name } diff --git a/examples/base_cc_ilb_zpa/terraform.tfvars b/examples/base_cc_ilb_zpa/terraform.tfvars index 28d597b..e681b59 100755 --- a/examples/base_cc_ilb_zpa/terraform.tfvars +++ b/examples/base_cc_ilb_zpa/terraform.tfvars @@ -151,6 +151,12 @@ ## Custom CC VM/Instance Group module name variables #instance_template_name_prefix = "template-name-prefix" + +#### GCP Terraform provider recommends to use template name_prefix rather than name argument per: #### +#### https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template #### +#### Setting any value for instance_template_name will set name_prefix to empty/null #### +#instance_template_name = "template-name" + #instance_group_name = ["az-1-grp-name","az-2-grp-name"] #base_instance_name = ["grp-1-base-name","grp-2-base-name"] diff --git a/examples/base_cc_ilb_zpa/variables.tf b/examples/base_cc_ilb_zpa/variables.tf index 858fe93..b259a92 100755 --- a/examples/base_cc_ilb_zpa/variables.tf +++ b/examples/base_cc_ilb_zpa/variables.tf @@ -232,8 +232,14 @@ variable "service_account_display_name" { variable "instance_template_name_prefix" { type = string - description = "Creates a unique Instance Template name beginning with the specified prefix" - default = null + description = "Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance_template_name" + default = "" +} + +variable "instance_template_name" { + type = string + description = "The name of the instance template. Conflicts with variable instance_template_name_prefix" + default = "" } variable "instance_group_name" { diff --git a/examples/cc_ilb/main.tf b/examples/cc_ilb/main.tf index 965de05..51cd2e4 100755 --- a/examples/cc_ilb/main.tf +++ b/examples/cc_ilb/main.tf @@ -126,6 +126,7 @@ module "cc_vm" { service_account = module.iam_service_account.service_account instance_template_name_prefix = var.instance_template_name_prefix + instance_template_name = var.instance_template_name instance_group_name = var.instance_group_name base_instance_name = var.base_instance_name } diff --git a/examples/cc_ilb/terraform.tfvars b/examples/cc_ilb/terraform.tfvars index a967c79..eacc7ee 100755 --- a/examples/cc_ilb/terraform.tfvars +++ b/examples/cc_ilb/terraform.tfvars @@ -200,6 +200,12 @@ ## Custom CC VM/Instance Group module name variables #instance_template_name_prefix = "template-name-prefix" + +#### GCP Terraform provider recommends to use template name_prefix rather than name argument per: #### +#### https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance_template #### +#### Setting any value for instance_template_name will set name_prefix to empty/null #### +#instance_template_name = "template-name" + #instance_group_name = ["az-1-grp-name","az-2-grp-name"] #base_instance_name = ["grp-1-base-name","grp-2-base-name"] diff --git a/examples/cc_ilb/variables.tf b/examples/cc_ilb/variables.tf index 5ea89ed..2faa699 100755 --- a/examples/cc_ilb/variables.tf +++ b/examples/cc_ilb/variables.tf @@ -285,8 +285,14 @@ variable "service_account_display_name" { variable "instance_template_name_prefix" { type = string - description = "Creates a unique Instance Template name beginning with the specified prefix" - default = null + description = "Creates a unique Instance Template name beginning with the specified prefix. Conflicts with variable instance_template_name" + default = "" +} + +variable "instance_template_name" { + type = string + description = "The name of the instance template. Conflicts with variable instance_template_name_prefix" + default = "" } variable "instance_group_name" {
""
]