Terraform 'OptInRequired' error due to use of AWS Marketplace CentOS image
Closed this issue · 1 comments
roryirvine commented
I get the following error when running a 'make apply':
Error applying plan:
1 error(s) occurred:
- aws_instance.bastion: Error launching source instance: OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit http://aws.amazon.com/marketplace/pp?sku=aw0evgkw8e5c1q413zgy5pjce
status code: 401, request id: 95e2c07d-6f86-49dd-947a-d6c74a1b769dTerraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
I assume that this is because I've never accepted the click-through license required by the CentOS images on AWS Marketplace.
I don't think terraform has any way to automate this license acceptance step - so perhaps mentioning this in the docs is the best way to handle this for now?