--- me ---
We have some terraform that creates EC2 from CentOS, and has been working for months. In the last 24 hours this has broken.
``` 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 https://aws.amazon.com/marketplace/pp?sku=f7hh9b6i4gjxl02w2umkoyu5 status code: 401, request id: 6626612d-a97b-483a-8ccb-9bf9cfbb41e8 ```
What I have found is that the Centos AMI and Tableau from the marketplace have the same product code / id.
CentOS AMI: ami-089ccd342f0be98ab
So what we are seeing is that when Terraform uses this AMI, we get the 401 above.
Please help
--- aws ---
After further internal research, I have found that the Tableau recently created a listing with very similar name as the CentOS AMI.
ami-02eac2c0129f6376b <----This is from CentOS CentOS Linux 7 x86_64 HVM EBS ENA 1901_01-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-05713873c6794f575.4
ami-089ccd342f0be98ab <----This is from Tableau CentOS Linux 7 x86_64 HVM EBS ENA 1901_01-0722b432-8459-49b6-9b90-79b42624d25d-ami-05713873c6794f575.4
Would you please let me know if your terraform is configured to use AMI ID or AMI name?
--- me ---
We use the AMI "name" to get the latest version of the image. How is it that Tableau can create an image with the same name?
```
data "aws_ami" "centos" { owners = ["679593333241"] most_recent = true
filter {
name = "name"
values = ["CentOS Linux 7 x86_64 HVM EBS *"]
}
filter {
name = "architecture"
values = ["x86_64"]
}
filter {
name = "root-device-type"
values = ["ebs"]
}
}```