|
@@ -1,21 +1,3 @@
|
|
|
-# TODO: For provisioning only. Comment out after provisioning
|
|
|
-generate "provider" {
|
|
|
- path = "provider.tf"
|
|
|
- if_exists = "overwrite_terragrunt"
|
|
|
- contents = <<EOF
|
|
|
-provider "template" {
|
|
|
- version = "~> 2.1"
|
|
|
-}
|
|
|
-provider "aws" {
|
|
|
- version = "~> 3.0"
|
|
|
- region = "${local.aws_region}"
|
|
|
- profile = "" # TODO this may need changed based on your ~/.aws/credentials
|
|
|
- # Only these AWS Account IDs may be operated on by this template
|
|
|
- allowed_account_ids = ["${local.account_id}"]
|
|
|
-}
|
|
|
-EOF
|
|
|
-}
|
|
|
-
|
|
|
locals {
|
|
|
# If you want to use any of the variables in _this_ file, you have to load them here.
|
|
|
# However, they will all be available as inputs to the module loaded in terraform.source
|
|
@@ -29,9 +11,32 @@ locals {
|
|
|
#global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
|
|
|
|
|
|
# Extract out common variables for reuse
|
|
|
- env = local.environment_vars.locals.environment
|
|
|
+ #env = local.environment_vars.locals.environment
|
|
|
aws_region = local.region_vars.locals.aws_region
|
|
|
account_id = local.account_vars.locals.aws_account_id
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+# TODO: For provisioning only. Comment out after provisioning
|
|
|
+generate "provider" {
|
|
|
+ path = "provider.tf"
|
|
|
+ if_exists = "overwrite_terragrunt"
|
|
|
+ contents = <<EOF
|
|
|
+provider "template" {
|
|
|
+ version = "~> 2.1"
|
|
|
+}
|
|
|
+
|
|
|
+provider "aws" {
|
|
|
+ version = "~> 3.0"
|
|
|
+ region = "${local.aws_region}"
|
|
|
+
|
|
|
+ # TODO: make sure you have a profile matching this
|
|
|
+ profile = "tmp"
|
|
|
+
|
|
|
+ # Only these AWS Account IDs may be operated on by this template
|
|
|
+ allowed_account_ids = ["${local.account_id}"]
|
|
|
+}
|
|
|
+EOF
|
|
|
}
|
|
|
|
|
|
# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
|
|
@@ -55,4 +60,3 @@ inputs = {
|
|
|
Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
|
|
|
}
|
|
|
}
|
|
|
-
|