Skip to content

Instantly share code, notes, and snippets.

@npepinpe
Created March 22, 2017 16:05
Show Gist options
  • Save npepinpe/71b8cd59941eab413df43855615867de to your computer and use it in GitHub Desktop.
Save npepinpe/71b8cd59941eab413df43855615867de to your computer and use it in GitHub Desktop.
$ terraform init -backend-config='key=global.tfstate' -backend-config=config.tfvars
2017/03/22 17:03:20 [INFO] Terraform version: 0.9.1
2017/03/22 17:03:20 [INFO] Go runtime version: go1.8
2017/03/22 17:03:20 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.9.1_1/bin/terraform", "init", "-backend-config='key=global.tfstate'", "-backend-config=config.tfvars"}
2017/03/22 17:03:20 [DEBUG] Detected home directory from env var: /Users/npepinpe
2017/03/22 17:03:20 [DEBUG] Detected home directory from env var: /Users/npepinpe
2017/03/22 17:03:20 [DEBUG] Attempting to open CLI config file: /Users/npepinpe/.terraformrc
2017/03/22 17:03:20 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/03/22 17:03:20 [DEBUG] Detected home directory from env var: /Users/npepinpe
2017/03/22 17:03:20 [INFO] CLI command args: []string{"init", "-backend-config='key=global.tfstate'", "-backend-config=config.tfvars"}
Downloading modules (if any)...
Get: file:///Users/npepinpe/work/terraform/deploy/test/global
2017/03/22 17:03:20 [DEBUG] command: loading backend config file: /Users/npepinpe/work/terraform/deploy/test/global
Initializing the backend...
2017/03/22 17:03:20 [DEBUG] command: adding extra backend config from CLI
2017/03/22 17:03:20 [WARN] command: backend config change! saved: 9345827190033900985, new: 13068732292880582401
Backend configuration changed!
Terraform has detected that the configuration specified for the backend
has changed. Terraform will now reconfigure for this backend. If you didn't
intend to reconfigure your backend please undo any changes to the "backend"
section in your Terraform configuration.
2017/03/22 17:03:21 [WARN] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
2017/03/22 17:03:21 [DEBUG] command: asking for input: "Do you want to copy the state from \"s3\"?"
Do you want to copy the state from "s3"?
Would you like to copy the state from your prior backend "s3" to the
newly configured "s3" backend? If you're reconfiguring the same backend,
answering "yes" or "no" shouldn't make a difference. Please answer exactly
"yes" or "no".
Enter a value: yes
2017/03/22 17:03:23 [WARN] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
Error locking destination state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed
2017/03/22 17:03:24 [DEBUG] plugin: waiting for all plugin processes to complete...
status code: 400, request id: A6J5VAQG5RSPVQA2LMAV78RPDBVV4KQNSO5AEMVJF66Q9ASUAAJG
Lock Info:
ID: 019ddd4b-f3bb-0d87-1d6b-e966e75167be
Path: terraform-statefiles.sandbox/global.tfstate
Operation: migration
Who: npepinpe@nposx
Version: 0.9.1
Created: 2017-03-22 16:03:23.563418548 +0000 UTC
Info: source state
Terraform acquires a state lock to protect the state from being written
by multiple users at the same time. Please resolve the issue above and try
again. For most commands, you can disable locking with the "-lock=false"
flag, but this is not recommended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment