@@ -39,19 +39,13 @@ gcloud auth application-default set-quota-project "$GOOGLE_CLOUD_PROJECT"
3939
4040** Crucial Step:** If you are deploying within an organization (e.g., a company account), certain policies might block public access to Cloud Run.
4141
42- Enable the required service API:
43-
44- ``` bash
45- gcloud services enable orgpolicy.googleapis.com --project=" $GOOGLE_CLOUD_PROJECT " --quiet
46- ```
47-
48- Check Ingress (Should allow 'all'):
42+ Check Ingress (Should be ` allowAll: true ` ):
4943
5044``` bash
5145gcloud org-policies describe " run.allowedIngress" --effective --project=" $GOOGLE_CLOUD_PROJECT " --quiet
5246```
5347
54- Check Domain Sharing (Should ' allowAll' ):
48+ Check Domain Sharing (Should be ` allowAll: true ` ):
5549
5650``` bash
5751gcloud org-policies describe " iam.allowedPolicyMemberDomains" --effective --project=" $GOOGLE_CLOUD_PROJECT " --quiet
@@ -61,7 +55,14 @@ If these are restrictive, you may need to ask your Organization Admin to adjust
6155
6256## Step 4: Deploy with Terraform
6357
64- The ` gcp ` directory contains the Terraform configuration.
58+ The Terraform version pre-installed in Google Cloud Shell is too old.
59+ Install a current Terraform version:
60+
61+ ``` bash
62+ curl " https://releases.hashicorp.com/terraform/1.14.3/terraform_1.14.3_linux_amd64.zip" -o " $HOME /terraform.zip"
63+ unzip " $HOME /terraform.zip" terraform -d " $HOME "
64+ export PATH=" $HOME :$PATH "
65+ ```
6566
6667Navigate to the ` gcp ` directory:
6768
@@ -95,13 +96,13 @@ You find there a list of all variables and their default values.
9596Initialize Terraform:
9697
9798``` bash
98- terraform init
99+ $HOME / terraform init
99100```
100101
101102Apply the configuration:
102103
103104``` bash
104- terraform apply
105+ $HOME / terraform apply
105106```
106107
107108* Review the plan when prompted.
@@ -142,10 +143,10 @@ Copy `providers.tf.gcs` to `providers.tf` (configured for GCS backend):
142143cp providers.tf.gcs providers.tf
143144` ` `
144145
145- Run `terraform init -migrate-state` to copy your local state to the bucket :
146+ Run `$HOME/ terraform init -migrate-state` to copy your local state to the bucket :
146147
147148` ` ` bash
148- terraform init -migrate-state
149+ $HOME/ terraform init -migrate-state
149150` ` `
150151
151152# # Done 🎉
0 commit comments