diff --git a/.github/workflows/generate_binaries_on_pr.yml b/.github/workflows/generate_binaries_on_pr.yml index b876634b8..d88671010 100644 --- a/.github/workflows/generate_binaries_on_pr.yml +++ b/.github/workflows/generate_binaries_on_pr.yml @@ -4,6 +4,13 @@ on: pull_request: branches: - master + paths: + - '**.go' + - '**.sum' + - '**.mod' + - 'GNUmakefile' + workflow_dispatch: + jobs: goreleaser: runs-on: ubuntu-latest 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/examples/public_vm/outscale.tf b/examples/public_vm/outscale.tf index 6f92bcfce..b15868aab 100644 --- a/examples/public_vm/outscale.tf +++ b/examples/public_vm/outscale.tf @@ -2,7 +2,7 @@ terraform { required_providers { outscale = { source = "outscale/outscale" - version = "1.0.0-rc.1" + version = ">= 0.11.0" } } } diff --git a/scripts/terraform-examples.sh b/scripts/terraform-examples.sh index 326a594b0..43adc3f4f 100755 --- a/scripts/terraform-examples.sh +++ b/scripts/terraform-examples.sh @@ -7,6 +7,7 @@ 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 @@ -14,7 +15,7 @@ do 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 diff --git a/scripts/tofu-examples.sh b/scripts/tofu-examples.sh index d269e1d70..d32dfe912 100755 --- a/scripts/tofu-examples.sh +++ b/scripts/tofu-examples.sh @@ -7,6 +7,7 @@ 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 @@ -14,7 +15,7 @@ do then cd $f VERSION_DIR=`grep -o '[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*' outscale.tf` - INSTALL_DIR=$f/terraform.d/providers/registry.opentofu.org/outscale/outscale/$VERSION_DIR/linux_amd64/ + INSTALL_DIR=$f/terraform.d/plugins/registry.opentofu.org/outscale/outscale/$VERSION_DIR/linux_amd64/ echo $INSTALL_DIR mkdir -p $INSTALL_DIR cp ../../terraform-provider-outscale $INSTALL_DIR