Add Cloud Run redirect service IaC - #154
Closed
jirhiker wants to merge 1 commit into
Closed
Conversation
Terraform for a Cloud Run service that 301-redirects all requests to https://metermanager.pvacd.com (path + query preserved), using the prebuilt schmunk42/nginx-redirect image. Service only; domain mapping left to the operator. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Terraform for a Cloud Run service that 301-redirects all requests to
https://metermanager.pvacd.com, path + query preserved. Lives iniac/cloudrun-redirect/.How
schmunk42/nginx-redirect(Docker Hub, pulled directly by Cloud Run) — no image to build/maintain.google_cloud_run_v2_service+allUsersrun.invokerIAM so browsers can reach it.https/metermanager.pvacd.com/301).run.appURL; point DNS / Cloud Run domain mapping at it separately.Notes
docker-compose.production.yml— existing prod deployment unchanged.iam.allowedPolicyMemberDomainsorg policy can blockallUsers; likely failure point if IAM apply errors.:latest— pin a tag/digest for reproducible deploys.Verify
```sh
terraform init && terraform apply
curl -sI "$(terraform output -raw service_url)/x?q=1"
HTTP/2 301 -> location: https://metermanager.pvacd.com/x?q=1
```
🤖 Generated with Claude Code