From e8ce6520cd50d1b746c5d5c2f378cf89d44f959e Mon Sep 17 00:00:00 2001 From: Vipul Lalan Date: Mon, 22 Jul 2024 16:09:55 +0530 Subject: [PATCH] Update yaml file and added new variable for load balancer display name (#2) * Updating the links to artifacts * Adding a new variable to define load balancer display name and removed compartment id + show advanced option * Minor corrections in yaml file --- private-endpoint-resources/lbr.tf | 2 +- private-endpoint-resources/schema.yaml | 42 ++++++++++--------------- private-endpoint-resources/variables.tf | 12 +++++-- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/private-endpoint-resources/lbr.tf b/private-endpoint-resources/lbr.tf index 4690152..76bcf60 100644 --- a/private-endpoint-resources/lbr.tf +++ b/private-endpoint-resources/lbr.tf @@ -1,7 +1,7 @@ resource "oci_load_balancer_load_balancer" "public_load_balancer" { count = local.boolean_create_public_load_balancer ? 1 : 0 compartment_id = var.compartment_ocid - display_name = "Customer-public-load-balancer" + display_name = var.load_balancer_name shape = "flexible" shape_details { maximum_bandwidth_in_mbps = 10 diff --git a/private-endpoint-resources/schema.yaml b/private-endpoint-resources/schema.yaml index c6149e0..64b2e5a 100644 --- a/private-endpoint-resources/schema.yaml +++ b/private-endpoint-resources/schema.yaml @@ -17,28 +17,18 @@ variableGroups: - tenancy_ocid - region - release - - - title: Required Configuration - visible: true - variables: - compartment_ocid - - show_advanced - title: "Virtual Cloud Network Configuration" - visible: - and: - - show_advanced variables: - vcn_cidr - vcn_display_name - vcn_dns_label - title: "Load Balancer Configuration" - visible: - and: - - show_advanced variables: - create_public_load_balancer + - load_balancer_name - private_endpoint_ip ###################################################### @@ -64,22 +54,11 @@ variables: description: The region in which to create all resources required: true -###################################################### -############## REQUIRED VARIABLES ############# -###################################################### - show_advanced: - type: boolean - title: "Show advanced options?" - description: "Shows advanced options." - visible: true - default: false - compartment_ocid: type: oci:identity:compartment:id required: true title: Compartment description: The compartment in which to create all resources - default: compartment_ocid ###################################################### ############## NETWORK VARIABLES ############# @@ -96,7 +75,7 @@ variables: vcn_display_name: type: string required: false - default: "Customer-vcn" + default: "Customer-vcn-1" title: Name description: The name of the new Virtual Cloud Network (VCN) @@ -104,13 +83,13 @@ variables: type: string required: true title: DNS Label - default: "customervcn" + default: "customervcn1" maxLength: 15 description: VCN DNS Label. Only letters and numbers, starting with a letter. 15 characters max. ###################################################### -############## LOAD BALANCER VARIABLES ############# +############## LOAD BALANCER VARIABLES ############# ###################################################### create_public_load_balancer: @@ -120,9 +99,20 @@ variables: visible: true default: false + load_balancer_name: + type: string + title: "Load Balancer display name." + description: "Provide the display name of the public load balancer." + visible: + and: + - create_public_load_balancer + default: Customer-public-load-balancer-1 + private_endpoint_ip: type: string title: "Private Endpoint IP for load balancer backend configuration." description: "Provide the private endpoint ip that will be used while creating a Private Endpoint enabled Visual Builder instance. This is optional and load balancer backend can be updated with the visual builder's private endpoint ip later." - visible: true + visible: + and: + - create_public_load_balancer default: null diff --git a/private-endpoint-resources/variables.tf b/private-endpoint-resources/variables.tf index 0ee64b7..8a8321e 100644 --- a/private-endpoint-resources/variables.tf +++ b/private-endpoint-resources/variables.tf @@ -1,13 +1,16 @@ ## Consumer Subnet variable "compartment_ocid" { + type = string } variable "vcn_display_name" { - default = "Consumer-vcn" + default = "Consumer-vcn-1" + type = string } variable "vcn_dns_label" { - default = "consumervcn" + default = "consumervcn1" + type = string } variable "vcn_cidr" { @@ -24,4 +27,9 @@ variable "private_endpoint_ip" { default = null type = string description = "The private endpoint ip used during creation of Visual Builder instance, this is used to configure the backend of the load balancer" +} + +variable "load_balancer_name" { + type = string + default = "Customer-public-load-balancer-1" } \ No newline at end of file