Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Created February 8, 2021 21:22
Show Gist options
  • Save kwilczynski/5877d67f12612a0e51e1a2c7c176d031 to your computer and use it in GitHub Desktop.
Save kwilczynski/5877d67f12612a0e51e1a2c7c176d031 to your computer and use it in GitHub Desktop.
  kwilczynski@rocinante  tmp/test  $ cat main.tf
terraform {
required_providers {
test = {
version = "0.1.0"
source = "bazinga.com/test/test"
}
}
}
provider "test" {}
  kwilczynski@rocinante  tmp/test  $ find ~/.terraform.d/
/Users/kwilczynski/.terraform.d/
/Users/kwilczynski/.terraform.d/plugins
/Users/kwilczynski/.terraform.d/plugins/bazinga.com
/Users/kwilczynski/.terraform.d/plugins/bazinga.com/test
/Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test
/Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test/0.1.0
/Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test/0.1.0/darwin_amd64
/Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test/0.1.0/darwin_amd64/terraform-provider-test
  kwilczynski@rocinante  tmp/test  $ TF_LOG=1 terraform init
2021/02/08 22:21:59 [WARN] Invalid log level: "1". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR]
2021/02/08 22:21:59 [INFO] Terraform version: 0.14.6
2021/02/08 22:21:59 [INFO] Go runtime version: go1.15.6
2021/02/08 22:21:59 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/2.2.0/versions/0.14.6/terraform", "init"}
2021/02/08 22:21:59 [DEBUG] Attempting to open CLI config file: /Users/kwilczynski/.terraformrc
2021/02/08 22:21:59 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/02/08 22:21:59 [DEBUG] checking for credentials in "/Users/kwilczynski/.terraform.d/plugins"
2021/02/08 22:21:59 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021/02/08 22:21:59 [DEBUG] will search for provider plugins in /Users/kwilczynski/.terraform.d/plugins
2021/02/08 22:21:59 [TRACE] getproviders.SearchLocalDirectory: /Users/kwilczynski/.terraform.d/plugins is a symlink to /Users/kwilczynski/.terraform.d/plugins
2021/02/08 22:21:59 [TRACE] getproviders.SearchLocalDirectory: found bazinga.com/test/test v0.1.0 for darwin_amd64 at /Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test/0.1.0/darwin_amd64
2021/02/08 22:21:59 [DEBUG] ignoring non-existing provider search directory /Users/kwilczynski/Library/Application Support/io.terraform/plugins
2021/02/08 22:21:59 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2021/02/08 22:21:59 [INFO] CLI command args: []string{"init"}
2021/02/08 22:21:59 [WARN] Invalid log level: "1". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR]
Initializing the backend...
2021/02/08 22:21:59 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2021/02/08 22:21:59 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2021/02/08 22:21:59 [DEBUG] New state was assigned lineage "adec05f4-f257-0732-c664-eb65ff5372fd"
2021/02/08 22:21:59 [TRACE] Meta.Backend: using default local state only (no backend configuration, and no existing initialized backend)
2021/02/08 22:21:59 [TRACE] Meta.Backend: instantiated backend of type <nil>
2021/02/08 22:21:59 [DEBUG] checking for provisioner in "."
2021/02/08 22:21:59 [DEBUG] checking for provisioner in "/usr/local/Cellar/tfenv/2.2.0/versions/0.14.6"
2021/02/08 22:21:59 [DEBUG] checking for provisioner in "/Users/kwilczynski/.terraform.d/plugins"
2021/02/08 22:21: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
2021/02/08 22:21:59 [TRACE] Meta.Backend: backend <nil> does not support operations, so wrapping it in a local backend
2021/02/08 22:21: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
2021/02/08 22:21:59 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2021/02/08 22:21:59 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2021/02/08 22:21:59 [TRACE] statemgr.Filesystem: read nil snapshot
Initializing provider plugins...
- Finding bazinga.com/test/test versions matching "0.1.0"...
2021/02/08 22:21:59 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2021/02/08 22:21:59 [TRACE] getproviders.SearchLocalDirectory: failed to resolve symlinks for .terraform/providers: lstat .terraform: no such file or directory
2021/02/08 22:21:59 [TRACE] providercache.fillMetaCache: error while scanning directory .terraform/providers: cannot search .terraform/providers: lstat .terraform/providers: no such file or directory
2021/02/08 22:21:59 [TRACE] providercache.Dir.InstallPackage: installing bazinga.com/test/test v0.1.0 from /Users/kwilczynski/.terraform.d/plugins/bazinga.com/test/test/0.1.0/darwin_amd64
- Installing bazinga.com/test/test v0.1.0...
2021/02/08 22:21:59 [TRACE] providercache.fillMetaCache: scanning directory .terraform/providers
2021/02/08 22:21:59 [TRACE] getproviders.SearchLocalDirectory: .terraform/providers is a symlink to .terraform/providers
2021/02/08 22:21:59 [TRACE] getproviders.SearchLocalDirectory: found bazinga.com/test/test v0.1.0 for darwin_amd64 at .terraform/providers/bazinga.com/test/test/0.1.0/darwin_amd64
2021/02/08 22:21:59 [TRACE] providercache.fillMetaCache: including .terraform/providers/bazinga.com/test/test/0.1.0/darwin_amd64 as a candidate package for bazinga.com/test/test 0.1.0
- Installed bazinga.com/test/test v0.1.0 (unauthenticated)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment