diff --git a/examples/public_load_balancer/load_balancer.tf b/examples/public_load_balancer/load_balancer.tf index 457698bcb..0fe17ce53 100644 --- a/examples/public_load_balancer/load_balancer.tf +++ b/examples/public_load_balancer/load_balancer.tf @@ -1,6 +1,6 @@ resource "outscale_load_balancer" "my_public_lb" { subregion_names = ["${var.region}a"] - load_balancer_name = "my-public-lb" + load_balancer_name = "my-lb-public${var.suffixe_lbu_name}" listeners { backend_port = 80 backend_protocol = "HTTP" diff --git a/examples/public_load_balancer/variables.tf b/examples/public_load_balancer/variables.tf index d3ac9cb3b..7bcb1eda2 100644 --- a/examples/public_load_balancer/variables.tf +++ b/examples/public_load_balancer/variables.tf @@ -5,3 +5,7 @@ variable "region" {} variable "image_id" {} variable "vm_type" {} variable "vm_count" {} + +variable "suffixe_lbu_name" { + type = string +} diff --git a/scripts/terraform-examples.sh b/scripts/terraform-examples.sh index 326a594b0..e0057dd07 100755 --- a/scripts/terraform-examples.sh +++ b/scripts/terraform-examples.sh @@ -7,14 +7,14 @@ project_root=$(cd $project_dir/.. && pwd) EXAMPLES_DIR=$project_root/examples go build -o terraform-provider-outscale - +export TF_VAR_suffixe_lbu_name=$((RANDOM%10000)) for f in $EXAMPLES_DIR/* do if [ -d $f ] then cd $f VERSION_DIR=`grep -o '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*' outscale.tf` - INSTALL_DIR=$f/terraform.d/plugins/registry.terraform.io/outscale-dev/outscale/$VERSION_DIR/linux_amd64/ + INSTALL_DIR=$f/terraform.d/plugins/registry.terraform.io/outscale/outscale/$VERSION_DIR/linux_amd64/ echo $INSTALL_DIR mkdir -p $INSTALL_DIR cp ../../terraform-provider-outscale $INSTALL_DIR