Closed audacious-lab closed 1 year ago
Thanks for raising this, @audacious-lab . Can you confirm that you replaced Account_ID
in the policy JSON with your valid account ID?
To answer my own question: most likely yes (as you redacted other parts and it's also different from the README). Could this https://github.com/hashicorp/terraform-provider-aws/issues/27516 be related? Did you try a different region / flavor or zone?
Yes, correct Account_ID was replaced intentionally.
I don't have a lot of AWS experience, so It wasn't very clear from the documentation how to create an AIM Instance profile and how to assign the role to it. That did the trick, I hope that helps anyone else.
AWS CloudShell
aws iam create-instance-profile --instance-profile-name s3-access-for-ec aws iam add-role-to-instance-profile --instance-profile-name s3-access-for-ec2 --role-name s3-access-for-ec2
So, with the above AWS CLI changes it works now? At least you don't get the 400 error anymore and the provisioning continues? If so, then either close this issue or let me know so that I can close it.
HI @rschmied, Thank you for your prompt responses.
Yes, AWS instance has been created.
module.deploy.aws_instance.cml: Creating...
module.deploy.aws_instance.cml: Still creating... [10s elapsed]
module.deploy.aws_instance.cml: Creation complete after 13s [id=i-021c1660e9bbc33c0]
I've opened a separate issue for the next step - module.ready.data.cml2_system.state
config.yaml
Modify permissions in allow-role-assignment
terraform apply -auto-approve