From cfea6ae0bf369dfe8775e463b8ed295595995fff Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Mon, 10 Apr 2023 22:49:52 +0100 Subject: [PATCH 1/6] tmp --- terraform/modules/aws/s3-bucket/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/modules/aws/s3-bucket/main.tf b/terraform/modules/aws/s3-bucket/main.tf index ace675f..ab47815 100644 --- a/terraform/modules/aws/s3-bucket/main.tf +++ b/terraform/modules/aws/s3-bucket/main.tf @@ -3,7 +3,7 @@ variable "organisation" { } resource "aws_s3_bucket" "this" { - bucket = "${var.organisation}-${uuid()}" + bucket = "${var.organisation}-${uuid()}-bucket" } output "bucket_name" { From a2c1365e0fddde014b9f6a46a95d05aa67a2b5e3 Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Mon, 10 Apr 2023 23:09:59 +0100 Subject: [PATCH 2/6] atlantis config --- atlantis.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 atlantis.yaml diff --git a/atlantis.yaml b/atlantis.yaml new file mode 100644 index 0000000..c5beddc --- /dev/null +++ b/atlantis.yaml @@ -0,0 +1,9 @@ +version: 3 +projects: + - name: prod + dir: terraform/aws/alexgregorydotio-prod + autoplan: + when_modified: # relative to dir defined above + - "../../modules/aws/**/*.tf" + - "**/*.tf" + - "**/*.hcl" From 00e26a6f9477e856945da39ec695bcb7918904a5 Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Mon, 10 Apr 2023 23:21:48 +0100 Subject: [PATCH 3/6] updated --- atlantis.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/atlantis.yaml b/atlantis.yaml index c5beddc..2e1bd7e 100644 --- a/atlantis.yaml +++ b/atlantis.yaml @@ -2,8 +2,17 @@ version: 3 projects: - name: prod dir: terraform/aws/alexgregorydotio-prod + terraform_version: 1.4.4 + workflow: terragrunt autoplan: when_modified: # relative to dir defined above - "../../modules/aws/**/*.tf" - "**/*.tf" - "**/*.hcl" + +workflows: + terragrunt: + plan: + steps: + - run: terragrunt plan -input=false + - run: terragrunt show -json $PLANFILE > $SHOWFILE From 9e03f47e79173f03b3b4548636ec265e95f87d02 Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Mon, 10 Apr 2023 23:36:41 +0100 Subject: [PATCH 4/6] updated --- atlantis.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atlantis.yaml b/atlantis.yaml index 2e1bd7e..fd4da8f 100644 --- a/atlantis.yaml +++ b/atlantis.yaml @@ -14,5 +14,8 @@ workflows: terragrunt: plan: steps: - - run: terragrunt plan -input=false - - run: terragrunt show -json $PLANFILE > $SHOWFILE + - run: terragrunt plan -input=false + + apply: + steps: + - run: terragrunt apply -input=false From c6ce7435cfbfd78dfb4740ff7aa6bfa8d240ba9d Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Tue, 11 Apr 2023 00:18:08 +0100 Subject: [PATCH 5/6] updated --- atlantis.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/atlantis.yaml b/atlantis.yaml index fd4da8f..a0254ef 100644 --- a/atlantis.yaml +++ b/atlantis.yaml @@ -3,7 +3,7 @@ projects: - name: prod dir: terraform/aws/alexgregorydotio-prod terraform_version: 1.4.4 - workflow: terragrunt + # workflow: terragrunt autoplan: when_modified: # relative to dir defined above - "../../modules/aws/**/*.tf" @@ -14,8 +14,14 @@ workflows: terragrunt: plan: steps: + # - env: + # name: TERRAGRUNT_TFPATH + # command: "echo terraform" - run: terragrunt plan -input=false apply: steps: + # - env: + # name: TERRAGRUNT_TFPATH + # command: "echo terraform" - run: terragrunt apply -input=false From d1cabab5dc0f000299051b6113fe8498f6609d5c Mon Sep 17 00:00:00 2001 From: Alex Gregory Date: Tue, 11 Apr 2023 10:31:34 +0100 Subject: [PATCH 6/6] updated --- atlantis.yaml | 14 ++++---------- repos.yaml | 5 +++++ 2 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 repos.yaml diff --git a/atlantis.yaml b/atlantis.yaml index a0254ef..de2739e 100644 --- a/atlantis.yaml +++ b/atlantis.yaml @@ -1,9 +1,9 @@ version: 3 projects: - name: prod - dir: terraform/aws/alexgregorydotio-prod + dir: ./terraform/aws/alexgregorydotio-prod terraform_version: 1.4.4 - # workflow: terragrunt + workflow: terragrunt autoplan: when_modified: # relative to dir defined above - "../../modules/aws/**/*.tf" @@ -14,14 +14,8 @@ workflows: terragrunt: plan: steps: - # - env: - # name: TERRAGRUNT_TFPATH - # command: "echo terraform" - - run: terragrunt plan -input=false + - run: terragrunt run-all plan -input=false apply: steps: - # - env: - # name: TERRAGRUNT_TFPATH - # command: "echo terraform" - - run: terragrunt apply -input=false + - run: terragrunt run-all apply -input=false diff --git a/repos.yaml b/repos.yaml new file mode 100644 index 0000000..74140df --- /dev/null +++ b/repos.yaml @@ -0,0 +1,5 @@ +repos: + +- id: /.*/ + allowed_overrides: [workflow] + allow_custom_workflows: true