initial commit
Signed-off-by: Jason Hall <imjasonh@gmail.com>
This commit is contained in:
commit
4dc1b58f2f
20 changed files with 1398 additions and 0 deletions
32
terraform/network.tf
Normal file
32
terraform/network.tf
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
resource "google_compute_address" "forgejo" {
|
||||
name = "forgejo-ip"
|
||||
region = var.region
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "https" {
|
||||
name = "allow-https"
|
||||
network = "default"
|
||||
direction = "INGRESS"
|
||||
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
ports = ["80", "443"]
|
||||
}
|
||||
|
||||
source_ranges = ["0.0.0.0/0"]
|
||||
target_tags = ["forgejo"]
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "iap_ssh" {
|
||||
name = "allow-iap-ssh"
|
||||
network = "default"
|
||||
direction = "INGRESS"
|
||||
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
ports = ["22"]
|
||||
}
|
||||
|
||||
source_ranges = ["35.235.240.0/20"]
|
||||
target_tags = ["forgejo"]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue