Repository navigation
Description
Similar to #335, it appears the installer may be unpredictable with AWS credentials. I was experimenting with running in a container using env vars for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Because it was in a container I had no ~/.aws/credentials file. This was good enough for the installer's initial phases, however once terraform ran I hit this error:
data.terraform_remote_state.assets: Refreshing state...
data.aws_region.current: Refreshing state...
data.aws_availability_zones.azs: Refreshing state...
data.aws_route53_zone.tectonic: Refreshing state...
Error: Error refreshing state: 1 error(s) occurred:
* module.dns.data.aws_route53_zone.tectonic: 1 error(s) occurred:
* module.dns.data.aws_route53_zone.tectonic: data.aws_route53_zone.tectonic: no matching Route53Zone found
ERRO[0056] terraform failed: failed to run Terraform: exit status 1
FATA[0056] failed to generate asset: failed to read tfstate file "/tmp/openshift-install-314417690/infra.tfstate": open /tmp/openshift-install-314417690/infra.tfstate: no such file or directory
On a hunch from others hitting similar issues yesterday I mounted in "-v /home/dgoodwin/.aws/credentials:/home/user/.aws/credentials:Z", in this file default was my desired credentials, and now terraform was happy to complete the install.
It appears the installer and terraform are not loading credentials the same way, specifically terraform does not appear to respect the standard env vars for AWS creds.
Activity
wking commentedon Sep 27, 2018
I expect Terraform does this right, and our Go's hard-coded
default(with no way to override in Go) is what's breaking you here. We may be able to just change the default to an empty string (or drop AWS profiles from Go entirely?), but I haven't had time to look carefully enough to be confident.dgoodwin commentedon Sep 27, 2018
Using your latest dockerfile and pr #346, I was able to remove both my credentials and config volume mounts and successfully run the installer. Something may have fixed this in the last day or so.
dak1n1 commentedon Sep 27, 2018
I'm getting this same error from the installer. I just did a git rebase, so I'm working from the latest code in this repo. This is my first time running it, so I might have missed a setup step. Here are some relevant system settings:
As you can see, my credentials have enough access to view Route53:
I'm running this on a development instance in EC2 to try out the installer:
wking commentedon Sep 27, 2018
This is a separate issue; see here. I'll port that comment into the new
openshift-installdoc locations.wking commentedon Sep 27, 2018
#353.
dak1n1 commentedon Sep 27, 2018
@wking thanks for the help! I created the public Route 53 zone and set that as my
OPENSHIFT_INSTALL_BASE_DOMAIN. All's good now :)sallyom commentedon Oct 8, 2018
see my comment in #427
aws-sdk-gorequires AWS_PROFILE be set to configure a profile other than "default", AFAICT