-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from dfds/feature/cloudplatform/issues/2100
Add template for terragrunt
- Loading branch information
Showing
4 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
inputs = { | ||
# Specify the staging environment. | ||
# Valid Values: "dev", "test", "staging", "uat", "training", "prod". | ||
# Notes: The value will set configuration defaults according to DFDS policies. | ||
environment = "test" | ||
|
||
# Provide a cost centre for the resource. | ||
# Valid Values: . | ||
# Notes: This set the dfds.cost_centre tag. See recommendations [here](https://wiki.dfds.cloud/en/playbooks/standards/tagging_policy). | ||
cost_centre = "example" | ||
} | ||
|
||
generate "provider" { | ||
path = "provider.tf" | ||
if_exists = "overwrite_terragrunt" | ||
contents = <<EOF | ||
provider "aws" { | ||
region = "eu-central-1" | ||
} | ||
EOF | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
remote_state { | ||
backend = "s3" | ||
config { | ||
bucket = "<your_bucket_name>-state-bucket" | ||
encrypt = true | ||
key = "${path_relative_to_include()}/terraform.tfstate" | ||
region = "eu-central-1" | ||
dynamodb_table = "terraform-locks" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
terraform { | ||
source = "git::https://github.com/dfds/terraform-aws-rds.git//?ref=$release" | ||
} | ||
|
||
# Include all settings from the parent terragrunt.hcl file | ||
include "root" { | ||
path = find_in_parent_folders() | ||
} | ||
|
||
# Include env.hcl for environment specific settings | ||
include "env" { | ||
path = find_in_parent_folders("env.hcl") | ||
} | ||
|
||
inputs = { | ||
$inputs | ||
} |