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

Test 2 #23

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

Test 2 #23

wants to merge 8 commits into from

Conversation

aliscott
Copy link
Member

@aliscott aliscott commented Mar 4, 2022

No description provided.

@aliscott
Copy link
Member Author

aliscott commented Mar 4, 2022

Ran Plan for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # aws_instance.web_app will be created
+ resource "aws_instance" "web_app" {
      + ami                                  = "ami-674cbc1e"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "m5.4xlarge"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + vpc_security_group_ids               = (known after apply)

      + capacity_reservation_specification {
          + capacity_reservation_preference = (known after apply)

          + capacity_reservation_target {
              + capacity_reservation_id = (known after apply)
            }
        }

      + ebs_block_device {
          + delete_on_termination = true
          + device_name           = "my_data"
          + encrypted             = (known after apply)
          + iops                  = 1200
          + kms_key_id            = (known after apply)
          + snapshot_id           = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 3000
          + volume_type           = "io1"
        }

      + enclave_options {
          + enabled = (known after apply)
        }

      + ephemeral_block_device {
          + device_name  = (known after apply)
          + no_device    = (known after apply)
          + virtual_name = (known after apply)
        }

      + metadata_options {
          + http_endpoint               = (known after apply)
          + http_put_response_hop_limit = (known after apply)
          + http_tokens                 = (known after apply)
          + instance_metadata_tags      = (known after apply)
        }

      + network_interface {
          + delete_on_termination = (known after apply)
          + device_index          = (known after apply)
          + network_interface_id  = (known after apply)
        }

      + root_block_device {
          + delete_on_termination = true
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + kms_key_id            = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 50
          + volume_type           = (known after apply)
        }
    }

  # aws_lambda_function.hello_world will be created
+ resource "aws_lambda_function" "hello_world" {
      + architectures                  = (known after apply)
      + arn                            = (known after apply)
      + function_name                  = "hello_world"
      + handler                        = "exports.test"
      + id                             = (known after apply)
      + invoke_arn                     = (known after apply)
      + last_modified                  = (known after apply)
      + memory_size                    = 1024
      + package_type                   = "Zip"
      + publish                        = false
      + qualified_arn                  = (known after apply)
      + reserved_concurrent_executions = -1
      + role                           = "arn:aws:lambda:us-east-1:account-id:resource-id"
      + runtime                        = "nodejs12.x"
      + signing_job_arn                = (known after apply)
      + signing_profile_version_arn    = (known after apply)
      + source_code_hash               = (known after apply)
      + source_code_size               = (known after apply)
      + tags_all                       = (known after apply)
      + timeout                        = 3
      + version                        = (known after apply)

      + tracing_config {
          + mode = (known after apply)
        }
    }

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


time="2022-03-04T17:21:11Z" level=info msg="Detected Terraform plan JSON file at /home/atlantis/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.json"
time="2022-03-04T17:21:11Z" level=info msg="Starting: Extracting only cost-related params from terraform"
time="2022-03-04T17:21:11Z" level=info msg="Starting: Retrieving cloud prices to calculate costs"
time="2022-03-04T17:21:12Z" level=info msg="Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-aws-infracost.json"

�[33mUpdate:�[0m A new version of Infracost is available: �[96mv0.9.18+23-g04132bbe-dirty�[0m → �[96mv0.9.19�[0m
  $ curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-aws
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-aws
Plan: 2 to add, 0 to change, 0 to destroy.

2. dir: terraform-gcp workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # google_compute_instance.instance1 will be created
+ resource "google_compute_instance" "instance1" {
      + can_ip_forward       = false
      + cpu_platform         = (known after apply)
      + current_status       = (known after apply)
      + deletion_protection  = false
      + guest_accelerator    = [
          + {
              + count = 4
              + type  = "nvidia-tesla-t4"
            },
        ]
      + id                   = (known after apply)
      + instance_id          = (known after apply)
      + label_fingerprint    = (known after apply)
      + machine_type         = "n1-standard-32"
      + metadata_fingerprint = (known after apply)
      + min_cpu_platform     = (known after apply)
      + name                 = "instance1"
      + project              = (known after apply)
      + self_link            = (known after apply)
      + tags_fingerprint     = (known after apply)
      + zone                 = "us-central1-a"

      + boot_disk {
          + auto_delete                = true
          + device_name                = (known after apply)
          + disk_encryption_key_sha256 = (known after apply)
          + kms_key_self_link          = (known after apply)
          + mode                       = "READ_WRITE"
          + source                     = (known after apply)

          + initialize_params {
              + image  = "debian-cloud/debian-9"
              + labels = (known after apply)
              + size   = (known after apply)
              + type   = (known after apply)
            }
        }

      + confidential_instance_config {
          + enable_confidential_compute = (known after apply)
        }

      + network_interface {
          + ipv6_access_type   = (known after apply)
          + name               = (known after apply)
          + network            = "default"
          + network_ip         = (known after apply)
          + stack_type         = (known after apply)
          + subnetwork         = (known after apply)
          + subnetwork_project = (known after apply)

          + access_config {
              + nat_ip       = (known after apply)
              + network_tier = (known after apply)
            }
        }

      + reservation_affinity {
          + type = (known after apply)

          + specific_reservation {
              + key    = (known after apply)
              + values = (known after apply)
            }
        }

      + scheduling {
          + automatic_restart   = true
          + on_host_maintenance = (known after apply)
          + preemptible         = true
        }
    }

  # google_dns_record_set.frontend will be created
+ resource "google_dns_record_set" "frontend" {
      + id           = (known after apply)
      + managed_zone = "zone"
      + name         = "frontend.123"
      + project      = (known after apply)
      + rrdatas      = [
          + "123.123.123.123]",
        ]
      + ttl          = 300
      + type         = "A"
    }

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


time="2022-03-04T17:21:19Z" level=info msg="Detected Terraform plan JSON file at /home/atlantis/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp/default.json"
time="2022-03-04T17:21:19Z" level=info msg="Starting: Extracting only cost-related params from terraform"
time="2022-03-04T17:21:19Z" level=info msg="Starting: Retrieving cloud prices to calculate costs"
time="2022-03-04T17:21:20Z" level=info msg="Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-gcp-infracost.json"

�[33mUpdate:�[0m A new version of Infracost is available: �[96mv0.9.18+23-g04132bbe-dirty�[0m → �[96mv0.9.19�[0m
  $ curl -fsSL https://raw.githubusercontent.com/infracost/infracost/master/scripts/install.sh | sh
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-gcp
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-gcp
Plan: 2 to add, 0 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

aliscott commented Mar 4, 2022

Ran Policy Check for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-aws
  • 🚮 To delete this plan click here
  • 🔁 To re-run policies plan this project again by commenting:
    • atlantis plan -d terraform-aws

2. dir: terraform-gcp workspace: default

  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-gcp
  • 🚮 To delete this plan click here
  • 🔁 To re-run policies plan this project again by commenting:
    • atlantis plan -d terraform-gcp

  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

aliscott commented Mar 4, 2022

💰 Infracost estimate: monthly cost will increase by $1,574 📈

Project Previous New Diff
github.com/infracost/atlantis-d...git/terraform-aws/default.json $0 $1,019 +$1,019
github.com/infracost/atlantis-d...git/terraform-gcp/default.json $0 $555 +$555
All projects $0 $1,574 +$1,574
Infracost output
Project: github.com/infracost/atlantis-demo.git/terraform-aws/default.json

+ aws_instance.web_app
  +$1,019

    + Instance usage (Linux/UNIX, on-demand, m5.4xlarge)
      +$561

    + root_block_device
    
        + Storage (general purpose SSD, gp2)
          +$5.00

    + ebs_block_device[0]
    
        + Storage (provisioned IOPS SSD, io1)
          +$375
    
        + Provisioned IOPS
          +$78.00

+ aws_lambda_function.hello_world
  Monthly cost depends on usage

    + Requests
      Monthly cost depends on usage
        +$0.20 per 1M requests

    + Duration
      Monthly cost depends on usage
        +$0.0000166667 per GB-seconds

Monthly cost change for github.com/infracost/atlantis-demo.git/terraform-aws/default.json
Amount:  +$1,019 ($0.00 → $1,019)

──────────────────────────────────
Project: github.com/infracost/atlantis-demo.git/terraform-gcp/default.json

+ google_compute_instance.instance1
  +$555

    + Instance usage (Linux/UNIX, preemptible, n1-standard-32)
      +$234

    + Standard provisioned storage (pd-standard)
      +$0.40

    + NVIDIA Tesla T4 (preemptible)
      +$321

+ google_dns_record_set.frontend
  Monthly cost depends on usage

    + Queries
      Monthly cost depends on usage
        +$0.40 per 1M queries

Monthly cost change for github.com/infracost/atlantis-demo.git/terraform-gcp/default.json
Amount:  +$555 ($0.00 → $555)

──────────────────────────────────
Key: ~ changed, + added, - removed

4 cloud resources were detected:
∙ 4 were estimated, 3 include usage-based costs, see https://infracost.io/usage-file
Is this comment useful? Yes, No

@aliscott aliscott closed this Mar 4, 2022
@aliscott
Copy link
Member Author

aliscott commented Mar 4, 2022

Locks and plans deleted for the projects and workspaces modified in this pull request:

  • dir: terraform-aws workspace: default
  • dir: terraform-gcp workspace: default

@aliscott aliscott reopened this Apr 10, 2024
@aliscott aliscott closed this Apr 10, 2024
@aliscott aliscott reopened this Apr 10, 2024
@aliscott
Copy link
Member Author

Ran Plan for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws": exit status 1
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "s3_bucket": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "image_uri": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "filename": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: "role" (arn:aws:lambda:us-east-1:account-id:resource-id) is an invalid ARN: invalid account ID value (expecting to match regular expression: ^(aws|aws-managed|third-party|\d{12}|cw.{10})$)
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 27, in resource "aws_lambda_function" "hello_world":
│   27:   role          = "arn:aws:lambda:us-east-1:account-id:resource-id"
│ 
╵


2. dir: terraform-gcp workspace: default

Plan Error

running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp": exit status 1
╷
│ Error: "name" ("frontend.123") doesn't end with ".", name field must end with trailing dot, for example test.example.com. (note the trailing dot)
│ 
│   with google_dns_record_set.frontend,
│   on main.tf line 35, in resource "google_dns_record_set" "frontend":
│   35:   name = "frontend.123"
│ 
╵


  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

Ran Plan for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws": exit status 1
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "s3_bucket": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "image_uri": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "filename": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: "role" (arn:aws:lambda:us-east-1:account-id:resource-id) is an invalid ARN: invalid account ID value (expecting to match regular expression: ^(aws|aws-managed|third-party|\d{12}|cw.{10})$)
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 27, in resource "aws_lambda_function" "hello_world":
│   27:   role          = "arn:aws:lambda:us-east-1:account-id:resource-id"
│ 
╵


2. dir: terraform-gcp workspace: default

Plan Error

running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp": exit status 1
╷
│ Error: "name" ("frontend.123") doesn't end with ".", name field must end with trailing dot, for example test.example.com. (note the trailing dot)
│ 
│   with google_dns_record_set.frontend,
│   on main.tf line 35, in resource "google_dns_record_set" "frontend":
│   35:   name = "frontend.123"
│ 
╵


  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

atlantis plan -d terraform-aws

@aliscott
Copy link
Member Author

Ran Plan for dir: terraform-aws workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws": exit status 1
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "s3_bucket": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "filename": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: Invalid combination of arguments
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 25, in resource "aws_lambda_function" "hello_world":
│   25: resource "aws_lambda_function" "hello_world" {
│ 
│ "image_uri": one of `filename,image_uri,s3_bucket` must be specified
╵
╷
│ Error: "role" (arn:aws:lambda:us-east-1:account-id:resource-id) is an invalid ARN: invalid account ID value (expecting to match regular expression: ^(aws|aws-managed|third-party|\d{12}|cw.{10})$)
│ 
│   with aws_lambda_function.hello_world,
│   on main.tf line 27, in resource "aws_lambda_function" "hello_world":
│   27:   role          = "arn:aws:lambda:us-east-1:account-id:resource-id"
│ 
╵

@aliscott
Copy link
Member Author

Ran Plan for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # aws_instance.web_app will be created
+ resource "aws_instance" "web_app" {
      + ami                                  = "ami-674cbc1e"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "m5.4xlarge"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + ebs_block_device {
          + delete_on_termination = true
          + device_name           = "my_data"
          + encrypted             = (known after apply)
          + iops                  = 1200
          + kms_key_id            = (known after apply)
          + snapshot_id           = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 3000
          + volume_type           = "io1"
        }

      + root_block_device {
          + delete_on_termination = true
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + kms_key_id            = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 50
          + volume_type           = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Warning: AWS account ID not found for provider
│ 
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on main.tf line 1, in provider "aws":
│    1: provider "aws" {
│ 
│ See
│ https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id
│ for implications.
╵

2024-04-10T17:26:36Z INF Detected Terraform plan JSON file at /root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.json
2024-04-10T17:26:36Z INF Starting: Extracting only cost-related params from terraform
2024-04-10T17:26:36Z INF Starting: Retrieving cloud prices to calculate costs
2024-04-10T17:26:36Z INF Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-aws-infracost.json
total 8K     
drwxr-xr-x    2 root     root          50 Apr 10 17:26 .
drwxrwxrwt    1 root     root          40 Apr 10 17:26 ..
-rw-r--r--    1 root     root        4.2K Apr 10 17:26 default-terraform-aws-infracost.json
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-aws
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-aws
Plan: 1 to add, 0 to change, 0 to destroy.

2. dir: terraform-gcp workspace: default

Plan Error

Show Output
running "/usr/local/bin/terraform plan -input=false -refresh -out \"/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp/default.tfplan\"" in "/root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp": exit status 1

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: Failed to retrieve project, pid: , err: project: required field is not set
│ 
│   with google_compute_instance.instance1,
│   on main.tf line 6, in resource "google_compute_instance" "instance1":
│    6: resource "google_compute_instance" "instance1" {
│ 
╵
╷
│ Error: Failed to retrieve project, pid: , err: project: required field is not set
│ 
│   with google_dns_record_set.frontend,
│   on main.tf line 34, in resource "google_dns_record_set" "frontend":
│   34: resource "google_dns_record_set" "frontend" {
│ 
╵



  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

Ran Plan for 2 projects:

  1. dir: terraform-aws workspace: default
  2. dir: terraform-gcp workspace: default

1. dir: terraform-aws workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # aws_instance.web_app will be created
+ resource "aws_instance" "web_app" {
      + ami                                  = "ami-674cbc1e"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "m5.4xlarge"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + ebs_block_device {
          + delete_on_termination = true
          + device_name           = "my_data"
          + encrypted             = (known after apply)
          + iops                  = 1200
          + kms_key_id            = (known after apply)
          + snapshot_id           = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 3000
          + volume_type           = "io1"
        }

      + root_block_device {
          + delete_on_termination = true
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + kms_key_id            = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 50
          + volume_type           = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Warning: AWS account ID not found for provider
│ 
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on main.tf line 1, in provider "aws":
│    1: provider "aws" {
│ 
│ See
│ https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id
│ for implications.
╵

2024-04-10T17:28:29Z INF Detected Terraform plan JSON file at /root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.json
2024-04-10T17:28:29Z INF Starting: Extracting only cost-related params from terraform
2024-04-10T17:28:29Z INF Starting: Retrieving cloud prices to calculate costs
2024-04-10T17:28:29Z INF Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-aws-infracost.json
total 8K     
drwxr-xr-x    2 root     root          50 Apr 10 17:28 .
drwxrwxrwt    1 root     root          40 Apr 10 17:28 ..
-rw-r--r--    1 root     root        4.2K Apr 10 17:28 default-terraform-aws-infracost.json
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-aws
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-aws
Plan: 1 to add, 0 to change, 0 to destroy.

2. dir: terraform-gcp workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # google_compute_instance.instance1 will be created
+ resource "google_compute_instance" "instance1" {
      + can_ip_forward       = false
      + cpu_platform         = (known after apply)
      + current_status       = (known after apply)
      + deletion_protection  = false
      + effective_labels     = (known after apply)
      + guest_accelerator    = [
          + {
              + count = 4
              + type  = "nvidia-tesla-t4"
            },
        ]
      + id                   = (known after apply)
      + instance_id          = (known after apply)
      + label_fingerprint    = (known after apply)
      + machine_type         = "n1-standard-32"
      + metadata_fingerprint = (known after apply)
      + min_cpu_platform     = (known after apply)
      + name                 = "instance1"
      + project              = "my-project"
      + self_link            = (known after apply)
      + tags_fingerprint     = (known after apply)
      + terraform_labels     = (known after apply)
      + zone                 = "us-central1-a"

      + boot_disk {
          + auto_delete                = true
          + device_name                = (known after apply)
          + disk_encryption_key_sha256 = (known after apply)
          + kms_key_self_link          = (known after apply)
          + mode                       = "READ_WRITE"
          + source                     = (known after apply)

          + initialize_params {
              + image                  = "debian-cloud/debian-9"
              + labels                 = (known after apply)
              + provisioned_iops       = (known after apply)
              + provisioned_throughput = (known after apply)
              + size                   = (known after apply)
              + type                   = (known after apply)
            }
        }

      + network_interface {
          + internal_ipv6_prefix_length = (known after apply)
          + ipv6_access_type            = (known after apply)
          + ipv6_address                = (known after apply)
          + name                        = (known after apply)
          + network                     = "default"
          + network_ip                  = (known after apply)
          + stack_type                  = (known after apply)
          + subnetwork                  = (known after apply)
          + subnetwork_project          = (known after apply)

          + access_config {
              + nat_ip       = (known after apply)
              + network_tier = (known after apply)
            }
        }

      + scheduling {
          + automatic_restart   = true
          + on_host_maintenance = (known after apply)
          + preemptible         = true
          + provisioning_model  = (known after apply)
        }
    }

  # google_dns_record_set.frontend will be created
+ resource "google_dns_record_set" "frontend" {
      + id           = (known after apply)
      + managed_zone = "zone"
      + name         = "frontend.123."
      + project      = "my-project"
      + rrdatas      = [
          + "123.123.123.123]",
        ]
      + ttl          = 300
      + type         = "A"
    }

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


2024-04-10T17:28:33Z INF Detected Terraform plan JSON file at /root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-gcp/default.json
2024-04-10T17:28:33Z INF Starting: Extracting only cost-related params from terraform
2024-04-10T17:28:33Z INF Starting: Retrieving cloud prices to calculate costs
2024-04-10T17:28:33Z INF Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-gcp-infracost.json
total 12K    
drwxr-xr-x    2 root     root          94 Apr 10 17:28 .
drwxrwxrwt    1 root     root          40 Apr 10 17:28 ..
-rw-r--r--    1 root     root        4.2K Apr 10 17:28 default-terraform-aws-infracost.json
-rw-r--r--    1 root     root        3.9K Apr 10 17:28 default-terraform-gcp-infracost.json
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-gcp
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-gcp
Plan: 2 to add, 0 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

atlantis plan -d terraform-aws

@aliscott
Copy link
Member Author

Ran Plan for dir: terraform-aws workspace: default

Show Output
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create

Terraform will perform the following actions:

  # aws_instance.web_app will be created
+ resource "aws_instance" "web_app" {
      + ami                                  = "ami-674cbc1e"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = (known after apply)
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "m5.4xlarge"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = (known after apply)
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = (known after apply)
      + tags_all                             = (known after apply)
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = (known after apply)

      + ebs_block_device {
          + delete_on_termination = true
          + device_name           = "my_data"
          + encrypted             = (known after apply)
          + iops                  = 1200
          + kms_key_id            = (known after apply)
          + snapshot_id           = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 3000
          + volume_type           = "io1"
        }

      + root_block_device {
          + delete_on_termination = true
          + device_name           = (known after apply)
          + encrypted             = (known after apply)
          + iops                  = (known after apply)
          + kms_key_id            = (known after apply)
          + tags_all              = (known after apply)
          + throughput            = (known after apply)
          + volume_id             = (known after apply)
          + volume_size           = 50
          + volume_type           = (known after apply)
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
╷
│ Warning: AWS account ID not found for provider
│ 
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on main.tf line 1, in provider "aws":
│    1: provider "aws" {
│ 
│ See
│ https://registry.terraform.io/providers/hashicorp/aws/latest/docs#skip_requesting_account_id
│ for implications.
╵

2024-04-10T17:32:23Z INF Detected Terraform plan JSON file at /root/.atlantis/repos/infracost/atlantis-demo/23/default/terraform-aws/default.json
2024-04-10T17:32:23Z INF Starting: Extracting only cost-related params from terraform
2024-04-10T17:32:23Z INF Starting: Retrieving cloud prices to calculate costs
2024-04-10T17:32:23Z INF Output saved to /tmp/infracost-atlantis-demo-23/default-terraform-aws-infracost.json
total 8K     
drwxr-xr-x    2 root     root          50 Apr 10 17:32 .
drwxrwxrwt    1 root     root          40 Apr 10 17:32 ..
-rw-r--r--    1 root     root        4.2K Apr 10 17:32 default-terraform-aws-infracost.json
  • ▶️ To apply this plan, comment:
    • atlantis apply -d terraform-aws
  • 🚮 To delete this plan click here
  • 🔁 To plan this project again, comment:
    • atlantis plan -d terraform-aws
Plan: 1 to add, 0 to change, 0 to destroy.
  • ⏩ To apply all unapplied plans from this pull request, comment:
    • atlantis apply
  • 🚮 To delete all plans and locks for the PR, comment:
    • atlantis unlock

@aliscott
Copy link
Member Author

Infracost report

💰 Monthly cost will increase by $1,019 📈

Project Cost change New monthly cost
terraform-aws +$1,019 $1,019
Cost details
Key: * usage cost, ~ changed, + added, - removed

──────────────────────────────────
Project: terraform-aws

+ aws_instance.web_app
  +$1,019

    + Instance usage (Linux/UNIX, on-demand, m5.4xlarge)
      +$561

    + root_block_device
    
        + Storage (general purpose SSD, gp2)
          +$5

    + ebs_block_device[0]
    
        + Storage (provisioned IOPS SSD, io1)
          +$375
    
        + Provisioned IOPS
          +$78

Monthly cost change for terraform-aws
Amount:  +$1,019 ($0.00 → $1,019)

──────────────────────────────────
Key: * usage cost, ~ changed, + added, - removed

1 cloud resource was detected:
∙ 1 was estimated

Infracost estimate: Monthly cost will increase by $1,019 ↑
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┓
┃ Project                                            ┃ Cost change ┃ New monthly cost ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━━━━━━━━━╋━━━━━━━━━━━━━━━━━━┫
┃ terraform-aws                                      ┃     +$1,019 ┃ $1,019           ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━┛

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.

2 participants