I'm trying to do a terraform task that involves deploying a gcp virtual machine running nginx and supporting 10000 concurrent https connections.
SSL enabled (using let's encrypt / snake oil cert), Port should redirect from 80 to 443 and also should be reachable using a URL / SSH.
I've already done up to nginx running, I'm stuck at SSL and URL implementation.
Must be done in 2 hours from bid accepting.
Here is the magic code. You can pay (or not — what you wish) for it:
resource "google_compute_url_map" "http-redirect" {
name = "http-redirect"
default_url_redirect {
redirect_response_code = "MOVED_PERMANENTLY_DEFAULT" // 301 redirect
strip_query = false
https_redirect = true // this is the magic
}
}
resource "google_compute_target_http_proxy" "http-redirect" {
name = "http-redirect"
url_map = google_compute_url_map.http-redirect.self_link
}
resource "google_compute_global_forwarding_rule" "http-redirect" {
name = "http-redirect"
target = google_compute_target_http_proxy.http-redirect.self_link
ip_address = [login to view URL]
port_range = "80"
}
€30 EUR in 1 day
0.0 (0 reviews)
0.0
0.0
3 freelancers are bidding on average €152 EUR for this job
Hi there,
Would like to work on your project and setup your virtual machine as you have requested, nginx with ssl, ssh accessible and url redirection. Please contact me