Skip to content

Commit

Permalink
Merge pull request #105 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 8.11.1 - fix syntax error
  • Loading branch information
briskt authored Apr 18, 2024
2 parents 577ee84 + d848ba0 commit d16facc
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 14 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,12 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# Install the latest version of Terraform CLI
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
uses: hashicorp/setup-terraform@v3

# Checks that all Terraform configuration files adhere to a canonical format
- name: Terraform Format
run: terraform fmt -check -diff -recursive

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
run: terraform -chdir=test init

# Validate the files, referring only to the configuration and not accessing any remote services
- name: Terraform Validate
run: terraform -chdir=test validate
# Run terraform tests
- name: Terraform tests
run: ./test.sh
2 changes: 1 addition & 1 deletion aws/alb/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ variable "load_balancer_type" {
}

variable "enable_ipv6" {
description = "Set to `true` to enable IPv6. Changes the ALB `ip_address_type` to `"dualstack"`."
description = "Set to `true` to enable IPv6. Changes the ALB `ip_address_type` to `\"dualstack\"`."
type = bool
default = false
}
11 changes: 11 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env sh

# exit if any step fails
set -e

# echo command lines as they are run
set -x

terraform fmt -check -diff -recursive
terraform -chdir=test init
terraform -chdir=test validate
40 changes: 40 additions & 0 deletions test/alb.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Using required inputs
module "alb-test" {
source = "../aws/alb"

app_name = "test_name1"
app_env = "test_env1"
vpc_id = "vpc-0123abcd"
security_groups = ["sg-1234bcde"]
subnets = ["subnet-2345cdef"]
certificate_arn = "arn:aws:acm:us-east-1:0123456789012:certificate/44f68dac-d9f1-4d2f-94e6-a8231965f8ed"
}

# Using required and optional inputs
module "alb-test2" {
source = "../aws/alb"

app_name = "test_name1"
app_env = "test_env1"
vpc_id = "vpc-0123abcd"
security_groups = ["sg-1234bcde"]
subnets = ["subnet-2345cdef"]
certificate_arn = "arn:aws:acm:us-east-1:0123456789012:certificate/44f68dac-d9f1-4d2f-94e6-a8231965f8ed"
port = "80"
protocol = "HTTP"
alb_name = "alb-test2"
internal = false
ssl_policy = "ELBSecurityPolicy-2016-08"
tg_name = "tg-test2"
health_check_interval = "30"
health_check_path = "/"
health_check_port = "traffic-port"
health_check_protocol = "HTTP"
health_check_timeout = "5"
healthy_threshold = "5"
unhealthy_threshold = "2"
health_check_status_codes = "200"
idle_timeout = "60"
load_balancer_type = "application"
enable_ipv6 = true
}

0 comments on commit d16facc

Please sign in to comment.