Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/basic structure #5

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open

Feat/basic structure #5

wants to merge 67 commits into from

Conversation

vaibhav-walke
Copy link
Owner

No description provided.

@vaibhav-walke
Copy link
Owner Author

atlantis plan

@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 10:57:10 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 10:57:10 Running command: terraform --version
[terragrunt] 2020/01/15 10:57:10 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 10:57:10 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 10:57:10 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 10:57:10 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 10:57:10 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_iam_policy_document.policy: Refreshing state...
data.aws_iam_policy_document.assume_role_policy: Refreshing state...
aws_iam_policy.sourceaccountrolepolicy: Refreshing state... [id=arn:aws:iam::711433298525:policy/SourceAccountRole]
aws_iam_role.sourceaccountrole: Refreshing state... [id=SourceAccountRole]
aws_iam_role_policy_attachment.sourceaccountrolepolicyattach: Refreshing state... [id=SourceAccountRole-20200115105302299000000001]

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 10:57:15 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 10:57:15 Running command: terraform --version
[terragrunt] 2020/01/15 10:57:15 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 10:57:15 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:15 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:15 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:15 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_role.sourceaccountrole: Refreshing state... [id=SourceAccountRole]
aws_iam_role_policy_attachment.sourceaccountrolepolicyattach: Refreshing state... [id=SourceAccountRole-20200115105302299000000001]
aws_iam_policy.sourceaccountrolepolicy: Refreshing state... [id=arn:aws:iam::711433298525:policy/SourceAccountRole]
data.aws_iam_policy_document.cross_account_role_policy: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be created
  + resource "aws_iam_policy" "policies" {
      + arn         = (known after apply)
      + description = "Description 1"
      + id          = (known after apply)
      + name        = "policy-1-name"
      + path        = "/"
      + policy      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "*"
                      + Effect   = "Allow"
                      + Resource = "*"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # aws_iam_policy.policies[1] will be created
  + resource "aws_iam_policy" "policies" {
      + arn         = (known after apply)
      + description = "Description 2"
      + id          = (known after apply)
      + name        = "policy-2-name"
      + path        = "/"
      + policy      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "*"
                      + Effect   = "Allow"
                      + Resource = "*"
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # aws_iam_policy.sourceaccountrolepolicy will be destroyed
  - resource "aws_iam_policy" "sourceaccountrolepolicy" {
      - arn         = "arn:aws:iam::711433298525:policy/SourceAccountRole" -> null
      - description = "Managed by Terraform for Atlantis" -> null
      - id          = "arn:aws:iam::711433298525:policy/SourceAccountRole" -> null
      - name        = "SourceAccountRole" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "s3:*"
                      - Effect   = "Allow"
                      - Resource = "*"
                      - Sid      = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-1-name-policy"
      + policy_arn = (known after apply)
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-2-name-policy"
      + policy_arn = (known after apply)
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_role.cross_account_role will be created
  + resource "aws_iam_role" "cross_account_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::1234567890:role/AWS-Admins"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "the-role-name"
      + path                  = "/engineering/admin/"
      + tags                  = {
          + "Env"   = "dev"
          + "Name"  = "dev-admin-role"
          + "Owner" = "terraform"
        }
      + unique_id             = (known after apply)
    }

  # aws_iam_role.sourceaccountrole will be destroyed
  - resource "aws_iam_role" "sourceaccountrole" {
      - arn                   = "arn:aws:iam::711433298525:role/SourceAccountRole" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - Service = "ec2.amazonaws.com"
                        }
                      - Sid       = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2020-01-15T10:53:01Z" -> null
      - description           = "Managed by Terraform for Atlantis" -> null
      - force_detach_policies = true -> null
      - id                    = "SourceAccountRole" -> null
      - max_session_duration  = 36000 -> null
      - name                  = "SourceAccountRole" -> null
      - path                  = "/" -> null
      - tags                  = {} -> null
      - unique_id             = "AROA2LJF2UJOXCEM7RUVI" -> null
    }

  # aws_iam_role_policy_attachment.sourceaccountrolepolicyattach will be destroyed
  - resource "aws_iam_role_policy_attachment" "sourceaccountrolepolicyattach" {
      - id         = "SourceAccountRole-20200115105302299000000001" -> null
      - policy_arn = "arn:aws:iam::711433298525:policy/SourceAccountRole" -> null
      - role       = "SourceAccountRole" -> null
    }

Plan: 5 to add, 0 to change, 3 to destroy.

Warning: Interpolation-only expressions are deprecated

  on main.tf line 54, in resource "aws_iam_policy" "policies":
  54:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 10:57:19 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 10:57:19 Running command: terraform --version
[terragrunt] 2020/01/15 10:57:19 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 10:57:19 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:19 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:19 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:19 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 10:57:23 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 10:57:23 Running command: terraform --version
[terragrunt] 2020/01/15 10:57:23 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 10:57:23 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:23 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:23 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 10:57:23 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_ami.ubuntu: Refreshing state...
data.aws_availability_zones.all: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

atlantis apply -d live/dev/iam

@vaibhav-walke
Copy link
Owner Author

Ran Apply for dir: live/dev/iam workspace: default

Apply Error

Show Output
exit status 1: running "terragrunt apply -no-color $PLANFILE" in "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam": 
[terragrunt] 2020/01/15 10:57:47 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 10:57:47 Running command: terraform --version
[terragrunt] 2020/01/15 10:57:47 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 10:57:47 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:47 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:47 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 10:57:47 Running command: terraform apply -no-color /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
aws_iam_role_policy_attachment.sourceaccountrolepolicyattach: Destroying... [id=SourceAccountRole-20200115105302299000000001]
aws_iam_policy.policies[1]: Creating...
aws_iam_role.cross_account_role: Creating...
aws_iam_policy.policies[0]: Creating...
aws_iam_role_policy_attachment.sourceaccountrolepolicyattach: Destruction complete after 0s
aws_iam_policy.sourceaccountrolepolicy: Destroying... [id=arn:aws:iam::711433298525:policy/SourceAccountRole]
aws_iam_role.sourceaccountrole: Destroying... [id=SourceAccountRole]
aws_iam_policy.policies[0]: Creation complete after 1s [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_policy.sourceaccountrolepolicy: Destruction complete after 1s
aws_iam_policy.policies[1]: Creation complete after 1s [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_role.sourceaccountrole: Destruction complete after 1s
aws_iam_role.cross_account_role: Still creating... [10s elapsed]
aws_iam_role.cross_account_role: Still creating... [20s elapsed]
aws_iam_role.cross_account_role: Still creating... [30s elapsed]

Warning: Interpolation-only expressions are deprecated

  on main.tf line 54, in resource "aws_iam_policy" "policies":
  54:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


Error: Error creating IAM Role the-role-name: MalformedPolicyDocument: Invalid principal in policy: "AWS":"arn:aws:iam::1234567890:role/AWS-Admins"
	status code: 400, request id: 4543ed0a-4be2-44fc-b6f3-79fd1b813083

  on main.tf line 33, in resource "aws_iam_role" "cross_account_role":
  33: resource "aws_iam_role" "cross_account_role" {


[terragrunt] 2020/01/15 10:58:19 Hit multiple errors:
exit status 1


@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:08:13 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:08:13 Running command: terraform --version
[terragrunt] 2020/01/15 11:08:13 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:08:13 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:08:13 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:08:13 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:08:13 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:08:14 Running command: terraform init -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:08:16 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
data.aws_iam_policy_document.assume_role_policy: Refreshing state...
data.aws_iam_policy_document.policy: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - description = "Description 1" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - name        = "policy-1-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.policies[1] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - description = "Description 2" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - name        = "policy-2-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.sourceaccountrolepolicy will be created
  + resource "aws_iam_policy" "sourceaccountrolepolicy" {
      + arn         = (known after apply)
      + description = "Managed by Terraform for Atlantis"
      + id          = (known after apply)
      + name        = "SourceAccountRole"
      + path        = "/"
      + policy      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "s3:*"
                      + Effect   = "Allow"
                      + Resource = "*"
                      + Sid      = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # aws_iam_role.sourceaccountrole will be created
  + resource "aws_iam_role" "sourceaccountrole" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "ec2.amazonaws.com"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform for Atlantis"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "SourceAccountRole"
      + path                  = "/"
      + unique_id             = (known after apply)
    }

  # aws_iam_role_policy_attachment.sourceaccountrolepolicyattach will be created
  + resource "aws_iam_role_policy_attachment" "sourceaccountrolepolicyattach" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "SourceAccountRole"
    }

Plan: 3 to add, 0 to change, 2 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:08:20 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:08:20 Running command: terraform --version
[terragrunt] 2020/01/15 11:08:20 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:08:20 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:08:20 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:08:20 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:08:20 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:08:21 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:08:23 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_iam_policy_document.cross_account_role_policy: Refreshing state...
aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-1-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-1-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-2-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-2-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_role.cross_account_role will be created
  + resource "aws_iam_role" "cross_account_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::037560318346:role/AWS-Admins"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "the-role-name"
      + path                  = "/engineering/admin/"
      + tags                  = {
          + "Env"   = "dev"
          + "Name"  = "dev-admin-role"
          + "Owner" = "terraform"
        }
      + unique_id             = (known after apply)
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Warning: Interpolation-only expressions are deprecated

  on main.tf line 54, in resource "aws_iam_policy" "policies":
  54:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:08:27 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:08:27 Running command: terraform --version
[terragrunt] 2020/01/15 11:08:27 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:08:27 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:08:27 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:08:27 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:08:27 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:08:28 Running command: terraform init -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:08:30 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:08:34 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:08:34 Running command: terraform --version
[terragrunt] 2020/01/15 11:08:34 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:08:34 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:08:34 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:08:34 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:08:34 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:08:34 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:08:37 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

atlantis apply -d live/dev/iam

@vaibhav-walke
Copy link
Owner Author

Ran Apply for dir: live/dev/iam workspace: default

Apply Error

Show Output
exit status 1: running "terragrunt apply -no-color $PLANFILE" in "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam": 
[terragrunt] 2020/01/15 11:09:09 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:09:09 Running command: terraform --version
[terragrunt] 2020/01/15 11:09:09 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:09:09 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:09:09 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:09:09 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:09:09 Running command: terraform apply -no-color /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
aws_iam_role.cross_account_role: Creating...
aws_iam_role.cross_account_role: Still creating... [10s elapsed]
aws_iam_role.cross_account_role: Still creating... [20s elapsed]
aws_iam_role.cross_account_role: Still creating... [30s elapsed]

Warning: Interpolation-only expressions are deprecated

  on main.tf line 54, in resource "aws_iam_policy" "policies":
  54:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


Error: Error creating IAM Role the-role-name: MalformedPolicyDocument: Invalid principal in policy: "AWS":"arn:aws:iam::037560318346:role/AWS-Admins"
	status code: 400, request id: 5b17250c-8f2e-4360-953f-851c4b1b944a

  on main.tf line 33, in resource "aws_iam_role" "cross_account_role":
  33: resource "aws_iam_role" "cross_account_role" {


[terragrunt] 2020/01/15 11:09:42 Hit multiple errors:
exit status 1


@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:17:45 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:17:45 Running command: terraform --version
[terragrunt] 2020/01/15 11:17:45 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:17:45 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:17:45 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:17:45 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:17:45 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:17:45 Running command: terraform init -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:17:48 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
data.aws_iam_policy_document.policy: Refreshing state...
data.aws_iam_policy_document.assume_role_policy: Refreshing state...
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - description = "Description 1" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - name        = "policy-1-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.policies[1] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - description = "Description 2" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - name        = "policy-2-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.sourceaccountrolepolicy will be created
  + resource "aws_iam_policy" "sourceaccountrolepolicy" {
      + arn         = (known after apply)
      + description = "Managed by Terraform for Atlantis"
      + id          = (known after apply)
      + name        = "SourceAccountRole"
      + path        = "/"
      + policy      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "s3:*"
                      + Effect   = "Allow"
                      + Resource = "*"
                      + Sid      = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # aws_iam_role.sourceaccountrole will be created
  + resource "aws_iam_role" "sourceaccountrole" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "ec2.amazonaws.com"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform for Atlantis"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "SourceAccountRole"
      + path                  = "/"
      + unique_id             = (known after apply)
    }

  # aws_iam_role_policy_attachment.sourceaccountrolepolicyattach will be created
  + resource "aws_iam_role_policy_attachment" "sourceaccountrolepolicyattach" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "SourceAccountRole"
    }

Plan: 3 to add, 0 to change, 2 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:17:52 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:17:52 Running command: terraform --version
[terragrunt] 2020/01/15 11:17:52 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:17:52 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:17:52 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:17:52 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:17:52 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:17:52 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:17:55 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-1-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-1-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-2-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-2-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_role.cross_account_role will be created
  + resource "aws_iam_role" "cross_account_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::037560318346:role/AWS-Admins"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "the-role-name"
      + path                  = "/engineering/admin/"
      + tags                  = {
          + "Env"   = "dev"
          + "Name"  = "dev-admin-role"
          + "Owner" = "terraform"
        }
      + unique_id             = (known after apply)
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Warning: Interpolation-only expressions are deprecated

  on main.tf line 56, in resource "aws_iam_policy" "policies":
  56:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:17:59 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:17:59 Running command: terraform --version
[terragrunt] 2020/01/15 11:17:59 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:17:59 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:17:59 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:17:59 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:17:59 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:17:59 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:18:02 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:18:05 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:18:05 Running command: terraform --version
[terragrunt] 2020/01/15 11:18:05 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:18:05 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:18:05 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:18:05 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:18:05 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:18:06 Running command: terraform init -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:18:08 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

atlantis apply -d live/dev/iam

@vaibhav-walke
Copy link
Owner Author

Ran Apply for dir: live/dev/iam workspace: default

Apply Error

Show Output
exit status 1: running "terragrunt apply -no-color $PLANFILE" in "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam": 
[terragrunt] 2020/01/15 11:18:57 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:18:57 Running command: terraform --version
[terragrunt] 2020/01/15 11:18:57 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:18:57 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:18:57 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:18:57 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:18:57 Running command: terraform apply -no-color /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
aws_iam_role.cross_account_role: Creating...
aws_iam_role.cross_account_role: Still creating... [10s elapsed]
aws_iam_role.cross_account_role: Still creating... [20s elapsed]
aws_iam_role.cross_account_role: Still creating... [30s elapsed]

Warning: Interpolation-only expressions are deprecated

  on main.tf line 56, in resource "aws_iam_policy" "policies":
  56:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


Error: Error creating IAM Role the-role-name: MalformedPolicyDocument: Invalid principal in policy: "AWS":"arn:aws:iam::037560318346:role/AWS-Admins"
	status code: 400, request id: 14322049-a5dd-4103-8318-e8b83ce09248

  on main.tf line 21, in resource "aws_iam_role" "cross_account_role":
  21: resource "aws_iam_role" "cross_account_role" {


[terragrunt] 2020/01/15 11:19:29 Hit multiple errors:
exit status 1


@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:33:17 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:33:17 Running command: terraform --version
[terragrunt] 2020/01/15 11:33:17 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:33:17 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/SourceAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:33:17 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] 2020/01/15 11:33:17 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/3Zw3VUVTF6lWaDcYbONvLCRKTOg
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:33:17 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:33:18 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:33:20 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
data.aws_iam_policy_document.assume_role_policy: Refreshing state...
data.aws_iam_policy_document.policy: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - description = "Description 1" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - name        = "policy-1-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.policies[1] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - description = "Description 2" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - name        = "policy-2-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.sourceaccountrolepolicy will be created
  + resource "aws_iam_policy" "sourceaccountrolepolicy" {
      + arn         = (known after apply)
      + description = "Managed by Terraform for Atlantis"
      + id          = (known after apply)
      + name        = "SourceAccountRole"
      + path        = "/"
      + policy      = jsonencode(
            {
              + Statement = [
                  + {
                      + Action   = "s3:*"
                      + Effect   = "Allow"
                      + Resource = "*"
                      + Sid      = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
    }

  # aws_iam_role.sourceaccountrole will be created
  + resource "aws_iam_role" "sourceaccountrole" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + Service = "ec2.amazonaws.com"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform for Atlantis"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "SourceAccountRole"
      + path                  = "/"
      + unique_id             = (known after apply)
    }

  # aws_iam_role_policy_attachment.sourceaccountrolepolicyattach will be created
  + resource "aws_iam_role_policy_attachment" "sourceaccountrolepolicyattach" {
      + id         = (known after apply)
      + policy_arn = (known after apply)
      + role       = "SourceAccountRole"
    }

Plan: 3 to add, 0 to change, 2 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:33:24 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:33:24 Running command: terraform --version
[terragrunt] 2020/01/15 11:33:24 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:33:24 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:33:24 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:33:24 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:33:24 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:33:24 Running command: terraform init -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:33:27 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-1-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-1-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be created
  + resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      + id         = (known after apply)
      + name       = "policy-2-name-policy"
      + policy_arn = "arn:aws:iam::711433298525:policy/policy-2-name"
      + roles      = [
          + "the-role-name",
        ]
    }

  # aws_iam_role.cross_account_role will be created
  + resource "aws_iam_role" "cross_account_role" {
      + arn                   = (known after apply)
      + assume_role_policy    = jsonencode(
            {
              + Statement = [
                  + {
                      + Action    = "sts:AssumeRole"
                      + Effect    = "Allow"
                      + Principal = {
                          + AWS = "arn:aws:iam::711433298525:role/AssumeRole"
                        }
                      + Sid       = ""
                    },
                ]
              + Version   = "2012-10-17"
            }
        )
      + create_date           = (known after apply)
      + description           = "Managed by Terraform"
      + force_detach_policies = true
      + id                    = (known after apply)
      + max_session_duration  = 36000
      + name                  = "the-role-name"
      + path                  = "/engineering/admin/"
      + tags                  = {
          + "Env"   = "dev"
          + "Name"  = "dev-admin-role"
          + "Owner" = "terraform"
        }
      + unique_id             = (known after apply)
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Warning: Interpolation-only expressions are deprecated

  on main.tf line 56, in resource "aws_iam_policy" "policies":
  56:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:33:31 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:33:31 Running command: terraform --version
[terragrunt] 2020/01/15 11:33:31 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:33:31 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:33:31 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:33:31 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:33:31 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:33:32 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:33:34 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:33:38 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:33:38 Running command: terraform --version
[terragrunt] 2020/01/15 11:33:38 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:33:38 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:33:38 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:33:38 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:33:38 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:33:38 Running command: terraform init -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:33:40 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

atlantis apply -d live/dev/iam

@vaibhav-walke
Copy link
Owner Author

Ran Apply for dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:35:03 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:35:03 Running command: terraform --version
[terragrunt] 2020/01/15 11:35:03 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:35:03 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/TargetAccountIAM into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:35:03 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:35:03 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/5JFf6YeMRgVcCyDSvcUei6uwt-Y
[terragrunt] 2020/01/15 11:35:03 Running command: terraform apply -no-color /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
aws_iam_role.cross_account_role: Creating...
aws_iam_role.cross_account_role: Creation complete after 0s [id=the-role-name]
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Creating...
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Creating...
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Creation complete after 2s [id=policy-2-name-policy]
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Creation complete after 2s [id=policy-1-name-policy]

Warning: Interpolation-only expressions are deprecated

  on main.tf line 56, in resource "aws_iam_policy" "policies":
  56:   count = "${length(var.policies)}"

Terraform 0.11 and earlier required all non-constant expressions to be
provided via interpolation syntax, but this pattern is now deprecated. To
silence this warning, remove the "${ sequence from the start and the }"
sequence from the end of this expression, leaving just the inner expression.

Template interpolation syntax is still used to construct strings from
expressions when the template includes multiple interpolation sequences or a
mixture of literal strings and interpolations. This deprecation applies only
to templates that consist entirely of a single interpolation sequence.

(and 4 more similar warnings elsewhere)


Warning: Quoted type constraints are deprecated

  on vars.tf line 51, in variable "tags":
  51:   type        = "map"

Terraform 0.11 and earlier required type constraints to be given in quotes,
but that form is now deprecated and will be removed in a future version of
Terraform. To silence this warning, remove the quotes around "map" and write
map(string) instead to explicitly indicate that the map elements are strings.

(and one more similar warning elsewhere)


Apply complete! Resources: 3 added, 0 changed, 0 destroyed.

Outputs:

assumer_account_id = 711433298525
assumer_account_role_arn = arn:aws:iam::711433298525:role/AssumeRole
assumer_account_role_name = AssumeRole
assumer_account_role_path = /
cross_account_exclusive_policy_attachment_ids = [
  [
    "policy-1-name-policy",
    "policy-2-name-policy",
  ],
]
cross_account_exclusive_policy_attachment_names = [
  [
    "policy-1-name-policy",
    "policy-2-name-policy",
  ],
]
cross_account_exclusive_policy_attachment_policy_arns = [
  [
    "arn:aws:iam::711433298525:policy/policy-1-name",
    "arn:aws:iam::711433298525:policy/policy-2-name",
  ],
]
cross_account_exclusive_policy_attachment_role_names = [
  [
    [
      "the-role-name",
    ],
    [
      "the-role-name",
    ],
  ],
]
cross_account_imperative_policy_attachment_ids = [
  [],
]
cross_account_imperative_policy_attachment_names = [
  [],
]
cross_account_imperative_policy_attachment_policy_arns = [
  [],
]
cross_account_imperative_policy_attachment_role_names = [
  [],
]
cross_account_policy_arns = [
  [
    "arn:aws:iam::711433298525:policy/policy-1-name",
    "arn:aws:iam::711433298525:policy/policy-2-name",
  ],
]
cross_account_policy_ids = [
  [
    "arn:aws:iam::711433298525:policy/policy-1-name",
    "arn:aws:iam::711433298525:policy/policy-2-name",
  ],
]
cross_account_policy_names = [
  [
    "policy-1-name",
    "policy-2-name",
  ],
]
cross_account_policy_paths = [
  [
    "/",
    "/",
  ],
]
cross_account_policy_policies = [
  [
    "{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": \"*\",\n            \"Resource\": \"*\"\n        }\n    ]\n}",
    "{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Effect\": \"Allow\",\n            \"Action\": \"*\",\n            \"Resource\": \"*\"\n        }\n    ]\n}",
  ],
]
cross_account_role_arn = arn:aws:iam::711433298525:role/engineering/admin/the-role-name
cross_account_role_assume_role_policy = {"Version":"2012-10-17","Statement":[{"Sid":"","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::711433298525:role/AssumeRole"},"Action":"sts:AssumeRole"}]}
cross_account_role_force_detach_policies = true
cross_account_role_id = AROA2LJF2UJO6JHXFCHT4
cross_account_role_name = the-role-name
cross_account_role_path = /engineering/admin/
cross_account_role_session_duration = 36000

@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Plan Error

Show Output
exit status 1: running "terragrunt plan -no-color -out $PLANFILE" in "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam": 
[terragrunt] 2020/01/15 11:38:32 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:38:32 Running command: terraform --version
[terragrunt] 2020/01/15 11:38:32 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:38:32 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:38:32 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:38:32 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:38:32 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:38:32 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:38:35 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Error: The role "arn:aws:iam::711433298525:role/AdminRoleForResourceCreation" cannot be assumed.

  There are a number of possible causes of this - the most common are:
    * The credentials used in order to assume the role are invalid
    * The credentials do not have appropriate permission to assume the role
    * The role ARN is not valid

  on main.tf line 1, in provider "aws":
   1: provider "aws" {


[terragrunt] 2020/01/15 11:38:37 Hit multiple errors:
exit status 1



2. dir: live/dev/iam workspace: default

Plan Error

Show Output
exit status 1: running "terragrunt plan -no-color -out $PLANFILE" in "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam": 
[terragrunt] 2020/01/15 11:38:37 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:38:37 Running command: terraform --version
[terragrunt] 2020/01/15 11:38:37 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:38:37 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:38:37 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:38:37 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:38:37 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:38:37 Running command: terraform init -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:38:40 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


Error: The role "arn:aws:iam::711433298525:role/AdminRoleForResourceCreation" cannot be assumed.

  There are a number of possible causes of this - the most common are:
    * The credentials used in order to assume the role are invalid
    * The credentials do not have appropriate permission to assume the role
    * The role ARN is not valid

  on main.tf line 1, in provider "aws":
   1: provider "aws" {


[terragrunt] 2020/01/15 11:38:42 Hit multiple errors:
exit status 1



3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:38:42 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:38:42 Running command: terraform --version
[terragrunt] 2020/01/15 11:38:42 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:38:42 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:38:42 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:38:42 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:38:42 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:38:42 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:38:45 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

This plan was not saved because one or more projects failed and automerge requires all plans pass.


4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:38:48 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:38:48 Running command: terraform --version
[terragrunt] 2020/01/15 11:38:48 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:38:48 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:38:48 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:38:48 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:38:48 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:38:48 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:38:51 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

This plan was not saved because one or more projects failed and automerge requires all plans pass.


@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:43:30 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:43:30 Running command: terraform --version
[terragrunt] 2020/01/15 11:43:30 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:43:30 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:43:30 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:43:30 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:43:30 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:43:30 Running command: terraform init -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:43:32 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Refreshing state... [id=policy-1-name-policy]
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Refreshing state... [id=policy-2-name-policy]
aws_iam_role.cross_account_role: Refreshing state... [id=the-role-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - description = "Description 1" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - name        = "policy-1-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.policies[1] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - description = "Description 2" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - name        = "policy-2-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be destroyed
  - resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      - groups     = [] -> null
      - id         = "policy-1-name-policy" -> null
      - name       = "policy-1-name-policy" -> null
      - policy_arn = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - roles      = [
          - "the-role-name",
        ] -> null
      - users      = [] -> null
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be destroyed
  - resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      - groups     = [] -> null
      - id         = "policy-2-name-policy" -> null
      - name       = "policy-2-name-policy" -> null
      - policy_arn = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - roles      = [
          - "the-role-name",
        ] -> null
      - users      = [] -> null
    }

  # aws_iam_role.cross_account_role will be destroyed
  - resource "aws_iam_role" "cross_account_role" {
      - arn                   = "arn:aws:iam::711433298525:role/engineering/admin/the-role-name" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::711433298525:role/AssumeRole"
                        }
                      - Sid       = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2020-01-15T11:35:05Z" -> null
      - description           = "Managed by Terraform" -> null
      - force_detach_policies = true -> null
      - id                    = "the-role-name" -> null
      - max_session_duration  = 36000 -> null
      - name                  = "the-role-name" -> null
      - path                  = "/engineering/admin/" -> null
      - tags                  = {
          - "Env"   = "dev"
          - "Name"  = "dev-admin-role"
          - "Owner" = "terraform"
        } -> null
      - unique_id             = "AROA2LJF2UJO6JHXFCHT4" -> null
    }

Plan: 0 to add, 0 to change, 5 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:43:37 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:43:37 Running command: terraform --version
[terragrunt] 2020/01/15 11:43:37 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:43:37 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:43:37 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:43:37 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:43:37 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:43:37 Running command: terraform init -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:43:39 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_iam_policy.policies[1]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Refreshing state... [id=policy-2-name-policy]
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Refreshing state... [id=policy-1-name-policy]
aws_iam_policy.policies[0]: Refreshing state... [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_role.cross_account_role: Refreshing state... [id=the-role-name]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  # aws_iam_policy.policies[0] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - description = "Description 1" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - name        = "policy-1-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy.policies[1] will be destroyed
  - resource "aws_iam_policy" "policies" {
      - arn         = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - description = "Description 2" -> null
      - id          = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - name        = "policy-2-name" -> null
      - path        = "/" -> null
      - policy      = jsonencode(
            {
              - Statement = [
                  - {
                      - Action   = "*"
                      - Effect   = "Allow"
                      - Resource = "*"
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[0] will be destroyed
  - resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      - groups     = [] -> null
      - id         = "policy-1-name-policy" -> null
      - name       = "policy-1-name-policy" -> null
      - policy_arn = "arn:aws:iam::711433298525:policy/policy-1-name" -> null
      - roles      = [
          - "the-role-name",
        ] -> null
      - users      = [] -> null
    }

  # aws_iam_policy_attachment.exclusive_policy_attachment[1] will be destroyed
  - resource "aws_iam_policy_attachment" "exclusive_policy_attachment" {
      - groups     = [] -> null
      - id         = "policy-2-name-policy" -> null
      - name       = "policy-2-name-policy" -> null
      - policy_arn = "arn:aws:iam::711433298525:policy/policy-2-name" -> null
      - roles      = [
          - "the-role-name",
        ] -> null
      - users      = [] -> null
    }

  # aws_iam_role.cross_account_role will be destroyed
  - resource "aws_iam_role" "cross_account_role" {
      - arn                   = "arn:aws:iam::711433298525:role/engineering/admin/the-role-name" -> null
      - assume_role_policy    = jsonencode(
            {
              - Statement = [
                  - {
                      - Action    = "sts:AssumeRole"
                      - Effect    = "Allow"
                      - Principal = {
                          - AWS = "arn:aws:iam::711433298525:role/AssumeRole"
                        }
                      - Sid       = ""
                    },
                ]
              - Version   = "2012-10-17"
            }
        ) -> null
      - create_date           = "2020-01-15T11:35:05Z" -> null
      - description           = "Managed by Terraform" -> null
      - force_detach_policies = true -> null
      - id                    = "the-role-name" -> null
      - max_session_duration  = 36000 -> null
      - name                  = "the-role-name" -> null
      - path                  = "/engineering/admin/" -> null
      - tags                  = {
          - "Env"   = "dev"
          - "Name"  = "dev-admin-role"
          - "Owner" = "terraform"
        } -> null
      - unique_id             = "AROA2LJF2UJO6JHXFCHT4" -> null
    }

Plan: 0 to add, 0 to change, 5 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:43:43 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:43:43 Running command: terraform --version
[terragrunt] 2020/01/15 11:43:43 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:43:43 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:43:43 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:43:43 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:43:43 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:43:43 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:43:46 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:43:50 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:43:50 Running command: terraform --version
[terragrunt] 2020/01/15 11:43:50 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:43:50 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:43:50 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:43:50 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:43:50 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:43:50 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 11:43:52 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

atlantis apply -d live/atlantis/iam

@vaibhav-walke
Copy link
Owner Author

Ran Apply for dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:44:32 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:44:32 Running command: terraform --version
[terragrunt] 2020/01/15 11:44:32 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:44:32 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:44:32 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:44:32 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:44:32 Running command: terraform apply -no-color /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Destroying... [id=policy-2-name-policy]
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Destroying... [id=policy-1-name-policy]
aws_iam_policy_attachment.exclusive_policy_attachment[1]: Destruction complete after 0s
aws_iam_policy_attachment.exclusive_policy_attachment[0]: Destruction complete after 0s
aws_iam_policy.policies[0]: Destroying... [id=arn:aws:iam::711433298525:policy/policy-1-name]
aws_iam_role.cross_account_role: Destroying... [id=the-role-name]
aws_iam_policy.policies[1]: Destroying... [id=arn:aws:iam::711433298525:policy/policy-2-name]
aws_iam_policy.policies[0]: Destruction complete after 1s
aws_iam_policy.policies[1]: Destruction complete after 1s
aws_iam_role.cross_account_role: Destruction complete after 2s

Apply complete! Resources: 0 added, 0 changed, 5 destroyed.

@vaibhav-walke
Copy link
Owner Author

atlantis plan

@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:45:42 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 11:45:42 Running command: terraform --version
[terragrunt] 2020/01/15 11:45:42 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:45:42 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:42 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:42 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:42 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 11:45:43 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 11:45:43 Running command: terraform --version
[terragrunt] 2020/01/15 11:45:43 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:45:43 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:43 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:43 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 11:45:43 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:45:45 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 11:45:45 Running command: terraform --version
[terragrunt] 2020/01/15 11:45:45 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:45:45 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:45 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:45 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:45 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 11:45:48 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 11:45:48 Running command: terraform --version
[terragrunt] 2020/01/15 11:45:48 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 11:45:48 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:48 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:48 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 11:45:49 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 12:23:22 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 12:23:22 Running command: terraform --version
[terragrunt] 2020/01/15 12:23:23 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:23:23 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:23:23 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:23:23 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 12:23:23 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 12:23:23 Running command: terraform init -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 12:23:25 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 12:23:26 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 12:23:26 Running command: terraform --version
[terragrunt] 2020/01/15 12:23:27 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:23:27 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:23:27 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:23:27 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 12:23:27 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 12:23:27 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=iam/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 12:23:29 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 12:23:31 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 12:23:31 Running command: terraform --version
[terragrunt] 2020/01/15 12:23:31 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:23:31 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:23:31 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:23:31 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 12:23:31 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 12:23:31 Running command: terraform init -backend-config=region=eu-west-1 -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 12:23:33 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 12:23:37 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 12:23:37 Running command: terraform --version
[terragrunt] 2020/01/15 12:23:37 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:23:37 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:23:37 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:23:37 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 12:23:37 Initializing remote state for the s3 backend
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 12:23:37 Running command: terraform init -backend-config=bucket=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=dynamodb_table=aws-poc-sparebank1-terragrunt-example-terraform-state-dev -backend-config=encrypt=true -backend-config=key=ec2/terraform.tfstate -backend-config=region=eu-west-1

�[0m�[1mInitializing the backend...�[0m
�[0m�[32m
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.�[0m

�[0m�[1mInitializing provider plugins...�[0m
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.44.0...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.aws: version = "~> 2.44"

�[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
�[0m�[32m
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.�[0m
[terragrunt] 2020/01/15 12:23:40 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

Copy link
Owner Author

atlantis plan -d live/atlantis/iam

@vaibhav-walke
Copy link
Owner Author

Ran Plan for dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 12:25:18 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 12:25:18 Running command: terraform --version
[terragrunt] 2020/01/15 12:25:18 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:25:18 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:25:18 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:25:18 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:25:18 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

Copy link
Owner Author

atlantis plan

@vaibhav-walke
Copy link
Owner Author

Ran Plan for 4 projects:

  1. dir: live/atlantis/iam workspace: default
  2. dir: live/dev/iam workspace: default
  3. dir: live/dev/ec2 workspace: default
  4. dir: live/qa/ec2 workspace: default

1. dir: live/atlantis/iam workspace: default

Show Output
[terragrunt] 2020/01/15 12:26:21 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam] 2020/01/15 12:26:21 Running command: terraform --version
[terragrunt] 2020/01/15 12:26:21 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:26:21 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:21 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:21 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/.terragrunt-cache/jQBwtsobTorzVoBLUmFAkQ4nWcw/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:21 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/atlantis/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/atlantis/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/atlantis/iam

2. dir: live/dev/iam workspace: default

Show Output
[terragrunt] 2020/01/15 12:26:22 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam] 2020/01/15 12:26:22 Running command: terraform --version
[terragrunt] 2020/01/15 12:26:22 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:26:22 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/EmptyModule into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:22 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:22 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/.terragrunt-cache/Xy-zeOLGaIRQY9AskDQBqbX56S0/4_nKPqJI-HbzDjYmZKOgdTnB2jw
[terragrunt] 2020/01/15 12:26:22 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/iam/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.
  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/iam
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/iam

3. dir: live/dev/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 12:26:24 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2] 2020/01/15 12:26:24 Running command: terraform --version
[terragrunt] 2020/01/15 12:26:24 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:26:24 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:24 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:24 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/.terragrunt-cache/CU-T-ke6IyaCFQfRHoiSKYA-nqs/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:24 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_availability_zones.all: Refreshing state...
data.aws_ami.ubuntu: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/dev/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/dev/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/dev/ec2

4. dir: live/qa/ec2 workspace: default

Show Output
[terragrunt] 2020/01/15 12:26:28 Reading Terragrunt config file at /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/terragrunt.hcl
[terragrunt] [/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2] 2020/01/15 12:26:28 Running command: terraform --version
[terragrunt] 2020/01/15 12:26:28 WARNING: no double-slash (//) found in source URL /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules. Relative paths in downloaded Terraform code may not work.
[terragrunt] 2020/01/15 12:26:28 Downloading Terraform configurations from file:///home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/modules/web-server-modules into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:28 Copying files from /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2 into /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:28 Setting working directory to /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/.terragrunt-cache/ocS55gxwBoRy3x8wK93w9EP5UsQ/jW1lFaumdNSQ98eeRxwKuQC4DvU
[terragrunt] 2020/01/15 12:26:28 Running command: terraform plan -no-color -out /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.aws_ami.ubuntu: Refreshing state...
data.aws_availability_zones.all: Refreshing state...

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_autoscaling_group.webserver_example will be created
  + resource "aws_autoscaling_group" "webserver_example" {
      + arn                       = (known after apply)
      + availability_zones        = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + default_cooldown          = (known after apply)
      + desired_capacity          = (known after apply)
      + force_delete              = false
      + health_check_grace_period = 300
      + health_check_type         = "ELB"
      + id                        = (known after apply)
      + launch_configuration      = (known after apply)
      + load_balancers            = [
          + "webserver-example-qa",
        ]
      + max_size                  = 2
      + metrics_granularity       = "1Minute"
      + min_size                  = 2
      + name                      = (known after apply)
      + protect_from_scale_in     = false
      + service_linked_role_arn   = (known after apply)
      + target_group_arns         = (known after apply)
      + vpc_zone_identifier       = (known after apply)
      + wait_for_capacity_timeout = "10m"

      + tag {
          + key                 = "Name"
          + propagate_at_launch = true
          + value               = "webserver-example-qa"
        }
    }

  # aws_elb.webserver_example will be created
  + resource "aws_elb" "webserver_example" {
      + arn                         = (known after apply)
      + availability_zones          = [
          + "eu-west-1a",
          + "eu-west-1b",
          + "eu-west-1c",
        ]
      + connection_draining         = false
      + connection_draining_timeout = 300
      + cross_zone_load_balancing   = true
      + dns_name                    = (known after apply)
      + id                          = (known after apply)
      + idle_timeout                = 60
      + instances                   = (known after apply)
      + internal                    = (known after apply)
      + name                        = "webserver-example-qa"
      + security_groups             = (known after apply)
      + source_security_group       = (known after apply)
      + source_security_group_id    = (known after apply)
      + subnets                     = (known after apply)
      + zone_id                     = (known after apply)

      + health_check {
          + healthy_threshold   = 2
          + interval            = 30
          + target              = "HTTP:8080/"
          + timeout             = 3
          + unhealthy_threshold = 2
        }

      + listener {
          + instance_port     = 8080
          + instance_protocol = "http"
          + lb_port           = 80
          + lb_protocol       = "http"
        }
    }

  # aws_launch_configuration.webserver_example will be created
  + resource "aws_launch_configuration" "webserver_example" {
      + arn                         = (known after apply)
      + associate_public_ip_address = false
      + ebs_optimized               = (known after apply)
      + enable_monitoring           = true
      + id                          = (known after apply)
      + image_id                    = "ami-0b508e9b54730f606"
      + instance_type               = "t2.micro"
      + key_name                    = (known after apply)
      + name                        = (known after apply)
      + security_groups             = (known after apply)
      + user_data                   = "4430fd6498339061effa6d27ccf341a1e94569d7"

      + ebs_block_device {
          + delete_on_termination = (known after apply)
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + no_device             = (known after apply)
          + snapshot_id           = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + volume_size           = (known after apply)
          + volume_type           = (known after apply)
        }
    }

  # aws_security_group.asg will be created
  + resource "aws_security_group" "asg" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-asg"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group.elb will be created
  + resource "aws_security_group" "elb" {
      + arn                    = (known after apply)
      + description            = "Managed by Terraform"
      + egress                 = (known after apply)
      + id                     = (known after apply)
      + ingress                = (known after apply)
      + name                   = "webserver-example-qa-elb"
      + owner_id               = (known after apply)
      + revoke_rules_on_delete = false
      + vpc_id                 = (known after apply)
    }

  # aws_security_group_rule.asg_allow_http_inbound will be created
  + resource "aws_security_group_rule" "asg_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 8080
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 8080
      + type                     = "ingress"
    }

  # aws_security_group_rule.elb_allow_all_outbound will be created
  + resource "aws_security_group_rule" "elb_allow_all_outbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 0
      + id                       = (known after apply)
      + protocol                 = "-1"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 0
      + type                     = "egress"
    }

  # aws_security_group_rule.elb_allow_http_inbound will be created
  + resource "aws_security_group_rule" "elb_allow_http_inbound" {
      + cidr_blocks              = [
          + "0.0.0.0/0",
        ]
      + from_port                = 80
      + id                       = (known after apply)
      + protocol                 = "tcp"
      + security_group_id        = (known after apply)
      + self                     = false
      + source_security_group_id = (known after apply)
      + to_port                  = 80
      + type                     = "ingress"
    }

Plan: 8 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

This plan was saved to: /home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan

To perform exactly these actions, run the following command to apply:
    terraform apply "/home/ubuntu/.atlantis/repos/vaibhav-walke/terragrunt/5/default/live/qa/ec2/default.tfplan"

  • ▶️ To apply this plan, comment:
    • atlantis apply -d live/qa/ec2
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d live/qa/ec2

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant