diff --git a/atlantis.yaml b/atlantis.yaml new file mode 100644 index 0000000..de2739e --- /dev/null +++ b/atlantis.yaml @@ -0,0 +1,21 @@ +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 run-all plan -input=false + + apply: + steps: + - 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 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" {