فهرست منبع

Adds section for provider

Fred Damstra 4 سال پیش
والد
کامیت
5d1be24d9a
1فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 21 0
      000-skeleton/005-iam/terragrunt.hcl

+ 21 - 0
000-skeleton/005-iam/terragrunt.hcl

@@ -14,6 +14,27 @@ locals {
   #env = local.environment_vars.locals.environment
 }
 
+# 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 = "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
 # working directory, into a temporary folder, and execute your Terraform commands in that folder.
 terraform {