Skip to content

Instantly share code, notes, and snippets.

@viggin543
Created September 24, 2022 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viggin543/fee6932524aee6bbf2adf2e5e3760eb3 to your computer and use it in GitHub Desktop.
Save viggin543/fee6932524aee6bbf2adf2e5e3760eb3 to your computer and use it in GitHub Desktop.
resource "google_compute_url_map" "foo-http" {
name = "loomi-foo-http"
description = "foo http redirect"
default_url_redirect {
strip_query = false
redirect_response_code = "MOVED_PERMANENTLY_DEFAULT"
https_redirect = true
}
}
resource "google_compute_target_http_proxy" "foo-http-proxy" {
name = "foo-https-proxy"
url_map = google_compute_url_map.foo-http.self_link
}
resource "google_compute_global_forwarding_rule" "foo-http" {
provider = google-beta
name = "foo-http-rule"
load_balancing_scheme = "EXTERNAL"
target = google_compute_target_http_proxy.foo-http-proxy.self_link
ip_address = google_compute_global_address.foo_ip_address.address
port_range = "80"
depends_on = [google_compute_global_address.foo_ip_address]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment