Heavily based on Firebase documentation for terraform: https://firebase.google.com/docs/projects/terraform/get-started - adapted for pulumi
with some more configuration / logs to help !
Can be used as a repository template / quickstart.
The intended purpose is to have a quickstart on firebase on a brand new GCP project - with some feature configured:
- Setups a new GCP Project with your billing account.
- Activate minimum required services / APIs
- Activates Firebase on the GCP Project
- Sets up a secure ios API key with solely GMaps SDK activated
- Sets up identity module as another example firebase feature
- installed pulumi cli
- be logged in on pulumi
- have your own backend setup [optional]
Update ./Pulumi.yaml with your project name (myapp-gcp
).
Then, setup a new stack (with your updated name):
pulumi stack init YOURNAME/myapp-gcp/prod
Then, set your configuration based on the settings in ./src/variables.ts
pulumi config set NAME_OF_VAR VALUE_OF_VAR
Use --secret
flag to hide sensitive configuration in stack config !
Using gcp:credentials
prevents conflict between gcloud
configurations (And their activation) - you can usually find your gcloud
credentials in ~/.config/gcloud/
.
Then, start your project (or plan
) !
pulumi up
Manual actions and outputs will be logged automatically as ressources get created to help you (Not all things can be IaC-ed !)
Pulumi => https://www.pulumi.com/
Pulumi GCP Provider Documentation => https://www.pulumi.com/registry/packages/gcp/
Firebase Terraform Setup by GCP => https://firebase.google.com/docs/projects/terraform/get-started