Example execution terraform destroy aws instance
Jump to navigation
Jump to search
aws_instance.example: Refreshing state... [id=i-079b8300c42bea5c3]
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.example will be destroyed
- resource "aws_instance" "example" {
- ami = "ami-08d70e59c07c61a3a" -> null
- arn = "arn:aws:ec2:us-west-2:672580246566:instance/i-079b8300c42bea5c3" -> null
- associate_public_ip_address = true -> null
- availability_zone = "us-west-2a" -> null
- cpu_core_count = 1 -> null
- cpu_threads_per_core = 1 -> null
- disable_api_termination = false -> null
- ebs_optimized = false -> null
- get_password_data = false -> null
- hibernation = false -> null
- id = "i-079b8300c42bea5c3" -> null
- instance_initiated_shutdown_behavior = "stop" -> null
- instance_state = "running" -> null
- instance_type = "t2.nano" -> null
- ipv6_address_count = 0 -> null
- ipv6_addresses = [] -> null
- monitoring = false -> null
- primary_network_interface_id = "eni-01d6b985e415407f8" -> null
- private_dns = "ip-172-31-26-51.us-west-2.compute.internal" -> null
- private_ip = "172.31.26.51" -> null
- public_dns = "ec2-18-237-84-127.us-west-2.compute.amazonaws.com" -> null
- public_ip = "18.237.84.127" -> null
- secondary_private_ips = [] -> null
- security_groups = [
- "default",
] -> null
- source_dest_check = true -> null
- subnet_id = "subnet-6551cf1d" -> null
- tags = {
- "Name" = "ExampleAppServerInstance"
} -> null
- tags_all = {
- "Name" = "ExampleAppServerInstance"
} -> null
- tenancy = "default" -> null
- vpc_security_group_ids = [
- "sg-a95bbfa2",
] -> null
- capacity_reservation_specification {
- capacity_reservation_preference = "open" -> null
}
- credit_specification {
- cpu_credits = "standard" -> null
}
- enclave_options {
- enabled = false -> null
}
- metadata_options {
- http_endpoint = "enabled" -> null
- http_put_response_hop_limit = 1 -> null
- http_tokens = "optional" -> null
}
- root_block_device {
- delete_on_termination = true -> null
- device_name = "/dev/sda1" -> null
- encrypted = false -> null
- iops = 100 -> null
- tags = {} -> null
- throughput = 0 -> null
- volume_id = "vol-01da711ea83a11b16" -> null
- volume_size = 8 -> null
- volume_type = "gp2" -> null
}
}
Plan: 0 to add, 0 to change, 1 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
aws_instance.example: Destroying... [id=i-079b8300c42bea5c3]
aws_instance.example: Still destroying... [id=i-079b8300c42bea5c3, 10s elapsed]
aws_instance.example: Still destroying... [id=i-079b8300c42bea5c3, 20s elapsed]
aws_instance.example: Destruction complete after 27s
Destroy complete! Resources: 1 destroyed.
See also[edit]
terraform[destroy|-target=resource | --help ]Still destroying..., Error: deleting, DependencyViolation, Destroy complete! Resources:terraform[untaint | fmt|apply|show|state|init | plan | console | output|validate|destroy|debug|import|providers|get|graph|workspaces|resource|login|-var-file|state mv|state pull|state push|state replace-provider|state rm|force-unlock|env|tfe|--version|remote-exec|delete on termination| deprecated commands |terraform --help]
Advertising: