2026-09-13
Daily Tech Challenge
`terraform init` has already been run. No AWS credentials are configured in this shell, and no subnet in the account is tagged `does-not-exist`. What does `terraform validate` report for this configuration?
variable "ami_id" {
type = string
}
data "aws_subnet" "private" {
filter {
name = "tag:Name"
values = ["does-not-exist"]
}
}
resource "aws_instance" "web" {
ami = var.ami_id
instance_typ = "t3.micro"
subnet_id = data.aws_subnet.private.id
}Sunday, September 13, 2026 · A new challenge drops every day