Skip to content

Commit

Permalink
Updates for byo-VPC in GCP deployment
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <[email protected]>
  • Loading branch information
jimright committed Dec 21, 2023
1 parent 5e41b52 commit fb6de34
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 30 deletions.
10 changes: 4 additions & 6 deletions modules/terraform-cdp-deploy/examples/ex03-gcp-basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ module "cdp_gcp_prereqs" {

ingress_extra_cidrs_and_ports = var.ingress_extra_cidrs_and_ports

# Inputs for BYO-VNet
# create_vnet = var.create_vnet
# cdp_resourcegroup_name = var.cdp_resourcegroup_name
# cdp_vnet_name = var.cdp_vnet_name
# cdp_subnet_names = var.cdp_subnet_names
# cdp_gw_subnet_names = var.cdp_gw_subnet_names
# Inputs for BYO-VPC
create_vpc = var.create_vpc
cdp_vpc_name = var.cdp_vpc_name
cdp_subnet_names = var.cdp_subnet_names

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ deployment_template = "<ENTER_VALUE>" # Specify the deployment pattern below. O
# ------- Optional inputs for BYO-VPC -------
# **NOTE: Uncomment below settings if required

# create_vpc=true # Set to false to use pre-existing VNet
# create_vpc=true # Set to false to use pre-existing VPC

# cdp_resourcegroup_name="<ENTER_EXISTING_RG_NAME>" # Name of pre-existing Resource Group for CDP environment. Required if create_vnet is false
# cdp_vnet_name="<ENTER_EXISTING_VNET_NAME>" # Name of pre-existing VNet for CDP environment. Required if create_vnet is false
# cdp_subnet_names=["<ENTER_EXISTING_SUBNET_NAME>","<ENTER_EXISTING_SUBNET_NAME>"] # List of pre-existing subnet names for CDP resources. Required if create_vnet is false
# cdp_gw_subnet_names=["<ENTER_EXISTING_SUBNET_NAME>"] # List of pre-existing subnet names for CDP Gateway. Required if create_vnet is false
# cdp_vpc_name="<ENTER_EXISTING_VPC_NAME>" # Name of pre-existing VNet for CDP environment. Required if create_vpc is false
# cdp_subnet_names=["<ENTER_EXISTING_SUBNET_NAME>","<ENTER_EXISTING_SUBNET_NAME>"] # List of pre-existing subnet names for CDP resources. Required if create_vpc is false
24 changes: 5 additions & 19 deletions modules/terraform-cdp-deploy/examples/ex03-gcp-basic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,24 @@ variable "ingress_extra_cidrs_and_ports" {
}

# ------- Optional inputs for BYO-VPC -------
variable "create_vnet" {
variable "create_vpc" {
type = bool

description = "Flag to specify if the VNet should be created"
description = "Flag to specify if the VPC should be created"

default = true
}

variable "cdp_resourcegroup_name" {
variable "cdp_vpc_name" {
type = string
description = "Pre-existing Resource Group for CDP environment. Required if create_vnet is false."

default = null
}

variable "cdp_vnet_name" {
type = string
description = "Pre-existing VNet Name for CDP environment. Required if create_vnet is false."
description = "Pre-existing VPC Name for CDP environment. Required if create_vpc is false."

default = null
}

variable "cdp_subnet_names" {
type = list(any)
description = "List of subnet names for CDP Resources. Required if create_vnet is false."
description = "List of subnet names for CDP Resources. Required if create_vpc is false."

default = null
}

variable "cdp_gw_subnet_names" {
type = list(any)
description = "List of subnet names for CDP Gateway. Required if create_vnet is false."

default = null
}

0 comments on commit fb6de34

Please sign in to comment.