Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suffix random string on LBU_name #479

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/generate_binaries_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on:
pull_request:
branches:
- master
paths:
- '**.go'
- '**.sum'
- '**.mod'
- 'GNUmakefile'
workflow_dispatch:

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion examples/public_load_balancer/load_balancer.tf
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions examples/public_load_balancer/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ variable "region" {}
variable "image_id" {}
variable "vm_type" {}
variable "vm_count" {}

variable "suffixe_lbu_name" {
type = string
}
2 changes: 1 addition & 1 deletion examples/public_vm/outscale.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
outscale = {
source = "outscale/outscale"
version = "1.0.0-rc.1"
version = ">= 0.11.0"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion scripts/terraform-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ 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
Expand Down
3 changes: 2 additions & 1 deletion scripts/tofu-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ 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/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
Expand Down
Loading