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

Merge pull request #1 from thdevopssre/develop #2

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

thdblinux
Copy link
Owner

Create EC2 Instance

@thdblinux
Copy link
Owner Author

atlantis plan -d dir -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: dir workspace: default

Plan Error

dir "dir" does not exist

@thdblinux
Copy link
Owner Author

atlantis plan -- -destroy
atlantis plan -d dir -- -destroy

@thdblinux
Copy link
Owner Author

atlantis plan -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for 0 projects:

@thdblinux
Copy link
Owner Author

atlantis destroy -d .

@thdblinux
Copy link
Owner Author

Error: unknown command "destroy".
Run 'atlantis --help' for usage.
Available commands(--allow-commands): version, plan, apply, unlock, approve_policies

@thdblinux
Copy link
Owner Author

terraform destroy

@thdblinux
Copy link
Owner Author

Did you mean to use atlantis instead of terraform?

@thdblinux
Copy link
Owner Author

atlantis destroy

@thdblinux
Copy link
Owner Author

Error: unknown command "destroy".
Run 'atlantis --help' for usage.
Available commands(--allow-commands): version, plan, apply, unlock, approve_policies

@thdblinux
Copy link
Owner Author

atlantis plan -d main.tf -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: main.tf workspace: default

Plan Error

running "/usr/bin/terraform init -input=false" in "/root/.atlantis/repos/thdevopssre/aws-deploy-atlantis/2/default/main.tf": fork/exec /bin/sh: not a directory


@thdblinux
Copy link
Owner Author

atlantis plan -d . -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: . workspace: default

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

Terraform will perform the following actions:

  # aws_instance.web will be destroyed
- resource "aws_instance" "web" {
      - ami                                  = "ami-0c819f65440d5f1d1" -> null
      - arn                                  = "arn:aws:ec2:us-east-1:242451166731:instance/i-0fca8001d42b23785" -> null
      - associate_public_ip_address          = true -> null
      - availability_zone                    = "us-east-1b" -> null
      - cpu_core_count                       = 1 -> null
      - cpu_threads_per_core                 = 1 -> null
      - disable_api_stop                     = false -> null
      - disable_api_termination              = false -> null
      - ebs_optimized                        = false -> null
      - get_password_data                    = false -> null
      - hibernation                          = false -> null
      - id                                   = "i-0fca8001d42b23785" -> null
      - instance_initiated_shutdown_behavior = "stop" -> null
      - instance_state                       = "running" -> null
      - instance_type                        = "t2.micro" -> null
      - ipv6_address_count                   = 0 -> null
      - ipv6_addresses                       = [] -> null
      - monitoring                           = false -> null
      - placement_partition_number           = 0 -> null
      - primary_network_interface_id         = "eni-055edebd8308c141d" -> null
      - private_dns                          = "ip-172-31-87-43.ec2.internal" -> null
      - private_ip                           = "172.31.87.43" -> null
      - public_dns                           = "ec2-54-211-3-194.compute-1.amazonaws.com" -> null
      - public_ip                            = "54.211.3.194" -> null
      - secondary_private_ips                = [] -> null
      - security_groups                      = [
          - "default",
        ] -> null
      - source_dest_check                    = true -> null
      - subnet_id                            = "subnet-0434786cbd1578114" -> null
      - tags                                 = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tags_all                             = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tenancy                              = "default" -> null
      - user_data_replace_on_change          = false -> null
      - vpc_security_group_ids               = [
          - "sg-0b2e383bd52bb29af",
        ] -> null

      - capacity_reservation_specification {
          - capacity_reservation_preference = "open" -> null
        }

      - cpu_options {
          - core_count       = 1 -> null
          - threads_per_core = 1 -> null
        }

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - tags_all              = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0eb90c58fba09be5f" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.
  • ▶️ To apply this plan, comment:
    atlantis apply -d .
  • 🚮 To delete this plan and lock, click here
  • 🔁 To plan this project again, comment:
    atlantis plan -d . -- -destroy

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


  • ⏩ To apply all unapplied plans from this Pull Request, comment:
    atlantis apply
  • 🚮 To delete all plans and locks from this Pull Request, comment:
    atlantis unlock

@thdblinux
Copy link
Owner Author

atlantis plan -d . -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: . workspace: default

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

Terraform will perform the following actions:

  # aws_instance.web will be destroyed
- resource "aws_instance" "web" {
      - ami                                  = "ami-0c819f65440d5f1d1" -> null
      - arn                                  = "arn:aws:ec2:us-east-1:242451166731:instance/i-0fca8001d42b23785" -> null
      - associate_public_ip_address          = true -> null
      - availability_zone                    = "us-east-1b" -> null
      - cpu_core_count                       = 1 -> null
      - cpu_threads_per_core                 = 1 -> null
      - disable_api_stop                     = false -> null
      - disable_api_termination              = false -> null
      - ebs_optimized                        = false -> null
      - get_password_data                    = false -> null
      - hibernation                          = false -> null
      - id                                   = "i-0fca8001d42b23785" -> null
      - instance_initiated_shutdown_behavior = "stop" -> null
      - instance_state                       = "running" -> null
      - instance_type                        = "t2.micro" -> null
      - ipv6_address_count                   = 0 -> null
      - ipv6_addresses                       = [] -> null
      - monitoring                           = false -> null
      - placement_partition_number           = 0 -> null
      - primary_network_interface_id         = "eni-055edebd8308c141d" -> null
      - private_dns                          = "ip-172-31-87-43.ec2.internal" -> null
      - private_ip                           = "172.31.87.43" -> null
      - public_dns                           = "ec2-54-211-3-194.compute-1.amazonaws.com" -> null
      - public_ip                            = "54.211.3.194" -> null
      - secondary_private_ips                = [] -> null
      - security_groups                      = [
          - "default",
        ] -> null
      - source_dest_check                    = true -> null
      - subnet_id                            = "subnet-0434786cbd1578114" -> null
      - tags                                 = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tags_all                             = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tenancy                              = "default" -> null
      - user_data_replace_on_change          = false -> null
      - vpc_security_group_ids               = [
          - "sg-0b2e383bd52bb29af",
        ] -> null

      - capacity_reservation_specification {
          - capacity_reservation_preference = "open" -> null
        }

      - cpu_options {
          - core_count       = 1 -> null
          - threads_per_core = 1 -> null
        }

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - tags_all              = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0eb90c58fba09be5f" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.
  • ▶️ To apply this plan, comment:
    atlantis apply -d .
  • 🚮 To delete this plan and lock, click here
  • 🔁 To plan this project again, comment:
    atlantis plan -d . -- -destroy

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


  • ⏩ To apply all unapplied plans from this Pull Request, comment:
    atlantis apply
  • 🚮 To delete all plans and locks from this Pull Request, comment:
    atlantis unlock

@thdblinux
Copy link
Owner Author

atlantis plan -d . -- -destroy

@thdblinux
Copy link
Owner Author

atlantis unlock

@thdblinux
Copy link
Owner Author

All Atlantis locks for this PR have been unlocked and plans discarded

@thdblinux
Copy link
Owner Author

Ran Plan for dir: . workspace: default

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

Terraform will perform the following actions:

  # aws_instance.web will be destroyed
- resource "aws_instance" "web" {
      - ami                                  = "ami-0c819f65440d5f1d1" -> null
      - arn                                  = "arn:aws:ec2:us-east-1:242451166731:instance/i-0fca8001d42b23785" -> null
      - associate_public_ip_address          = true -> null
      - availability_zone                    = "us-east-1b" -> null
      - cpu_core_count                       = 1 -> null
      - cpu_threads_per_core                 = 1 -> null
      - disable_api_stop                     = false -> null
      - disable_api_termination              = false -> null
      - ebs_optimized                        = false -> null
      - get_password_data                    = false -> null
      - hibernation                          = false -> null
      - id                                   = "i-0fca8001d42b23785" -> null
      - instance_initiated_shutdown_behavior = "stop" -> null
      - instance_state                       = "running" -> null
      - instance_type                        = "t2.micro" -> null
      - ipv6_address_count                   = 0 -> null
      - ipv6_addresses                       = [] -> null
      - monitoring                           = false -> null
      - placement_partition_number           = 0 -> null
      - primary_network_interface_id         = "eni-055edebd8308c141d" -> null
      - private_dns                          = "ip-172-31-87-43.ec2.internal" -> null
      - private_ip                           = "172.31.87.43" -> null
      - public_dns                           = "ec2-54-211-3-194.compute-1.amazonaws.com" -> null
      - public_ip                            = "54.211.3.194" -> null
      - secondary_private_ips                = [] -> null
      - security_groups                      = [
          - "default",
        ] -> null
      - source_dest_check                    = true -> null
      - subnet_id                            = "subnet-0434786cbd1578114" -> null
      - tags                                 = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tags_all                             = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tenancy                              = "default" -> null
      - user_data_replace_on_change          = false -> null
      - vpc_security_group_ids               = [
          - "sg-0b2e383bd52bb29af",
        ] -> null

      - capacity_reservation_specification {
          - capacity_reservation_preference = "open" -> null
        }

      - cpu_options {
          - core_count       = 1 -> null
          - threads_per_core = 1 -> null
        }

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - tags_all              = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0eb90c58fba09be5f" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.
  • ▶️ To apply this plan, comment:
    atlantis apply -d .
  • 🚮 To delete this plan and lock, click here
  • 🔁 To plan this project again, comment:
    atlantis plan -d . -- -destroy

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


  • ⏩ To apply all unapplied plans from this Pull Request, comment:
    atlantis apply
  • 🚮 To delete all plans and locks from this Pull Request, comment:
    atlantis unlock

@thdblinux
Copy link
Owner Author

atlantis plan -d . -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: . workspace: default

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

Terraform will perform the following actions:

  # aws_instance.web will be destroyed
- resource "aws_instance" "web" {
      - ami                                  = "ami-0c819f65440d5f1d1" -> null
      - arn                                  = "arn:aws:ec2:us-east-1:242451166731:instance/i-0fca8001d42b23785" -> null
      - associate_public_ip_address          = true -> null
      - availability_zone                    = "us-east-1b" -> null
      - cpu_core_count                       = 1 -> null
      - cpu_threads_per_core                 = 1 -> null
      - disable_api_stop                     = false -> null
      - disable_api_termination              = false -> null
      - ebs_optimized                        = false -> null
      - get_password_data                    = false -> null
      - hibernation                          = false -> null
      - id                                   = "i-0fca8001d42b23785" -> null
      - instance_initiated_shutdown_behavior = "stop" -> null
      - instance_state                       = "running" -> null
      - instance_type                        = "t2.micro" -> null
      - ipv6_address_count                   = 0 -> null
      - ipv6_addresses                       = [] -> null
      - monitoring                           = false -> null
      - placement_partition_number           = 0 -> null
      - primary_network_interface_id         = "eni-055edebd8308c141d" -> null
      - private_dns                          = "ip-172-31-87-43.ec2.internal" -> null
      - private_ip                           = "172.31.87.43" -> null
      - public_dns                           = "ec2-54-211-3-194.compute-1.amazonaws.com" -> null
      - public_ip                            = "54.211.3.194" -> null
      - secondary_private_ips                = [] -> null
      - security_groups                      = [
          - "default",
        ] -> null
      - source_dest_check                    = true -> null
      - subnet_id                            = "subnet-0434786cbd1578114" -> null
      - tags                                 = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tags_all                             = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tenancy                              = "default" -> null
      - user_data_replace_on_change          = false -> null
      - vpc_security_group_ids               = [
          - "sg-0b2e383bd52bb29af",
        ] -> null

      - capacity_reservation_specification {
          - capacity_reservation_preference = "open" -> null
        }

      - cpu_options {
          - core_count       = 1 -> null
          - threads_per_core = 1 -> null
        }

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - tags_all              = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0eb90c58fba09be5f" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.
  • ▶️ To apply this plan, comment:
    atlantis apply -d .
  • 🚮 To delete this plan and lock, click here
  • 🔁 To plan this project again, comment:
    atlantis plan -d . -- -destroy

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


  • ⏩ To apply all unapplied plans from this Pull Request, comment:
    atlantis apply
  • 🚮 To delete all plans and locks from this Pull Request, comment:
    atlantis unlock

@thdblinux
Copy link
Owner Author

atlantis unlock

@thdblinux
Copy link
Owner Author

All Atlantis locks for this PR have been unlocked and plans discarded

@thdblinux
Copy link
Owner Author

atlantis plan -d . -- -destroy

@thdblinux
Copy link
Owner Author

Ran Plan for dir: . workspace: default

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

Terraform will perform the following actions:

  # aws_instance.web will be destroyed
- resource "aws_instance" "web" {
      - ami                                  = "ami-0c819f65440d5f1d1" -> null
      - arn                                  = "arn:aws:ec2:us-east-1:242451166731:instance/i-0fca8001d42b23785" -> null
      - associate_public_ip_address          = true -> null
      - availability_zone                    = "us-east-1b" -> null
      - cpu_core_count                       = 1 -> null
      - cpu_threads_per_core                 = 1 -> null
      - disable_api_stop                     = false -> null
      - disable_api_termination              = false -> null
      - ebs_optimized                        = false -> null
      - get_password_data                    = false -> null
      - hibernation                          = false -> null
      - id                                   = "i-0fca8001d42b23785" -> null
      - instance_initiated_shutdown_behavior = "stop" -> null
      - instance_state                       = "running" -> null
      - instance_type                        = "t2.micro" -> null
      - ipv6_address_count                   = 0 -> null
      - ipv6_addresses                       = [] -> null
      - monitoring                           = false -> null
      - placement_partition_number           = 0 -> null
      - primary_network_interface_id         = "eni-055edebd8308c141d" -> null
      - private_dns                          = "ip-172-31-87-43.ec2.internal" -> null
      - private_ip                           = "172.31.87.43" -> null
      - public_dns                           = "ec2-54-211-3-194.compute-1.amazonaws.com" -> null
      - public_ip                            = "54.211.3.194" -> null
      - secondary_private_ips                = [] -> null
      - security_groups                      = [
          - "default",
        ] -> null
      - source_dest_check                    = true -> null
      - subnet_id                            = "subnet-0434786cbd1578114" -> null
      - tags                                 = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tags_all                             = {
          - "Name" = "terraform-atlantis"
        } -> null
      - tenancy                              = "default" -> null
      - user_data_replace_on_change          = false -> null
      - vpc_security_group_ids               = [
          - "sg-0b2e383bd52bb29af",
        ] -> null

      - capacity_reservation_specification {
          - capacity_reservation_preference = "open" -> null
        }

      - cpu_options {
          - core_count       = 1 -> null
          - threads_per_core = 1 -> null
        }

      - credit_specification {
          - cpu_credits = "standard" -> null
        }

      - enclave_options {
          - enabled = false -> null
        }

      - maintenance_options {
          - auto_recovery = "default" -> null
        }

      - metadata_options {
          - http_endpoint               = "enabled" -> null
          - http_protocol_ipv6          = "disabled" -> null
          - http_put_response_hop_limit = 1 -> null
          - http_tokens                 = "optional" -> null
          - instance_metadata_tags      = "disabled" -> null
        }

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }

      - root_block_device {
          - delete_on_termination = true -> null
          - device_name           = "/dev/sda1" -> null
          - encrypted             = false -> null
          - iops                  = 100 -> null
          - tags                  = {} -> null
          - tags_all              = {} -> null
          - throughput            = 0 -> null
          - volume_id             = "vol-0eb90c58fba09be5f" -> null
          - volume_size           = 8 -> null
          - volume_type           = "gp2" -> null
        }
    }

Plan: 0 to add, 0 to change, 1 to destroy.
  • ▶️ To apply this plan, comment:
    atlantis apply -d .
  • 🚮 To delete this plan and lock, click here
  • 🔁 To plan this project again, comment:
    atlantis plan -d . -- -destroy

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


  • ⏩ To apply all unapplied plans from this Pull Request, comment:
    atlantis apply
  • 🚮 To delete all plans and locks from this Pull Request, comment:
    atlantis unlock

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