-
Notifications
You must be signed in to change notification settings - Fork 10k
Closed
Description
Hello
I'm getting a very strange error, when configuring S3 remote for tfstate. My colleagues are using same commands, and don't get this error - everything works fine for them. So I guess that might be related to Terraform dependencies or OS. Any ideas where I should search for failure reason?
Terraform versions 0.7.7-0.7.13.
$ env | grep AWS
AWS_DEFAULT_PROFILE=*****
AWS_PROFILE=******
AWS_REGION=us-east-1
$ aws s3 cp s3://my-bucket/infrastructure/terraform.tfstate ./
download: s3://my-bucket/infrastructure/terraform.tfstate to ./terraform.tfstate
$ cat ./terraform.tfstate
/* proper file */
$ export TF_LOG=TRACE
$ terraform remote config \
> -backend=s3 \
> -backend-config=bucket=my-bucket \
> -backend-config=key=infrastructure/terraform.tfstate \
> -backend-config=region=us-east-1 \
> -backend-config=skip_cert_verification=true
2016/11/29 12:17:43 [INFO] Terraform version: 0.7.11 65acdc2ea31541283e0fec2fdcc8cb49e89e4cf6
2016/11/29 12:17:43 [INFO] CLI args: []string{"/opt/terraform/terraform", "remote", "config", "-backend=s3", "-backend-config=bucket=my-bucket", "-backend-config=key=infrastructure/terraform.tfstate", "-backend-config=region=us-east-1", "-backend-config=skip_cert_verification=true"}
2016/11/29 12:17:43 [DEBUG] Detected home directory from env var: /Users/andrejs.sisojevs
2016/11/29 12:17:43 [DEBUG] Detected home directory from env var: /Users/andrejs.sisojevs
2016/11/29 12:17:43 [DEBUG] Attempting to open CLI config file: /Users/andrejs.sisojevs/.terraformrc
2016/11/29 12:17:43 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2016/11/29 12:17:43 [DEBUG] Detected home directory from env var: /Users/andrejs.sisojevs
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [WARN] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
Remote configuration updated
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [TRACE] Preserving existing state lineage "c6380fd3-57a5-4139-93dd-1d6154f1cf0b"
2016/11/29 12:17:43 [WARN] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
Error while performing the initial pull. The error message is shown
2016/11/29 12:17:44 [DEBUG] plugin: waiting for all plugin processes to complete...
below. Note that remote state was properly configured, so you don't
need to reconfigure. You can now use `push` and `pull` directly.
Error reloading remote state: RequestError: send request failed
caused by: Get https://my-bucket.s3.amazonaws.com/infrastructure/terraform.tfstate: x509: certificate signed by unknown authority
Although .tfstate in S3 bucket if fine (uploaded by colleagues who do not have problems with terraform), locally it generates almost empty file
{
"version": 3,
"serial": 0,
"lineage": "c6380fd3-57a5-4139-93dd-1d6154f1cf0b",
"remote": {
"type": "s3",
"config": {
"bucket": "my-bucket",
"key": "infrastructure/terraform.tfstate",
"region": "us-east-1",
"skip_cert_verification": "true"
}
},
"modules": [
{
"path": [
"root"
],
"outputs": {},
"resources": {},
"depends_on": []
}
]
}
Tried exposing bucket - did not help.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:DeleteObject",
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::my-bucket",
"arn:aws:s3:::my-bucket/*"
]
}
]
}
No old plugins in OS ("terraform-*" files)
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels