Vote Terraform Level-2 , Task 10: Grant EC2 Access to S3 Bucket Using Terraform

It says AMI not fetched from data block in data.tf event if it’s the case!

Hi @itayara

Please share more details about the issue so we can help you better. Let us know what steps you’ve already taken, and it would be helpful if you could include a screenshot.

Hi,

I used data block in data.tf to fetch the latest AMI but when evaluating the task it always says ami not fetched using data block in data.tf

data “aws_ami” “amazon-linux-2” {
most_recent = true
owners = [“amazon”]
filter {
name = “name”
values = [“amzn2-ami-hvm*”]
}
}

Hi @itayara

Thanks for your feedback. It’s a valid issue. I’ve shared it with the team to look into, and I’ll keep you updated.

Hi @itayara,

Thank you for your feedback. The team has updated it, please try again.

Hi @raymond.baoly,

Working fine.
Thanks for your help.