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 +}