From fe956c4349955a5e88d838be278ab7b2eae89158 Mon Sep 17 00:00:00 2001 From: mahesh-naxa Date: Mon, 8 Jan 2024 17:53:54 +0545 Subject: [PATCH] infra: added terragrunt.hcl for stag setup --- .gitignore | 1 + scripts/aws/lambda/TM-Extractor/stag/env.hcl | 12 +++++++ .../stag/tm-extractor/terragrunt.hcl | 34 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 scripts/aws/lambda/TM-Extractor/stag/env.hcl create mode 100644 scripts/aws/lambda/TM-Extractor/stag/tm-extractor/terragrunt.hcl diff --git a/.gitignore b/.gitignore index 298875d50d..40b0a6a6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,7 @@ htmlcov/ .terraform *.tfstate *.tfstate.backup +.terraform.lock.hcl # Terragrunt .terragrunt-cache diff --git a/scripts/aws/lambda/TM-Extractor/stag/env.hcl b/scripts/aws/lambda/TM-Extractor/stag/env.hcl new file mode 100644 index 0000000000..88c99ef25e --- /dev/null +++ b/scripts/aws/lambda/TM-Extractor/stag/env.hcl @@ -0,0 +1,12 @@ +# Set common variables for the environment. This is automatically pulled in in the root terragrunt.hcl configuration to +# feed forward to the child modules. + +locals { + environment = "stag" + account_name = "hotosm" + aws_region = "ap-south-1" + application = "tasking-manager" + team = "HOTOSM" + creator = "HOTOSM" + owner = "HOTOSM" +} \ No newline at end of file diff --git a/scripts/aws/lambda/TM-Extractor/stag/tm-extractor/terragrunt.hcl b/scripts/aws/lambda/TM-Extractor/stag/tm-extractor/terragrunt.hcl new file mode 100644 index 0000000000..337d70ca34 --- /dev/null +++ b/scripts/aws/lambda/TM-Extractor/stag/tm-extractor/terragrunt.hcl @@ -0,0 +1,34 @@ +# --------------------------------------------------------------------------------------------------------------------- +# TERRAGRUNT CONFIGURATION +# This is the configuration for Terragrunt, a thin wrapper for Terraform that helps keep your code DRY and +# maintainable: https://github.com/gruntwork-io/terragrunt +# --------------------------------------------------------------------------------------------------------------------- + +# --------------------------------------------------------------------------------------------------------------------- +# Include configurations that are common used across multiple environments. +# --------------------------------------------------------------------------------------------------------------------- + +# Include the root `terragrunt.hcl` configuration. The root configuration contains settings that are common across all +# components and environments, such as how to configure remote state. +include "root" { + path = find_in_parent_folders() +} + +# Include the envcommon configuration for the component. The envcommon configuration contains settings that are common +# for the component across all environments. +include "envcommon" { + path = "${dirname(find_in_parent_folders())}/_envcommon/lambda.hcl" +} + +# --------------------------------------------------------------------------------------------------------------------- +# Override parameters for this environment +# --------------------------------------------------------------------------------------------------------------------- + +# For production, we want to specify bigger instance classes and storage, so we specify override parameters here. These +# inputs get merged with the common inputs from the root and the envcommon lambda.hcl +inputs = { + zip_output_dir = "files" + active_projects_api_base_url = "https://tasking-manager-staging-api.hotosm.org/api/v2" + raw_data_api = "https://api-prod.raw-data.hotosm.org/v1" + config_json = "config.json" +}