Issue: one of source_tags, source_ranges, or source_service_accounts must be defined
Describe:
While deployment of infrastructure using terraform after running terraform plan getting the above error to define to run the plan.
Solution:
Update soure_tags in firewall rules section,
network = google_compute_network.mynetwork.self_link
allow {
protocol = "tcp"
ports = ["22", "80", "3389"]
}
allow {
protocol = "icmp"
}
source_tags = ["mynetwork"]
}
After that user terraform init , terraform plan , terraform apply.
Tags: terraform, terraform init, terraform apply , terraform code, terraform commands
Add Comment