From 73e6badd2923dfe9caa0836195a35f3f47593b57 Mon Sep 17 00:00:00 2001 From: yoshutch Date: Tue, 6 Oct 2020 13:41:57 -0600 Subject: [PATCH 1/3] v2.0.0 using acs v3.1.0 --- README.md | 2 +- examples/double_hop/double_hop.tf | 4 ++-- examples/module/example.tf | 2 +- main.tf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7cbf197..69e020a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ provider "aws" { } module "bastion" { - source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v1.2.1" + source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v2.0.0" env = "prd" vpc_vpn_to_campus = true netid = "mynetid" diff --git a/examples/double_hop/double_hop.tf b/examples/double_hop/double_hop.tf index 5dad2c8..1008dbc 100644 --- a/examples/double_hop/double_hop.tf +++ b/examples/double_hop/double_hop.tf @@ -12,7 +12,7 @@ locals { } module "public_bastion" { - source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v1.2.1" + source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v2.0.0" env = local.env vpc_vpn_to_campus = true netid = "${local.netid}-public" @@ -23,7 +23,7 @@ module "public_bastion" { module "private_bastion" { - source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v1.2.1" + source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v2.0.0" env = local.env vpc_vpn_to_campus = true netid = "${local.netid}-private" diff --git a/examples/module/example.tf b/examples/module/example.tf index a839252..f4877c4 100644 --- a/examples/module/example.tf +++ b/examples/module/example.tf @@ -5,7 +5,7 @@ provider "aws" { module "bastion" { #source = "../../" - source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v1.2.1" + source = "github.com/byu-oit/terraform-aws-bastion.git?ref=v2.0.0" env = "dev" vpc_vpn_to_campus = false netid = "jgubler" diff --git a/main.tf b/main.tf index b90f4f7..68ee48e 100644 --- a/main.tf +++ b/main.tf @@ -6,7 +6,7 @@ terraform { } module "acs" { - source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v2.1.0" + source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v3.1.0" vpc_vpn_to_campus = var.vpc_vpn_to_campus } From 46e811d823d12915ce95542a3e918a73c9dead48 Mon Sep 17 00:00:00 2001 From: yoshutch Date: Tue, 6 Oct 2020 13:53:31 -0600 Subject: [PATCH 2/3] fixing ci --- examples/ci/ci.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ci/ci.tf b/examples/ci/ci.tf index d627157..e5f699d 100644 --- a/examples/ci/ci.tf +++ b/examples/ci/ci.tf @@ -3,7 +3,7 @@ terraform { } provider "aws" { - version = "~> 2.42" + version = ">= 2.42" region = "us-west-2" } From 88004bba1455cc246b3d707db4d2218b19845cec Mon Sep 17 00:00:00 2001 From: yoshutch Date: Tue, 6 Oct 2020 13:59:42 -0600 Subject: [PATCH 3/3] ci to test terraform 12 and 13 versions --- .github/workflows/ci.yml | 15 ++++++++++----- examples/{ci => ci-12}/ci.tf | 2 +- examples/ci-13/ci.tf | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) rename examples/{ci => ci-12}/ci.tf (97%) create mode 100644 examples/ci-13/ci.tf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ac6ee2..e74a951 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: pull_request: branches: [master] types: [opened, reopened, synchronize, edited] -env: - tf_version: "0.12.26" # must match value in examples/ci/ci.tf jobs: env: @@ -18,7 +16,14 @@ jobs: matrix='{ "env":[ { - "tf_working_dir":"./examples/ci", + "tf_version":"0.13.2", + "tf_working_dir":"./examples/ci-13", + "aws_key_name":"byu_oit_terraform_dev_key", + "aws_secret_name":"byu_oit_terraform_dev_secret" + }, + { + "tf_version":"0.12.26", + "tf_working_dir":"./examples/ci-12", "aws_key_name":"byu_oit_terraform_dev_key", "aws_secret_name":"byu_oit_terraform_dev_secret" } @@ -41,7 +46,7 @@ jobs: - name: Terraform Setup uses: hashicorp/setup-terraform@v1 with: - terraform_version: ${{ env.tf_version }} + terraform_version: ${{ matrix.env.tf_version }} - name: Terraform Format working-directory: "./" @@ -66,7 +71,7 @@ jobs: - name: Terraform Setup uses: hashicorp/setup-terraform@v1 with: - terraform_version: ${{ env.tf_version }} + terraform_version: ${{ matrix.env.tf_version }} - name: Terraform Init working-directory: ${{ matrix.env.tf_working_dir }} diff --git a/examples/ci/ci.tf b/examples/ci-12/ci.tf similarity index 97% rename from examples/ci/ci.tf rename to examples/ci-12/ci.tf index e5f699d..0ccc485 100644 --- a/examples/ci/ci.tf +++ b/examples/ci-12/ci.tf @@ -3,7 +3,7 @@ terraform { } provider "aws" { - version = ">= 2.42" + version = "~> 3.0" region = "us-west-2" } diff --git a/examples/ci-13/ci.tf b/examples/ci-13/ci.tf new file mode 100644 index 0000000..832648d --- /dev/null +++ b/examples/ci-13/ci.tf @@ -0,0 +1,32 @@ +terraform { + required_version = "0.13.2" +} + +provider "aws" { + version = "~> 3.0" + region = "us-west-2" +} + +module "bastion" { + source = "../../" + env = "dev" + vpc_vpn_to_campus = false + netid = "githubac" + public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwWVPlHpRiXGBmB/VG6PUeJ/Ev+Y39n5PBI4DW3ZMDT1g32nEUjzKtxK6KwVzYFQBhReMO2ry4uSTiNIzuOtHk/OCfcdPc8wbW3RlHBgbqs6p7DfYRJAXJCnWEjovijaVY0lyL4+7/YuprZwBaA2NfUIRN8UwVxZck3ULMnCK6BKog0UAE9NQZ9Z0vAtgLYPo9eVJEuGrxEszN29X+4Fl6u3T8x0XQ9EoMWU4YNwKfzBIof3th9Cbv4+FlEKpOFYuCc5vB2NPotalN8phEUqnvtsDkmCLAop6+MrUlnNNYIzmh2RLeqDF+M/ZnX8xb+V/mT9vARVcdcYCxKYeyXLvT example" +} + +output "connect" { + value = module.bastion.connect +} + +output "ec2_instance" { + value = module.bastion.ec2_instance +} + +output "security_group" { + value = module.bastion.security_group +} + +output "key_pair" { + value = module.bastion.key_pair +}