Skip to content

Instantly share code, notes, and snippets.

@jefferai
Created February 17, 2015 21:30
Show Gist options
  • Save jefferai/747357614e88001b1063 to your computer and use it in GitHub Desktop.
Save jefferai/747357614e88001b1063 to your computer and use it in GitHub Desktop.
resource "docker_container" "example" {
name = "example"
image = "ubuntu:14.04"
command = ["nc", "-l", "-u", "-p 82"]
hostname = "example"
dns = ["5.6.7.8"]
publish_all_ports = true
}
pomluser@thisisit:~/terraformtest$ terraform apply
2015/02/17 21:24:54 [INFO] Terraform version: 0.3.7 dev 61a220b384fda0f3335ca6c9aa10591e386fbe7e
2015/02/17 21:24:54 Detected home directory from env var: /home/pomluser
2015/02/17 21:24:54 [DEBUG] Discovered plugin: atlas = /home/pomluser/gocode/bin/terraform-provider-atlas
2015/02/17 21:24:54 [DEBUG] Discovered plugin: aws = /home/pomluser/gocode/bin/terraform-provider-aws
2015/02/17 21:24:54 [DEBUG] Discovered plugin: azure = /home/pomluser/gocode/bin/terraform-provider-azure
2015/02/17 21:24:54 [DEBUG] Discovered plugin: cloudflare = /home/pomluser/gocode/bin/terraform-provider-cloudflare
2015/02/17 21:24:54 [DEBUG] Discovered plugin: cloudstack = /home/pomluser/gocode/bin/terraform-provider-cloudstack
2015/02/17 21:24:54 [DEBUG] Discovered plugin: consul = /home/pomluser/gocode/bin/terraform-provider-consul
2015/02/17 21:24:54 [DEBUG] Discovered plugin: digitalocean = /home/pomluser/gocode/bin/terraform-provider-digitalocean
2015/02/17 21:24:54 [DEBUG] Discovered plugin: dnsimple = /home/pomluser/gocode/bin/terraform-provider-dnsimple
2015/02/17 21:24:54 [DEBUG] Discovered plugin: docker = /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:24:54 [DEBUG] Discovered plugin: google = /home/pomluser/gocode/bin/terraform-provider-google
2015/02/17 21:24:54 [DEBUG] Discovered plugin: heroku = /home/pomluser/gocode/bin/terraform-provider-heroku
2015/02/17 21:24:54 [DEBUG] Discovered plugin: mailgun = /home/pomluser/gocode/bin/terraform-provider-mailgun
2015/02/17 21:24:54 [DEBUG] Discovered plugin: null = /home/pomluser/gocode/bin/terraform-provider-null
2015/02/17 21:24:54 [DEBUG] Discovered plugin: file = /home/pomluser/gocode/bin/terraform-provisioner-file
2015/02/17 21:24:54 [DEBUG] Discovered plugin: local-exec = /home/pomluser/gocode/bin/terraform-provisioner-local-exec
2015/02/17 21:24:54 [DEBUG] Discovered plugin: remote-exec = /home/pomluser/gocode/bin/terraform-provisioner-remote-exec
2015/02/17 21:24:54 Detected home directory from env var: /home/pomluser
2015/02/17 21:24:54 [DEBUG] Attempting to open CLI config file: /home/pomluser/.terraformrc
2015/02/17 21:24:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2015/02/17 21:24:54 [DEBUG] Creating graph for path: [root]
2015/02/17 21:24:54 [DEBUG] Starting plugin: /home/pomluser/gocode/bin/terraform-provider-docker []string{"/home/pomluser/gocode/bin/terraform-provider-docker"}
2015/02/17 21:24:54 [DEBUG] Waiting for RPC address for: /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:24:54 Detected home directory from env var: /home/pomluser
2015/02/17 21:24:54 terraform-provider-docker: 2015/02/17 21:24:54 Plugin address: unix /tmp/tf-plugin405047033
2015/02/17 21:24:54 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:24:54 [DEBUG] Creating graph for path: [root]
2015/02/17 21:24:54 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:24:54 [INFO] Validating provider: docker
2015/02/17 21:24:54 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:24:54 [INFO] Validating resource: docker_container.example
2015/02/17 21:24:54 [DEBUG] Creating graph for path: [root]
2015/02/17 21:24:54 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:24:54 [INFO] Configuring provider: docker
2015/02/17 21:24:54 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:24:54 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
2015/02/17 21:24:54 [DEBUG] docker_container.example: Not refreshing, ID is empty
2015/02/17 21:24:54 [DEBUG] Creating graph for path: [root]
2015/02/17 21:24:54 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:24:54 [INFO] Configuring provider: docker
2015/02/17 21:24:54 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:24:54 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
2015/02/17 21:24:54 [DEBUG] docker_container.example: Executing diff
2015/02/17 21:24:54 [DEBUG] docker_container.example: Diff: &terraform.InstanceDiff{Attributes:map[string]*terraform.ResourceAttrDiff{"active":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_command.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "dns.909960769":*terraform.ResourceAttrDiff{Old:"", New:"5.6.7.8", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.#":*terraform.ResourceAttrDiff{Old:"", New:"4", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.3":*terraform.ResourceAttrDiff{Old:"", New:"-p 82", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "freshest_image":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_ports.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "update_image":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.0":*terraform.ResourceAttrDiff{Old:"", New:"nc", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_domainname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_env.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "publish_all_ports":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "dns.#":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_persistent_storage.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_publish_all_ports":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.1":*terraform.ResourceAttrDiff{Old:"", New:"-l", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_dns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "id":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x2}, "computed_image":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "image":*terraform.ResourceAttrDiff{Old:"", New:"ubuntu:14.04", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_hostname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.2":*terraform.ResourceAttrDiff{Old:"", New:"-u", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "hostname":*terraform.ResourceAttrDiff{Old:"", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}}, Destroy:false, DestroyTainted:false}
2015/02/17 21:24:54 [INFO] Apply walk starting
2015/02/17 21:24:54 [DEBUG] Creating graph for path: [root]
2015/02/17 21:24:54 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:24:54 [INFO] Configuring provider: docker
2015/02/17 21:24:54 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:24:54 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
docker_container.example: Creating...
2015/02/17 21:24:54 [DEBUG] docker_container.example: Executing Apply
active: "" => "0"
command.#: "" => "4"
command.0: "" => "nc"
command.1: "" => "-l"
command.2: "" => "-u"
command.3: "" => "-p 82"
computed_command.#: "" => "<computed>"
computed_dns.#: "" => "<computed>"
computed_domainname: "" => "<computed>"
computed_env.#: "" => "<computed>"
computed_hostname: "" => "<computed>"
computed_image: "" => "<computed>"
computed_persistent_storage.#: "" => "<computed>"
computed_ports.#: "" => "<computed>"
computed_publish_all_ports: "" => "0"
dns.#: "" => "1"
dns.909960769: "" => "5.6.7.8"
freshest_image: "" => "<computed>"
hostname: "" => "example"
image: "" => "ubuntu:14.04"
name: "" => "example"
publish_all_ports: "" => "1"
update_image: "" => "0"
2015/02/17 21:24:55 [INFO] Apply walk complete
2015/02/17 21:24:55 [INFO] Writing backup state to: terraform.tfstate.backup
docker_container.example: Creation complete
2015/02/17 21:24:55 waiting for all plugin processes to complete...
2015/02/17 21:24:55 [DEBUG] /home/pomluser/gocode/bin/terraform-provider-docker: plugin process exited
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
The state of your infrastructure has been saved to the path
below. This state is required to modify and destroy your
infrastructure, so keep it safe. To inspect the complete state
use the `terraform show` command.
State path: terraform.tfstate
Removed "dns" key...
pomluser@thisisit:~/terraformtest$ terraform plan
2015/02/17 21:25:28 [INFO] Terraform version: 0.3.7 dev 61a220b384fda0f3335ca6c9aa10591e386fbe7e
2015/02/17 21:25:28 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:28 [DEBUG] Discovered plugin: atlas = /home/pomluser/gocode/bin/terraform-provider-atlas
2015/02/17 21:25:28 [DEBUG] Discovered plugin: aws = /home/pomluser/gocode/bin/terraform-provider-aws
2015/02/17 21:25:28 [DEBUG] Discovered plugin: azure = /home/pomluser/gocode/bin/terraform-provider-azure
2015/02/17 21:25:28 [DEBUG] Discovered plugin: cloudflare = /home/pomluser/gocode/bin/terraform-provider-cloudflare
2015/02/17 21:25:28 [DEBUG] Discovered plugin: cloudstack = /home/pomluser/gocode/bin/terraform-provider-cloudstack
2015/02/17 21:25:28 [DEBUG] Discovered plugin: consul = /home/pomluser/gocode/bin/terraform-provider-consul
2015/02/17 21:25:28 [DEBUG] Discovered plugin: digitalocean = /home/pomluser/gocode/bin/terraform-provider-digitalocean
2015/02/17 21:25:28 [DEBUG] Discovered plugin: dnsimple = /home/pomluser/gocode/bin/terraform-provider-dnsimple
2015/02/17 21:25:28 [DEBUG] Discovered plugin: docker = /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:25:28 [DEBUG] Discovered plugin: google = /home/pomluser/gocode/bin/terraform-provider-google
2015/02/17 21:25:28 [DEBUG] Discovered plugin: heroku = /home/pomluser/gocode/bin/terraform-provider-heroku
2015/02/17 21:25:28 [DEBUG] Discovered plugin: mailgun = /home/pomluser/gocode/bin/terraform-provider-mailgun
2015/02/17 21:25:28 [DEBUG] Discovered plugin: null = /home/pomluser/gocode/bin/terraform-provider-null
2015/02/17 21:25:28 [DEBUG] Discovered plugin: file = /home/pomluser/gocode/bin/terraform-provisioner-file
2015/02/17 21:25:28 [DEBUG] Discovered plugin: local-exec = /home/pomluser/gocode/bin/terraform-provisioner-local-exec
2015/02/17 21:25:28 [DEBUG] Discovered plugin: remote-exec = /home/pomluser/gocode/bin/terraform-provisioner-remote-exec
2015/02/17 21:25:28 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:28 [DEBUG] Attempting to open CLI config file: /home/pomluser/.terraformrc
2015/02/17 21:25:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2015/02/17 21:25:28 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:28 [DEBUG] Starting plugin: /home/pomluser/gocode/bin/terraform-provider-docker []string{"/home/pomluser/gocode/bin/terraform-provider-docker"}
2015/02/17 21:25:28 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:28 [DEBUG] Waiting for RPC address for: /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:25:28 terraform-provider-docker: 2015/02/17 21:25:28 Plugin address: unix /tmp/tf-plugin340689115
2015/02/17 21:25:28 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:28 [INFO] Validating provider: docker
2015/02/17 21:25:28 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:28 [INFO] Validating resource: docker_container.example
2015/02/17 21:25:28 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:28 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:28 [DEBUG] Creating graph for path: [root]
Refreshing Terraform state prior to plan...
2015/02/17 21:25:28 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:28 [INFO] Configuring provider: docker
2015/02/17 21:25:28 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:28 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
docker_container.example: Refreshing state... (ID: c36639943523adc76cada99db5d251864f472fd74175bfed3a4a4b660dcb5849)
2015/02/17 21:25:28 [INFO] Writing state output to: terraform.tfstate
2015/02/17 21:25:28 [INFO] Writing backup state to: terraform.tfstate.backup
2015/02/17 21:25:28 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:28 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:28 [INFO] Configuring provider: docker
2015/02/17 21:25:28 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:28 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
2015/02/17 21:25:28 [DEBUG] docker_container.example: Executing diff
2015/02/17 21:25:28 [DEBUG] docker_container.example: Diff: &terraform.InstanceDiff{Attributes:map[string]*terraform.ResourceAttrDiff{"computed_persistent_storage.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.1":*terraform.ResourceAttrDiff{Old:"-l", New:"-l", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_command.#":*terraform.ResourceAttrDiff{Old:"4", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "active":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "freshest_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "id":*terraform.ResourceAttrDiff{Old:"c36639943523adc76cada99db5d251864f472fd74175bfed3a4a4b660dcb5849", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x2}, "computed_domainname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "hostname":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.0":*terraform.ResourceAttrDiff{Old:"nc", New:"nc", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.3":*terraform.ResourceAttrDiff{Old:"-p 82", New:"-p 82", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_env.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.#":*terraform.ResourceAttrDiff{Old:"4", New:"4", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "image":*terraform.ResourceAttrDiff{Old:"ubuntu:14.04", New:"ubuntu:14.04", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_hostname":*terraform.ResourceAttrDiff{Old:"example", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.2":*terraform.ResourceAttrDiff{Old:"-u", New:"-u", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "update_image":*terraform.ResourceAttrDiff{Old:"false", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_ports.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}}, Destroy:true, DestroyTainted:false}
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
2015/02/17 21:25:28 waiting for all plugin processes to complete...
will be created (or destroyed and then created if an existing resource
2015/02/17 21:25:28 [DEBUG] /home/pomluser/gocode/bin/terraform-provider-docker: plugin process exited
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
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.
-/+ docker_container.example
active: "true" => "0"
command.#: "4" => "4"
command.0: "nc" => "nc"
command.1: "-l" => "-l"
command.2: "-u" => "-u"
command.3: "-p 82" => "-p 82"
computed_command.#: "4" => "<computed>"
computed_dns.#: "1" => "<computed>"
computed_domainname: "" => "<computed>"
computed_env.#: "1" => "<computed>"
computed_hostname: "example" => "<computed>"
computed_image: "5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a" => "<computed>"
computed_persistent_storage.#: "0" => "<computed>"
computed_ports.#: "0" => "<computed>"
computed_publish_all_ports: "true" => "0"
dns.#: "1" => "0" (forces new resource)
freshest_image: "5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a" => "<computed>"
hostname: "example" => "example"
image: "ubuntu:14.04" => "ubuntu:14.04"
name: "example" => "example"
publish_all_ports: "true" => "1"
update_image: "false" => "0"
pomluser@thisisit:~/terraformtest$ terraform apply
2015/02/17 21:25:33 [INFO] Terraform version: 0.3.7 dev 61a220b384fda0f3335ca6c9aa10591e386fbe7e
2015/02/17 21:25:33 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:33 [DEBUG] Discovered plugin: atlas = /home/pomluser/gocode/bin/terraform-provider-atlas
2015/02/17 21:25:33 [DEBUG] Discovered plugin: aws = /home/pomluser/gocode/bin/terraform-provider-aws
2015/02/17 21:25:33 [DEBUG] Discovered plugin: azure = /home/pomluser/gocode/bin/terraform-provider-azure
2015/02/17 21:25:33 [DEBUG] Discovered plugin: cloudflare = /home/pomluser/gocode/bin/terraform-provider-cloudflare
2015/02/17 21:25:33 [DEBUG] Discovered plugin: cloudstack = /home/pomluser/gocode/bin/terraform-provider-cloudstack
2015/02/17 21:25:33 [DEBUG] Discovered plugin: consul = /home/pomluser/gocode/bin/terraform-provider-consul
2015/02/17 21:25:33 [DEBUG] Discovered plugin: digitalocean = /home/pomluser/gocode/bin/terraform-provider-digitalocean
2015/02/17 21:25:33 [DEBUG] Discovered plugin: dnsimple = /home/pomluser/gocode/bin/terraform-provider-dnsimple
2015/02/17 21:25:33 [DEBUG] Discovered plugin: docker = /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:25:33 [DEBUG] Discovered plugin: google = /home/pomluser/gocode/bin/terraform-provider-google
2015/02/17 21:25:33 [DEBUG] Discovered plugin: heroku = /home/pomluser/gocode/bin/terraform-provider-heroku
2015/02/17 21:25:33 [DEBUG] Discovered plugin: mailgun = /home/pomluser/gocode/bin/terraform-provider-mailgun
2015/02/17 21:25:33 [DEBUG] Discovered plugin: null = /home/pomluser/gocode/bin/terraform-provider-null
2015/02/17 21:25:33 [DEBUG] Discovered plugin: file = /home/pomluser/gocode/bin/terraform-provisioner-file
2015/02/17 21:25:33 [DEBUG] Discovered plugin: local-exec = /home/pomluser/gocode/bin/terraform-provisioner-local-exec
2015/02/17 21:25:33 [DEBUG] Discovered plugin: remote-exec = /home/pomluser/gocode/bin/terraform-provisioner-remote-exec
2015/02/17 21:25:33 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:33 [DEBUG] Attempting to open CLI config file: /home/pomluser/.terraformrc
2015/02/17 21:25:33 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2015/02/17 21:25:33 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:33 [DEBUG] Starting plugin: /home/pomluser/gocode/bin/terraform-provider-docker []string{"/home/pomluser/gocode/bin/terraform-provider-docker"}
2015/02/17 21:25:33 Detected home directory from env var: /home/pomluser
2015/02/17 21:25:33 [DEBUG] Waiting for RPC address for: /home/pomluser/gocode/bin/terraform-provider-docker
2015/02/17 21:25:33 terraform-provider-docker: 2015/02/17 21:25:33 Plugin address: unix /tmp/tf-plugin911314702
2015/02/17 21:25:33 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:33 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:33 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:33 [INFO] Validating provider: docker
2015/02/17 21:25:33 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:33 [INFO] Validating resource: docker_container.example
2015/02/17 21:25:33 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:33 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:33 [INFO] Configuring provider: docker
2015/02/17 21:25:33 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:33 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
docker_container.example: Refreshing state... (ID: c36639943523adc76cada99db5d251864f472fd74175bfed3a4a4b660dcb5849)
2015/02/17 21:25:34 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:34 [DEBUG] Graph [root] created and valid. 3 nouns.
2015/02/17 21:25:34 [INFO] Configuring provider: docker
2015/02/17 21:25:34 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:34 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
2015/02/17 21:25:34 [DEBUG] docker_container.example: Executing diff
2015/02/17 21:25:34 [DEBUG] docker_container.example: Diff: &terraform.InstanceDiff{Attributes:map[string]*terraform.ResourceAttrDiff{"id":*terraform.ResourceAttrDiff{Old:"c36639943523adc76cada99db5d251864f472fd74175bfed3a4a4b660dcb5849", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x2}, "hostname":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.0":*terraform.ResourceAttrDiff{Old:"nc", New:"nc", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_domainname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.#":*terraform.ResourceAttrDiff{Old:"4", New:"4", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.3":*terraform.ResourceAttrDiff{Old:"-p 82", New:"-p 82", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_env.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_ports.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "image":*terraform.ResourceAttrDiff{Old:"ubuntu:14.04", New:"ubuntu:14.04", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_hostname":*terraform.ResourceAttrDiff{Old:"example", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.2":*terraform.ResourceAttrDiff{Old:"-u", New:"-u", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "update_image":*terraform.ResourceAttrDiff{Old:"false", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.1":*terraform.ResourceAttrDiff{Old:"-l", New:"-l", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_command.#":*terraform.ResourceAttrDiff{Old:"4", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "active":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "freshest_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_persistent_storage.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}}, Destroy:true, DestroyTainted:false}
2015/02/17 21:25:34 [INFO] Apply walk starting
2015/02/17 21:25:34 [DEBUG] Creating graph for path: [root]
2015/02/17 21:25:34 [DEBUG] Graph [root] created and valid. 4 nouns.
2015/02/17 21:25:34 [INFO] Configuring provider: docker
2015/02/17 21:25:34 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:34 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
2015/02/17 21:25:34 [DEBUG] docker_container.example: Executing Apply
docker_container.example: Destroying...
2015/02/17 21:25:34 [DEBUG] docker_container.example: expanding to count = 1
2015/02/17 21:25:34 [INFO] Module root walking: docker_container.example (Graph node: docker_container.example)
docker_container.example: Destruction complete
2015/02/17 21:25:34 [ERROR] Diffs don't match.
Diff 1: &terraform.InstanceDiff{Attributes:map[string]*terraform.ResourceAttrDiff{"dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.1":*terraform.ResourceAttrDiff{Old:"-l", New:"-l", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_command.#":*terraform.ResourceAttrDiff{Old:"4", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "active":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "freshest_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_persistent_storage.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "hostname":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.0":*terraform.ResourceAttrDiff{Old:"nc", New:"nc", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_domainname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_image":*terraform.ResourceAttrDiff{Old:"5ba9dab47459d81c0037ca3836a368a4f8ce5050505ce89720e1fb8839ea048a", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.3":*terraform.ResourceAttrDiff{Old:"-p 82", New:"-p 82", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_dns.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_env.#":*terraform.ResourceAttrDiff{Old:"1", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_publish_all_ports":*terraform.ResourceAttrDiff{Old:"true", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.#":*terraform.ResourceAttrDiff{Old:"4", New:"4", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "image":*terraform.ResourceAttrDiff{Old:"ubuntu:14.04", New:"ubuntu:14.04", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_hostname":*terraform.ResourceAttrDiff{Old:"example", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.2":*terraform.ResourceAttrDiff{Old:"-u", New:"-u", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "name":*terraform.ResourceAttrDiff{Old:"example", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "update_image":*terraform.ResourceAttrDiff{Old:"false", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_ports.#":*terraform.ResourceAttrDiff{Old:"0", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}}, Destroy:false, DestroyTainted:false}
Diff 2: &terraform.InstanceDiff{Attributes:map[string]*terraform.ResourceAttrDiff{"name":*terraform.ResourceAttrDiff{Old:"", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "image":*terraform.ResourceAttrDiff{Old:"", New:"ubuntu:14.04", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "update_image":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_hostname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_ports.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "command.2":*terraform.ResourceAttrDiff{Old:"", New:"-u", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "freshest_image":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "publish_all_ports":*terraform.ResourceAttrDiff{Old:"", New:"1", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_persistent_storage.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_command.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.1":*terraform.ResourceAttrDiff{Old:"", New:"-l", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "active":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "hostname":*terraform.ResourceAttrDiff{Old:"", New:"example", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_domainname":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.0":*terraform.ResourceAttrDiff{Old:"", New:"nc", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_image":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.3":*terraform.ResourceAttrDiff{Old:"", New:"-p 82", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "computed_dns.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_env.#":*terraform.ResourceAttrDiff{Old:"", New:"", NewComputed:true, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:false, Type:0x0}, "computed_publish_all_ports":*terraform.ResourceAttrDiff{Old:"", New:"0", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}, "command.#":*terraform.ResourceAttrDiff{Old:"", New:"4", NewComputed:false, NewRemoved:false, NewExtra:interface {}(nil), RequiresNew:true, Type:0x0}}, Destroy:false, DestroyTainted:false}
2015/02/17 21:25:34 [ERROR] Error walking 'docker_container.example': docker_container.example: diffs didn't match during apply. This is a bug with the resource provider, please report a bug.
2015/02/17 21:25:34 [INFO] Apply walk complete
2015/02/17 21:25:34 [INFO] Writing backup state to: terraform.tfstate.backup
Error applying plan:
2015/02/17 21:25:34 waiting for all plugin processes to complete...
docker_container.example: diffs didn't match during apply. This is a bug with the resource provider, please report a bug.
2015/02/17 21:25:34 [DEBUG] /home/pomluser/gocode/bin/terraform-provider-docker: plugin process exited
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment