Last active
October 13, 2020 00:07
-
-
Save spkane/a0e1a52fc474b7fdb91732185cdabc2b to your computer and use it in GitHub Desktop.
terraform 0.13 provider version search bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/skane/.terraform.d/plugins/terraform.spkane.org: | |
total 0 | |
drwxr-xr-x 3 skane staff 96 Oct 10 21:49 ./ | |
drwxr-x--- 5 skane staff 160 Oct 10 21:49 ../ | |
drwxr-xr-x 3 skane staff 96 Oct 10 21:49 spkane/ | |
/Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane: | |
total 0 | |
drwxr-xr-x 3 skane staff 96 Oct 10 21:49 ./ | |
drwxr-xr-x 3 skane staff 96 Oct 10 21:49 ../ | |
drwxr-xr-x 3 skane staff 96 Oct 12 16:46 todo/ | |
/Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane/todo: | |
total 0 | |
drwxr-xr-x 3 skane staff 96 Oct 12 16:46 ./ | |
drwxr-xr-x 3 skane staff 96 Oct 10 21:49 ../ | |
drwxr-xr-x 3 skane staff 96 Oct 10 22:52 1.1.0/ | |
/Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane/todo/1.1.0: | |
total 0 | |
drwxr-xr-x 3 skane staff 96 Oct 10 22:52 ./ | |
drwxr-xr-x 3 skane staff 96 Oct 12 16:46 ../ | |
drwxr-xr-x 3 skane staff 96 Oct 12 16:48 darwin_amd64/ | |
/Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane/todo/1.1.0/darwin_amd64: | |
total 43032 | |
drwxr-xr-x 3 skane staff 96 Oct 12 16:48 ./ | |
drwxr-xr-x 3 skane staff 96 Oct 10 22:52 ../ | |
-rwxr-xr-x 1 skane staff 22029840 Oct 12 16:48 terraform-provider-todo* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ TF_LOG=trace terraform init | |
2020/10/12 17:04:59 [INFO] Terraform version: 0.13.4 | |
2020/10/12 17:04:59 [INFO] Go runtime version: go1.14.7 | |
2020/10/12 17:04:59 [INFO] CLI args: []string{"/Users/skane/bin/terraform", "init"} | |
2020/10/12 17:04:59 [DEBUG] Attempting to open CLI config file: /Users/skane/.terraformrc | |
2020/10/12 17:04:59 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2020/10/12 17:04:59 [DEBUG] checking for credentials in "/Users/skane/.terraform.d/plugins" | |
2020/10/12 17:04:59 [DEBUG] checking for credentials in "/Users/skane/.terraform.d/plugins/darwin_amd64" | |
2020/10/12 17:04:59 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins | |
2020/10/12 17:04:59 [DEBUG] will search for provider plugins in /Users/skane/.terraform.d/plugins | |
2020/10/12 17:04:59 [TRACE] getproviders.SearchLocalDirectory: /Users/skane/.terraform.d/plugins is a symlink to /Users/skane/.terraform.d/plugins | |
2020/10/12 17:04:59 [TRACE] getproviders.SearchLocalDirectory: found terraform.spkane.org/spkane/todo v1.1.0 for darwin_amd64 at /Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane/todo/1.1.0/darwin_amd64 | |
2020/10/12 17:04:59 [DEBUG] will search for provider plugins in /Users/skane/Library/Application Support/io.terraform/plugins | |
2020/10/12 17:04:59 [TRACE] getproviders.SearchLocalDirectory: /Users/skane/Library/Application Support/io.terraform/plugins is a symlink to /Users/skane/Library/Application Support/io.terraform/plugins | |
2020/10/12 17:04:59 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins | |
2020/10/12 17:04:59 [INFO] CLI command args: []string{"init"} | |
Initializing the backend... | |
2020/10/12 17:04:59 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config | |
2020/10/12 17:04:59 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory | |
2020/10/12 17:04:59 [DEBUG] New state was assigned lineage "aa334f86-dc58-b179-c42a-8220fe97d929" | |
2020/10/12 17:04:59 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend) | |
2020/10/12 17:04:59 [TRACE] Meta.Backend: instantiated backend of type <nil> | |
2020/10/12 17:04:59 [DEBUG] checking for provisioner in "." | |
2020/10/12 17:04:59 [DEBUG] checking for provisioner in "/Users/skane/bin" | |
2020/10/12 17:04:59 [DEBUG] checking for provisioner in "/Users/skane/.terraform.d/plugins" | |
2020/10/12 17:04:59 [DEBUG] checking for provisioner in "/Users/skane/.terraform.d/plugins/darwin_amd64" | |
2020/10/12 17:04:59 [INFO] Failed to read plugin lock file .terraform/plugins/darwin_amd64/lock.json: open .terraform/plugins/darwin_amd64/lock.json: no such file or directory | |
2020/10/12 17:04:59 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend | |
2020/10/12 17:04:59 [TRACE] backend/local: state manager for workspace "default" will: | |
- read initial snapshot from terraform.tfstate | |
- write new snapshots to terraform.tfstate | |
- create any backup at terraform.tfstate.backup | |
2020/10/12 17:04:59 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate | |
2020/10/12 17:04:59 [TRACE] statemgr.Filesystem: read snapshot with lineage "2965cc41-d215-6953-c20c-06327d9553f4" serial 21 | |
2020/10/12 17:04:59 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins | |
Initializing provider plugins... | |
2020/10/12 17:04:59 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins | |
2020/10/12 17:04:59 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/plugins: failed to read metadata about .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: stat .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: no such file or directory | |
2020/10/12 17:04:59 [WARN] Failed to scan provider cache directory .terraform/plugins: failed to read metadata about .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: stat .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: no such file or directory | |
2020/10/12 17:04:59 [TRACE] providercache.Dir.InstallPackage: installing terraform.spkane.org/spkane/todo v1.1.0 from /Users/skane/.terraform.d/plugins/terraform.spkane.org/spkane/todo/1.1.0/darwin_amd64 | |
2020/10/12 17:04:59 [TRACE] providercache.fillMetaCache: scanning directory .terraform/plugins- Finding terraform.spkane.org/spkane/todo versions matching "1.1.0"... | |
2020/10/12 17:04:59 [TRACE] getproviders.SearchLocalDirectory: .terraform/plugins is a symlink to .terraform/plugins | |
2020/10/12 17:04:59 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/plugins: failed to read metadata about .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: stat .terraform/plugins/terraform.spkane.org/spkane/todo/1.0.0/darwin_amd64: no such file or directory | |
- Installing terraform.spkane.org/spkane/todo v1.1.0... | |
Error: Failed to install provider | |
Error while installing terraform.spkane.org/spkane/todo v1.1.0: after | |
installing terraform.spkane.org/spkane/todo it is still not detected in the | |
target directory; this is a bug in Terraform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
todo = { | |
source = "terraform.spkane.org/spkane/todo" | |
version = "1.1.0" | |
} | |
} | |
} | |
provider "todo" { | |
host = "127.0.0.1" | |
port = "8080" | |
apipath = "/" | |
schema = "http" | |
} | |
data "todo" "foreign" { | |
id = 1 | |
} | |
resource "todo" "test1" { | |
count = 5 | |
description = "${count.index}-1 ${var.purpose} todo" | |
completed = false | |
} | |
resource "todo" "test2" { | |
count = 5 | |
description = "${count.index}-2 ${var.purpose} todo (linked to ${data.todo.foreign.id})" | |
completed = false | |
} | |
output "todo_1_ids" { | |
value = todo.test1.*.id | |
} | |
output "todo_2_ids" { | |
value = todo.test2.*.id | |
} | |
variable "purpose" { | |
type = string | |
description = "Tag the purpose of this todo" | |
default = "test" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment