› terraform plan
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.
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.
Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.
+ aws_elastic_beanstalk_application.tftest
description: "tf-test-desc"
name: "tf-test-name"
+ aws_elastic_beanstalk_environment.tftest
all_settings.#: "<computed>"
application: "tf-test-name"
autoscaling_groups.#: "<computed>"
cname: "<computed>"
cname_prefix: "<computed>"
instances.#: "<computed>"
launch_configurations.#: "<computed>"
load_balancers.#: "<computed>"
name: "tf-test-name"
queues.#: "<computed>"
setting.#: "1"
setting.2468988437.name: "SecurityGroups"
setting.2468988437.namespace: "aws:elb:loadbalancer"
setting.2468988437.resource: ""
setting.2468988437.value: "{\"Fn::GetAtt\":[\"AWSEBLoadBalancerSecurityGroup\",\"GroupId\"]},{\"Ref\":\"AWSEBLoadBalancerSecurityGroup\"}"
solution_stack_name: "64bit Amazon Linux 2016.03 v2.1.0 running Go 1.4"
tier: "WebServer"
triggers.#: "<computed>"
wait_for_ready_timeout: "10m"
Plan: 2 to add, 0 to change, 0 to destroy.
› terraform apply
aws_elastic_beanstalk_application.tftest: Creating...
description: "" => "tf-test-desc"
name: "" => "tf-test-name"
aws_elastic_beanstalk_application.tftest: Creation complete
aws_elastic_beanstalk_environment.tftest: Creating...
all_settings.#: "" => "<computed>"
application: "" => "tf-test-name"
autoscaling_groups.#: "" => "<computed>"
cname: "" => "<computed>"
cname_prefix: "" => "<computed>"
instances.#: "" => "<computed>"
launch_configurations.#: "" => "<computed>"
load_balancers.#: "" => "<computed>"
name: "" => "tf-test-name"
queues.#: "" => "<computed>"
setting.#: "" => "1"
setting.2468988437.name: "" => "SecurityGroups"
setting.2468988437.namespace: "" => "aws:elb:loadbalancer"
setting.2468988437.resource: "" => ""
setting.2468988437.value: "" => "{\"Fn::GetAtt\":[\"AWSEBLoadBalancerSecurityGroup\",\"GroupId\"]},{\"Ref\":\"AWSEBLoadBalancerSecurityGroup\"}"
solution_stack_name: "" => "64bit Amazon Linux 2016.03 v2.1.0 running Go 1.4"
tier: "" => "WebServer"
triggers.#: "" => "<computed>"
wait_for_ready_timeout: "" => "10m"
aws_elastic_beanstalk_environment.tftest: Still creating... (10s elapsed)
aws_elastic_beanstalk_environment.tftest: Still creating... (20s elapsed)
aws_elastic_beanstalk_environment.tftest: Still creating... (30s elapsed)
Error applying plan:
1 error(s) occurred:
* aws_elastic_beanstalk_environment.tftest: 2 error(s) occurred:
* 2016-07-20 22:16:41.731 +0000 UTC: Stack named 'awseb-e-7x27u7vzcy-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBLoadBalancer, AWSEBBeanstalkMetadata].
* 2016-07-20 22:16:28.981 +0000 UTC: Creating load balancer failed Reason: Security group(s) can be applied to only an ELB in VPC.
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
› terraform destroy -force
aws_elastic_beanstalk_application.tftest: Refreshing state... (ID: tf-test-name)
aws_elastic_beanstalk_environment.tftest: Refreshing state... (ID: e-7x27u7vzcy)
aws_elastic_beanstalk_environment.tftest: Destroying...
aws_elastic_beanstalk_environment.tftest: Still destroying... (10s elapsed)
aws_elastic_beanstalk_environment.tftest: Still destroying... (20s elapsed)
Error applying plan:
1 error(s) occurred:
* aws_elastic_beanstalk_environment.tftest: 1 error(s) occurred:
* 2016-07-20 22:17:21.04 +0000 UTC: Service:AmazonCloudFormation, Message:Resource AWSEBAutoScalingGroup does not exist for stack awseb-e-7x27u7vzcy-stack
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
› terraform destroy -force
aws_elastic_beanstalk_application.tftest: Refreshing state... (ID: tf-test-name)
aws_elastic_beanstalk_environment.tftest: Refreshing state... (ID: e-7x27u7vzcy)
aws_elastic_beanstalk_application.tftest: Destroying...
aws_elastic_beanstalk_application.tftest: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.