From 54e6c2e4a5103085bc344a6a026f412e105ebe0e Mon Sep 17 00:00:00 2001 From: yoshutch Date: Fri, 31 Jan 2020 11:12:07 -0700 Subject: [PATCH 1/2] using latest acs-info module to create bastions on non-oit accounts --- README.md | 3 ++- examples/module/example.tf | 9 +++++---- main.tf | 3 ++- variables.tf | 5 +++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4a4a716..eaf87df 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ provider "aws" { } module "bastion" { - source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v1.1.0" + source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v1.1.1" env = "prd" vpc_vpn_to_campus = true netid = "mynetid" @@ -70,6 +70,7 @@ The bastion is really intended to be ephemeral (spin it up, use it, tear it down ## Input | Name | Description | Default Value | | --- | --- | --- | +| dept_abbr| string | AWS Account department abbreviation (e.g. oit, trn) | oit | | env | Environment of the AWS Account (for finding the shared VPC and tagging the bastion) (e.g. dev, prd)| | | vpc_vpn_to_campus | Set to true if the bastion needs to be in the VPC that has VPN access to campus | false | | netid | Your Net ID (for naming the bastion) | | diff --git a/examples/module/example.tf b/examples/module/example.tf index 7a8ae3a..4de12cb 100644 --- a/examples/module/example.tf +++ b/examples/module/example.tf @@ -4,10 +4,11 @@ provider "aws" { } module "bastion" { - #source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v1.1.0" - source = "../../" - env = "prd" - vpc_vpn_to_campus = true + source = "git@github.com:byu-oit/terraform-aws-bastion.git?ref=v1.1.1" + #source = "../../" + dept_abbr = "ces" + env = "dev" + vpc_vpn_to_campus = false netid = "mynetid" public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwWVPlHpRiXGBmB/VG6PUeJ/Ev+Y39n5PBI4DW3ZMDT1g32nEUjzKtxK6KwVzYFQBhReMO2ry4uSTiNIzuOtHk/OCfcdPc8wbW3RlHBgbqs6p7DfYRJAXJCnWEjovijaVY0lyL4+7/YuprZwBaA2NfUIRN8UwVxZck3ULMnCK6BKog0UAE9NQZ9Z0vAtgLYPo9eVJEuGrxEszN29X+4Fl6u3T8x0XQ9EoMWU4YNwKfzBIof3th9Cbv4+FlEKpOFYuCc5vB2NPotalN8phEUqnvtsDkmCLAop6+MrUlnNNYIzmh2RLeqDF+M/ZnX8xb+V/mT9vARVcdcYCxKYeyXLvT example" #ingress_cidrs = ["128.187.112.21/32"] # optional (defaults to BYU Campus) diff --git a/main.tf b/main.tf index 99cfa61..463f7bb 100644 --- a/main.tf +++ b/main.tf @@ -6,7 +6,8 @@ terraform { } module "acs" { - source = "git@github.com:byu-oit/terraform-aws-acs-info.git?ref=v1.1.0" + source = "git@github.com:byu-oit/terraform-aws-acs-info.git?ref=v1.2.2" + dept_abbr = var.dept_abbr env = var.env vpc_vpn_to_campus = var.vpc_vpn_to_campus } diff --git a/variables.tf b/variables.tf index 71c5685..bec97ab 100644 --- a/variables.tf +++ b/variables.tf @@ -1,3 +1,8 @@ +variable "dept_abbr" { + type = string + default = "oit" + description = "Abbreviation of the department type of account (e.g. oit, trn), defaults to oit." +} variable "env" { type = string description = "Account environment (for finding the shared VPC and tagging the bastion) (e.g. dev, prd)." From eb415814aaaa5696c0c257e9b31f80b57feb6713 Mon Sep 17 00:00:00 2001 From: yoshutch Date: Fri, 31 Jan 2020 11:12:44 -0700 Subject: [PATCH 2/2] gitignore .idea folder --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7a3e2fd..16c68e1 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ override.tf.json # Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan # example: *tfplan* + +.idea