File tree Expand file tree Collapse file tree 5 files changed +24
-41
lines changed Expand file tree Collapse file tree 5 files changed +24
-41
lines changed Original file line number Diff line number Diff line change 33* .backup
44* .tfstate
55
6+ # Lock file not needed for examples.
7+ .terraform.lock.hcl
8+
69# HCL vars except example
710* .tfvars
811! example.tfvars
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33## Prerequisites
44
5- * [ OpenTofu ] ( https://opentofu.org ) or Terraform .
5+ * [ Terraform ] ( https://www.terraform.io/ ) or [ OpenTofu ] ( https://opentofu.org ) .
66* [ gcloud] ( https://cloud.google.com/sdk/docs/install ) tool.
77* [ Google Cloud] ( https://cloud.google.com/ ) project.
88
99## Setup
1010
11- * Initialize project using ` tofu init` command.
11+ * Initialize project using ` terraform init` command.
1212* Copy ` example.tfvars ` to ` prod.tfvars ` and edit the file.
1313* Prepare Terraform plan using variables file: \
14- ` tofu plan -var-file="prod.tfvars" -out=tfplan`
15- * Apply a plan using ` tofu apply tfplan` command.
14+ ` terraform plan -var-file="prod.tfvars" -out=tfplan`
15+ * Apply a plan using ` terraform apply tfplan` command.
Original file line number Diff line number Diff line change 1- # See: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service
1+ # See: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service
22
33# Beta provider is required for "empty_dir" storage type.
44provider "google-beta" {
@@ -109,6 +109,7 @@ resource "google_cloud_run_v2_service" "default" {
109109# Make service public.
110110# See: https://cloud.google.com/run/docs/authenticating/public
111111resource "google_cloud_run_service_iam_binding" "run_invoker" {
112+ project = google_cloud_run_v2_service. default . project
112113 location = google_cloud_run_v2_service. default . location
113114 service = google_cloud_run_v2_service. default . name
114115 role = " roles/run.invoker"
Original file line number Diff line number Diff line change 1+ terraform {
2+ required_version = " ~> 1.5"
3+
4+ required_providers {
5+ google-beta = {
6+ source = " hashicorp/google-beta"
7+ version = " ~> 5.38"
8+ }
9+
10+ google = {
11+ source = " hashicorp/google"
12+ version = " ~> 5.38"
13+ }
14+ }
15+ }
You can’t perform that action at this time.
0 commit comments