-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Chapter 2, 3rd Edition: one-webserver ended up with 2 running instances #90
Comments
MNMBP:one-server minguyen$ terraform apply Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with
Terraform will perform the following actions: aws_instance.example will be created
Plan: 1 to add, 0 to change, 0 to destroy. Do you want to perform these actions? Enter a value: yes aws_instance.example: Creating... Apply complete! Resources: 1 added, 0 changed, 0 destroyed. No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes Apply complete! Resources: 0 added, 0 changed, 0 destroyed. No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes Apply complete! Resources: 0 added, 0 changed, 0 destroyed. ^CStopping operation... Interrupt received. ╷ Stopping operation... Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with Terraform will perform the following actions: aws_instance.example will be updated in-place~ resource "aws_instance" "example" {
Plan: 0 to add, 1 to change, 0 to destroy. ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with Terraform will perform the following actions: aws_instance.example will be updated in-place~ resource "aws_instance" "example" {
Plan: 0 to add, 1 to change, 0 to destroy. Do you want to perform these actions? Enter a value: yes aws_instance.example: Modifying... [id=i-0bb3c2191c397dff2] Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
Initializing the backend... Initializing provider plugins...
Terraform has been successfully initialized! You may now begin working with Terraform. Try running "terraform plan" to see If you ever set or change modules or backend configuration for Terraform, MNMBP:one-webserver minguyen$ terraform plan Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with
Terraform will perform the following actions: aws_instance.example will be created
aws_security_group.instance will be created
Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with
Terraform will perform the following actions: aws_instance.example will be created
aws_security_group.instance will be created
Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with
Terraform will perform the following actions: aws_instance.example will be created
aws_security_group.instance will be created
Plan: 2 to add, 0 to change, 0 to destroy. Changes to Outputs:
Do you want to perform these actions? Enter a value: yes aws_security_group.instance: Creating... Apply complete! Resources: 2 added, 0 changed, 0 destroyed. Outputs: public_ip = "redacted" No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes |
Could you put the log output into several code fences, one for each thing you ran? It's very hard to read it otherwise, as a lot of the syntax is being interpreted as Markdown, the content is wrapping, etc. |
Chapter 2, 3rd Edition:
Finished one-server, added a custom tag, tf applied okay
In the next section, one-webserver, the book examples show that it should destroy the old instance so that it can build a new one and run the EOF userdata section, but tf plan and apply ended up creating a 2nd instance instead of doing anything with the existing instance.
Not sure if it is user error (certainly not ruling that out as i'm just starting to learn), but I don't think I strayed from the book.
Console output in next comment
The text was updated successfully, but these errors were encountered: