antonbabenko/modules.tf-demo

Credential Issue

Closed this issue · 6 comments

I had Issue with credentials. If the key in common/main_providers.tf only export method works

2019/11/10 18:10:00 Create S3 bucket terraform-states-072717525149 returned an error: AccessDenied: Access Denied
	status code: 403, request id: 37AC6C10091FEAC5, host id: l3BbfEesPLDq8tNiE3F9rVeSO7fSMZpyz5VvHgMDTT0Ahj4xcOFXzKwYbrn/CIjLK8a2L8mW1Tw=. Sleeping for 10s and will try again.

Have another issue:

image

[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data] 2019/11/10 18:44:00 Running command: terraform init -backend-config=skip_credentials_validation=true -backend-config=skip_metadata_api_check=true -backend-config=bucket=terraform-states-388956784340 -backend-config=dynamodb_table=terraform-locks-388956784340 -backend-config=encrypt=true -backend-config=key=aws-data/terraform.tfstate -backend-config=region=us-east-1 -input=false

Initializing the backend...

Error: Failed to get existing workspaces: AccessDenied: Access Denied
	status code: 403, request id: 88F5C30EE7A1E591, host id: fnaEdxn/GLEAOmVw6iHqNitpchXY0Zy0/ZbuVWjg3SmEUGI4UfByb3/mhRlYDVzBwuH6bSqb5P4=


[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data] 2019/11/10 18:44:00 Detected 1 Hooks
[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data] 2019/11/10 18:44:00 Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data has finished with an error: Hit multiple errors:
exit status 1
[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc] 2019/11/10 18:44:00 Dependency /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data of module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc just finished with an error. Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc will have to return an error too.
[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/autoscaling_2] 2019/11/10 18:44:00 Dependency /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data of module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/autoscaling_2 just finished with an error. Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/autoscaling_2 will have to return an error too.
[terragrunt] [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc] 2019/11/10 18:44:00 Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc has finished with an error: Cannot process module Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/vpc (excluded: false, dependencies: [/home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data]) because one of its dependencies, Module /home/genaker/Downloads/Cloud-craft-former/cloud-craft_former/us-west-1/aws-data (excluded: false, dependencies: []), finished with an error: Hit multiple errors:
exit status 1

Something wrong with S3 bucket permissions. Terraform creates a bucket but can't have access to it. It is a temporary fix: after making it public for read-write terragrunt works

@antonbabenko please, can you suggest why this permission happened, what permission bucket should have?

Hi @Genaker!

I am back from vacation, and ready to help you. Sorry for the delay.

The bucket has to be writable by your current IAM user and match the configuration as specified in remote_state block in terragrunt.hcl (check encrypt and region). Normally this bucket is created on the first run of terragrunt commands.

I will need more information about why it failed for you and what exactly was missing from your side to be able to describe it in readme or maybe change in the code.

Closing this for now.