This project sets up a Cloud Run service on GCP using Terraform.
- Make sure you have the Google Cloud SDK installed and authenticated.
- Enable the required APIs:
gcloud services enable run.googleapis.com cloudbuild.googleapis.com artifactregistry.googleapis.com
- Build and push the Docker image:
docker build -t us-central1-docker.pkg.dev/x5-vivid-science-g/my-repo/hello-world:latest . gcloud auth configure-docker us-central1-docker.pkg.dev docker push us-central1-docker.pkg.dev/x5-vivid-science-g/my-repo/hello-world:latest
- Initialize and apply the Terraform configuration:
terraform apply
The output will include the URL of your Cloud Run service.
sh cloud_run_url = "https://hello-world-rujwahc4iq-uc.a.run.app"