Skip to content

Instantly share code, notes, and snippets.

@mcastellini
Last active September 24, 2019 14:53
Show Gist options
  • Save mcastellini/55633cf856478fafa4695b983f87229d to your computer and use it in GitHub Desktop.
Save mcastellini/55633cf856478fafa4695b983f87229d to your computer and use it in GitHub Desktop.
terraform plan fails with docker_registry_image from AWS ECR
2019/09/24 16:51:40 [INFO] Terraform version: 0.12.9
2019/09/24 16:51:40 [INFO] Go runtime version: go1.13
2019/09/24 16:51:40 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2019/09/24 16:51:40 [DEBUG] Attempting to open CLI config file: /Users/mcastellini/.terraformrc
2019/09/24 16:51:40 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/09/24 16:51:40 [INFO] CLI command args: []string{"apply"}
2019/09/24 16:51:40 [DEBUG] New state was assigned lineage "2e13d15d-48ea-7184-b0b7-c8420708d443"
2019/09/24 16:51:40 [DEBUG] checking for provider in "."
2019/09/24 16:51:40 [DEBUG] checking for provider in "/usr/local/bin"
2019/09/24 16:51:40 [DEBUG] checking for provider in ".terraform/plugins/darwin_amd64"
2019/09/24 16:51:40 [DEBUG] found provider "terraform-provider-docker_v2.3.0_x4"
2019/09/24 16:51:40 [DEBUG] found valid plugin: "docker", "2.3.0", "/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4"
2019/09/24 16:51:40 [DEBUG] checking for provisioner in "."
2019/09/24 16:51:40 [DEBUG] checking for provisioner in "/usr/local/bin"
2019/09/24 16:51:40 [DEBUG] checking for provisioner in ".terraform/plugins/darwin_amd64"
2019/09/24 16:51:40 [INFO] backend/local: starting Apply operation
2019-09-24T16:51:41.049+0200 [INFO] plugin: configuring client automatic mTLS
2019-09-24T16:51:41.071+0200 [DEBUG] plugin: starting plugin: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 args=[/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4]
2019-09-24T16:51:41.074+0200 [DEBUG] plugin: plugin started: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53648
2019-09-24T16:51:41.074+0200 [DEBUG] plugin: waiting for RPC address: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4
2019-09-24T16:51:41.088+0200 [INFO] plugin.terraform-provider-docker_v2.3.0_x4: configuring server automatic mTLS: timestamp=2019-09-24T16:51:41.088+0200
2019-09-24T16:51:41.119+0200 [DEBUG] plugin: using plugin: version=5
2019-09-24T16:51:41.119+0200 [DEBUG] plugin.terraform-provider-docker_v2.3.0_x4: plugin address: address=/var/folders/xv/gr9760zj7qsbknt903wv04f40000gn/T/plugin398217119 network=unix timestamp=2019-09-24T16:51:41.119+0200
2019-09-24T16:51:41.179+0200 [DEBUG] plugin: plugin process exited: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53648
2019-09-24T16:51:41.179+0200 [DEBUG] plugin: plugin exited
2019/09/24 16:51:41 [TRACE] terraform.NewContext: complete
2019/09/24 16:51:41 [INFO] terraform: building graph: GraphTypeValidate
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "docker_image.alpine" references: [data.docker_registry_image.alpine data.docker_registry_image.alpine]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "data.docker_registry_image.alpine" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "local.ecr_address" references: []
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "output.alpine" references: [data.docker_registry_image.alpine]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "provider.docker" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] Starting graph walk: walkValidate
2019-09-24T16:51:41.181+0200 [INFO] plugin: configuring client automatic mTLS
2019-09-24T16:51:41.203+0200 [DEBUG] plugin: starting plugin: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 args=[/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4]
2019-09-24T16:51:41.206+0200 [DEBUG] plugin: plugin started: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53649
2019-09-24T16:51:41.206+0200 [DEBUG] plugin: waiting for RPC address: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4
2019-09-24T16:51:41.221+0200 [INFO] plugin.terraform-provider-docker_v2.3.0_x4: configuring server automatic mTLS: timestamp=2019-09-24T16:51:41.221+0200
2019-09-24T16:51:41.253+0200 [DEBUG] plugin: using plugin: version=5
2019-09-24T16:51:41.253+0200 [DEBUG] plugin.terraform-provider-docker_v2.3.0_x4: plugin address: address=/var/folders/xv/gr9760zj7qsbknt903wv04f40000gn/T/plugin892067548 network=unix timestamp=2019-09-24T16:51:41.253+0200
2019-09-24T16:51:41.320+0200 [DEBUG] plugin: plugin process exited: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53649
2019-09-24T16:51:41.320+0200 [DEBUG] plugin: plugin exited
2019/09/24 16:51:41 [TRACE] [walkValidate] Exiting eval tree: provider.docker (close)
2019/09/24 16:51:41 [TRACE] vertex "provider.docker (close)": visit complete
2019/09/24 16:51:41 [INFO] terraform: building graph: GraphTypeRefresh
2019/09/24 16:51:41 [TRACE] No managed resources in state during refresh; skipping managed resource transformer
2019/09/24 16:51:41 [TRACE] Executing graph transform *terraform.ConfigTransformer
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "data.docker_registry_image.alpine" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "local.ecr_address" references: []
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "output.alpine" references: [data.docker_registry_image.alpine]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "provider.docker" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] Starting graph walk: walkRefresh
2019-09-24T16:51:41.321+0200 [INFO] plugin: configuring client automatic mTLS
2019-09-24T16:51:41.351+0200 [DEBUG] plugin: starting plugin: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 args=[/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4]
2019-09-24T16:51:41.354+0200 [DEBUG] plugin: plugin started: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53650
2019-09-24T16:51:41.354+0200 [DEBUG] plugin: waiting for RPC address: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4
2019-09-24T16:51:41.370+0200 [INFO] plugin.terraform-provider-docker_v2.3.0_x4: configuring server automatic mTLS: timestamp=2019-09-24T16:51:41.370+0200
2019-09-24T16:51:41.402+0200 [DEBUG] plugin: using plugin: version=5
2019-09-24T16:51:41.402+0200 [DEBUG] plugin.terraform-provider-docker_v2.3.0_x4: plugin address: address=/var/folders/xv/gr9760zj7qsbknt903wv04f40000gn/T/plugin985745713 network=unix timestamp=2019-09-24T16:51:41.402+0200
2019/09/24 16:51:41 [DEBUG] Resource state not found for node "data.docker_registry_image.alpine", instance data.docker_registry_image.alpine
2019/09/24 16:51:41 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2019/09/24 16:51:41 [TRACE] Executing graph transform *terraform.TargetsTransformer
2019/09/24 16:51:41 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2019/09/24 16:51:41 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "data.docker_registry_image.alpine" references: []
2019/09/24 16:51:41 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes)
data.docker_registry_image.alpine: Refreshing state...
2019-09-24T16:51:41.887+0200 [DEBUG] plugin: plugin process exited: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53650
2019-09-24T16:51:41.887+0200 [DEBUG] plugin: plugin exited
2019/09/24 16:51:41 [INFO] terraform: building graph: GraphTypePlan
2019/09/24 16:51:41 [TRACE] Executing graph transform *terraform.ConfigTransformer
2019/09/24 16:51:41 [TRACE] ConfigTransformer: Starting for path:
2019/09/24 16:51:41 [DEBUG] ProviderTransformer: "docker_image.alpine" (*terraform.NodePlannableResource) needs provider.docker
2019/09/24 16:51:41 [TRACE] ProviderTransformer: exact match for provider.docker serving data.docker_registry_image.alpine
2019/09/24 16:51:41 [DEBUG] ProviderTransformer: "data.docker_registry_image.alpine" (*terraform.NodePlannableResource) needs provider.docker
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "output.alpine" references: [data.docker_registry_image.alpine]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "provider.docker" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "docker_image.alpine" references: [data.docker_registry_image.alpine data.docker_registry_image.alpine]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "data.docker_registry_image.alpine" references: [local.ecr_address]
2019/09/24 16:51:41 [DEBUG] ReferenceTransformer: "local.ecr_address" references: []
2019-09-24T16:51:41.890+0200 [INFO] plugin: configuring client automatic mTLS
2019-09-24T16:51:41.920+0200 [DEBUG] plugin: starting plugin: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 args=[/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4]
2019-09-24T16:51:41.924+0200 [DEBUG] plugin: plugin started: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53654
2019-09-24T16:51:41.924+0200 [DEBUG] plugin: waiting for RPC address: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4
2019-09-24T16:51:41.944+0200 [INFO] plugin.terraform-provider-docker_v2.3.0_x4: configuring server automatic mTLS: timestamp=2019-09-24T16:51:41.943+0200
2019-09-24T16:51:41.976+0200 [DEBUG] plugin: using plugin: version=5
2019-09-24T16:51:41.976+0200 [DEBUG] plugin.terraform-provider-docker_v2.3.0_x4: plugin address: address=/var/folders/xv/gr9760zj7qsbknt903wv04f40000gn/T/plugin453158741 network=unix timestamp=2019-09-24T16:51:41.976+0200
2019/09/24 16:51:42 [DEBUG] ReferenceTransformer: "data.docker_registry_image.alpine" references: []
2019/09/24 16:51:42 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes)
2019/09/24 16:51:42 [TRACE] Executing graph transform *terraform.RootTransformer
2019/09/24 16:51:42 [DEBUG] Resource instance state not found for node "docker_image.alpine", instance docker_image.alpine
2019/09/24 16:51:42 [TRACE] Completed graph transform *terraform.AttachStateTransformer (no changes)
2019/09/24 16:51:42 [TRACE] Executing graph transform *terraform.TargetsTransformer
2019/09/24 16:51:42 [TRACE] Completed graph transform *terraform.TargetsTransformer (no changes)
2019/09/24 16:51:42 [TRACE] Executing graph transform *terraform.ReferenceTransformer
2019/09/24 16:51:42 [DEBUG] ReferenceTransformer: "docker_image.alpine" references: []
2019/09/24 16:51:42 [TRACE] Completed graph transform *terraform.ReferenceTransformer (no changes)
2019/09/24 16:51:42 [TRACE] Executing graph transform *terraform.RootTransformer
2019/09/24 16:51:42 [ERROR] <root>: eval: *terraform.EvalDiff, err: "name": required field is not set
2019/09/24 16:51:42 [ERROR] <root>: eval: *terraform.EvalSequence, err: "name": required field is not set
Error: "name": required field is not set
on main.tf line 67, in resource "docker_image" "alpine":
67: resource "docker_image" "alpine" {
2019-09-24T16:51:42.045+0200 [DEBUG] plugin: plugin process exited: path=/Users/mcastellini/sandbox/dokku/.terraform/plugins/darwin_amd64/terraform-provider-docker_v2.3.0_x4 pid=53654
2019-09-24T16:51:42.045+0200 [DEBUG] plugin: plugin exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment