This solution use CloudRun to deploy a simple nodejs containerized "Hello World" app.
The container is accessible from an external https load balancer.
The infrastructure is composed by the following resources:
- A cloud Run service that accepts traffic from the internet only through the external Application Load Balancer. Direct requests to the run.app URL from the internet are not allowed.
- An external https load balancer that has the Cloud Run configured as its serverless NEG backend
gcloud auth application-default login
# run the following command set up your default Google Cloud Project
gcloud config set project <your-project-id>
Run the setup.sh script to install all the required APIs
chmod +x setup.sh
./setup.sh
cd into the Infrastructure folder and run the following commands
terraform init
terraform plan
terraform apply
In your Infrastructure folder run
terraform destroy