Knowledge Articles

Issue: one of source_tags, source_ranges, or source_service_accounts must be defined

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

About the author

admin

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.