AK
Size: a a a
AK
SD
SD
SD
SD
SD
it-k8s|ci_improvements ⇒ TF_LOG=TRACE terraform state pull
2020/03/25 16:07:54 [INFO] Terraform version: 0.12.23
2020/03/25 16:07:54 [INFO] Go runtime version: go1.13.8
2020/03/25 16:07:54 [INFO] CLI args: []string{"/usr/local/bin/terraform", "state", "pull"}
2020/03/25 16:07:54 [DEBUG] Attempting to open CLI config file: /Users/sdrozdov/.terraformrc
2020/03/25 16:07:54 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/03/25 16:07:54 [INFO] CLI command args: []string{"state", "pull"}
2020/03/25 16:07:54 [TRACE] Meta.Backend: BackendOpts.Config not set, so using settings loaded from 1-main.tf:3,5-20
2020/03/25 16:07:54 [TRACE] Meta.Backend: built configuration for "swift" backend with hash value 2341092202
2020/03/25 16:07:54 [TRACE] Preserving existing state lineage "89c6b7a1-9c18-d13d-3f00-a35006e20f2f"
2020/03/25 16:07:54 [TRACE] Preserving existing state lineage "89c6b7a1-9c18-d13d-3f00-a35006e20f2f"
2020/03/25 16:07:54 [TRACE] Meta.Backend: working directory was previously initialized for "swift" backend
2020/03/25 16:07:54 [TRACE] Meta.Backend: using already-initialized, unchanged "swift" backend configuration
2020/03/25 16:07:55 [TRACE] Meta.Backend: instantiated backend of type *swift.Backend
2020/03/25 16:07:55 [DEBUG] checking for provider in "."
2020/03/25 16:07:55 [DEBUG] checking for provider in "/usr/local/bin"
2020/03/25 16:07:55 [DEBUG] checking for provisioner in "."
2020/03/25 16:07:55 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/03/25 16:07:55 [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/03/25 16:07:55 [TRACE] Meta.Backend: backend *swift.Backend does not support operations, so wrapping it in a local backend
2020/03/25 16:07:55 [DEBUG] Creating container
Error loading the state: Method not allowed
Please ensure that your Terraform state exists and that you've
configured it properly. You can use the "-state" flag to point
Terraform at another state file.
SD
terraform {
required_version = "=v0.12.23"
backend "swift" {}
}
data "terraform_remote_state" "state" {
backend = "swift"
config = {
auth_url = var.os_auth_url
user_name = var.os_username
password = var.os_password
region_name = var.os_region
container = "terraform-state"
}
}
SD
НС
SD
SD
Initializing the backend...
2020/03/25 16:07:12 [TRACE] Meta.Backend: built configuration for "swift" backend with hash value 2341092202
2020/03/25 16:07:12 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/03/25 16:07:12 [DEBUG] New state was assigned lineage "d2a6ff8d-770a-efba-c3f9-f35874a8cd94"
2020/03/25 16:07:12 [TRACE] Meta.Backend: moving from default local state only to "swift" backend
2020/03/25 16:07:13 [DEBUG] checking for provider in "."
2020/03/25 16:07:13 [DEBUG] checking for provider in "/usr/local/bin"
2020/03/25 16:07:13 [DEBUG] checking for provisioner in "."
2020/03/25 16:07:13 [DEBUG] checking for provisioner in "/usr/local/bin"
2020/03/25 16:07:13 [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/03/25 16:07:13 [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/03/25 16:07:13 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2020/03/25 16:07:13 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2020/03/25 16:07:13 [TRACE] statemgr.Filesystem: read nil snapshot
2020/03/25 16:07:13 [TRACE] Meta.Backend: ignoring local "default" workspace because its state is empty
2020/03/25 16:07:13 [DEBUG] New state was assigned lineage "89c6b7a1-9c18-d13d-3f00-a35006e20f2f"
2020/03/25 16:07:13 [TRACE] Preserving existing state lineage "89c6b7a1-9c18-d13d-3f00-a35006e20f2f"
Successfully configured the backend "swift"! Terraform will automatically
use this backend unless the backend configuration changes.
2020/03/25 16:07:13 [DEBUG] Creating container
Error: Failed to get existing workspaces: Method not allowed
SD
SD
swift download terraform-state
tfstate.tf [auth 0.959s, headers 1.771s, total 1.965s, 0.018 MB/s]
SD
NS
AK
DK
DK
docker run -v $(PWD)/:/go -i hashicorp/terraform:0.12.21 plan
VT
DK