Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ~/.aws/credentials
- [root]
- aws_access_key_id = xxxx
- aws_secret_access_key = xxxx
- # ~/.aws/config
- [profile myprofile]
- role_arn = arn:aws:iam::xxxxxxxxxx:role/role-to-read-state-file
- source_profile = root
- # config.tf
- terraform {
- backend "s3" {
- bucket = "terraform-bucket"
- key = "statefile"
- region = "eu-west-2"
- profile = "myprofile"
- }
- required_version = "= 0.11.14"
- }
- # works locally and on ec2 amazonlinux2 instance
- aws s3 ls s3://state-file-bucket --profile myprofile
- # works locally
- terraform init
- # doesn't work on a ec2 amazonlinux2 instance
- terraform init
- Failed to get existing workspaces: AccessDenied: Access Denied
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement