Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephennancekivell/39eeabe0ef085cbcb7a06816628c7994 to your computer and use it in GitHub Desktop.
Save stephennancekivell/39eeabe0ef085cbcb7a06816628c7994 to your computer and use it in GitHub Desktop.
terraform docker 2.7.0 rebuild
terraform apply
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# docker_container.nginx will be created
+ resource "docker_container" "nginx" {
+ attach = false
+ bridge = (known after apply)
+ command = (known after apply)
+ container_logs = (known after apply)
+ entrypoint = (known after apply)
+ env = (known after apply)
+ exit_code = (known after apply)
+ gateway = (known after apply)
+ hostname = (known after apply)
+ id = (known after apply)
+ image = "nginx"
+ ip_address = (known after apply)
+ ip_prefix_length = (known after apply)
+ ipc_mode = (known after apply)
+ log_driver = "json-file"
+ logs = false
+ must_run = true
+ name = "nginx"
+ network_data = (known after apply)
+ read_only = false
+ restart = "on-failure"
+ rm = false
+ shm_size = (known after apply)
+ start = true
+ labels {
+ label = (known after apply)
+ value = (known after apply)
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
docker_container.nginx: Creating...
docker_container.nginx: Creation complete after 1s [id=08d38a7c3056e96dcfb69e32eab9c9d0c330a61b7b6def2775f24fa3fcbff967]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
➜ tf-docker-bug terraform apply
docker_container.nginx: Refreshing state... [id=08d38a7c3056e96dcfb69e32eab9c9d0c330a61b7b6def2775f24fa3fcbff967]
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement
Terraform will perform the following actions:
# docker_container.nginx must be replaced
-/+ resource "docker_container" "nginx" {
attach = false
+ bridge = (known after apply)
~ command = [
- "nginx",
- "-g",
- "daemon off;",
] -> (known after apply)
+ container_logs = (known after apply)
- cpu_shares = 0 -> null
- dns = [] -> null
- dns_opts = [] -> null
- dns_search = [] -> null
~ entrypoint = [] -> (known after apply)
~ env = [
- "NGINX_VERSION=1.17.8",
- "NJS_VERSION=0.3.8",
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
- "PKG_RELEASE=1~buster",
] -> (known after apply)
+ exit_code = (known after apply)
~ gateway = "172.17.0.1" -> (known after apply)
- group_add = [] -> null
~ hostname = "08d38a7c3056" -> (known after apply)
~ id = "08d38a7c3056e96dcfb69e32eab9c9d0c330a61b7b6def2775f24fa3fcbff967" -> (known after apply)
~ image = "sha256:2073e0bcb60ee98548d313ead5eacbfe16d9054f8800a32bedd859922a99a6e1" -> "nginx" # forces replacement
~ ip_address = "172.17.0.2" -> (known after apply)
~ ip_prefix_length = 16 -> (known after apply)
~ ipc_mode = "private" -> (known after apply)
- links = [] -> null
log_driver = "json-file"
- log_opts = {} -> null
logs = false
- max_retry_count = 0 -> null
- memory = 0 -> null
- memory_swap = 0 -> null
must_run = true
name = "nginx"
~ network_data = [
- {
- gateway = "172.17.0.1"
- ip_address = "172.17.0.2"
- ip_prefix_length = 16
- network_name = "bridge"
},
] -> (known after apply)
- network_mode = "default" -> null
- privileged = false -> null
- publish_all_ports = false -> null
read_only = false
restart = "on-failure"
rm = false
~ shm_size = 64 -> (known after apply)
start = true
- sysctls = {} -> null
- tmpfs = {} -> null
- labels {
- label = "maintainer" -> null
- value = "NGINX Docker Maintainers <docker-maint@nginx.com>" -> null
}
+ labels {
+ label = (known after apply)
+ value = (known after apply)
}
}
Plan: 1 to add, 0 to change, 1 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: ^C
Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...
Error: Error asking for approval: interrupted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment