This file contains hidden or 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
    
  
  
    
  | // ref: https://packer.io/docs/builders/amazon.html#iam-task-or-instance-role | |
| { | |
| "Statement": [ | |
| { | |
| "Sid": "PackerSecurityGroupAccess", | |
| "Action": [ | |
| "ec2:CreateSecurityGroup", | |
| "ec2:DeleteSecurityGroup", | |
| "ec2:DescribeSecurityGroups", | |
| "ec2:AuthorizeSecurityGroupIngress", | 
  
    
      This file contains hidden or 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
    
  
  
    
  | module "db" { | |
| source = "https://github.com/terraform-aws-modules/terraform-aws-rds" | |
| # ... | |
| } | |
| resource "null_resource" "rds_setup" { | |
| # Don't run this if we're restoring from a snapshot | |
| count = var.db_snapshot_id == "" ? 1 : 0 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | remote_state { | |
| backend = "s3" | |
| config = { | |
| # ... | |
| # use VPC endpoints for STS https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts_vpce.html | |
| sts_endpoint = "sts.ap-southeast-1.amazonaws.com" | |
| # ... | |
| } | |
| } | |
| terraform { | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # an example of a resource that will always throw a folder error | |
| # due to abspath saved in state. | |
| resource "local_file" "rds_bootstrap" { | |
| content = templatefile("scripts/sql_bootstrap.sh", { | |
| # ... | |
| }) | |
| filename = "${abspath(path.module)}/rendered/sql_bootstrap.sh" | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # path: ./modules/naming_conventions/main.tf | |
| # apply all naming conventions in this module | |
| variable "environment" {} | |
| variable "project_code" {} | |
| variable "agency" {} | |
| locals { | |
| iam_policy_name_prefix = format( | |
| "iam-policy-%s-%snana", | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # path: environments/shared/terragrunt.hcl | |
| locals { | |
| environment = "shared" | |
| } | |
| remote_state { | |
| backend = "s3" | |
| config = { | |
| bucket = "bgp-terraform" | |
| #... | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # path: get_parent_terragrunt_dir()/terraform.tf | |
| terraform { | |
| backend "s3" {} | |
| } | |
| provider "aws" { | |
| region = "ap-southeast-1" | |
| endpoints { | |
| sts = "https://sts.ap-southeast-1.amazonaws.com" | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | locals { | |
| environment = "lower" | |
| aws_region = "ap-southeast-1" | |
| } | |
| remote_state { | |
| backend = "s3" | |
| config = { | |
| bucket = "bgp-terraform" | |
| region = "${local.aws_region}" | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # ./modules/route53/variables.tf | |
| variable "environment" { | |
| default = "dev" | |
| } | |
| variable "ips" { | |
| default = | |
| { | |
| smtp = ["10.x.x.x"] | |
| } | 
  
    
      This file contains hidden or 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
    
  
  
    
  | # ./modules/route53/variables.tf | |
| variable "environment_map" { | |
| default = { | |
| dev = { | |
| smtp_ips = ["10.3.0.135"] | |
| } | |
| ci = { | |
| smtp_ips = ["10.3.0.135"] | |
| } | 
NewerOlder