An open API service indexing awesome lists of open source software.

https://github.com/ratulbasak/gcp_automation


https://github.com/ratulbasak/gcp_automation

containerization docker fastapi gcp google-cloud kubernetes python terraform

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# gcp_automation

## Project Structure
```bash
.
├── apps
│ └── backend
│ ├── app
│ │ ├── app.py
│ │ ├── static
│ │ │ ├── app.css
│ │ │ └── app.js
│ │ └── templates
│ │ └── index.html
│ ├── Dockerfile
│ └── requirements.txt
├── README.md
└── terraform
└── cloud-run
├── main.tf
├── outputs.tf
├── providers.tf
└── variables.tf
```

## Build
```bash
cd apps/backend
docker build -t fastapi .
docker run --rm -p 8000:8000 fastapi
```

## Terraform

Cloud Run terraform apply

```bash
cd terraform/cloud-run
terraform init
terraform plan -var="project_id=" -var="region="
terraform apply -var="project_id=" -var="region="
```

### Cleanup

```bash
terraform destroy -var="project_id=" -var="region="
```