Skip to content

Conversation

@glasnt
Copy link
Collaborator

@glasnt glasnt commented Apr 27, 2023

With #56, will help resolve #45

This change uses Firebase Hosting Sites, which allows for a multiple deployments per project.

Suffixes are appended to the project ID to entire global uniqueness.

@glasnt glasnt marked this pull request as ready for review April 28, 2023 06:13
@glasnt glasnt requested review from a team and donmccasland as code owners April 28, 2023 06:13
@glasnt
Copy link
Collaborator Author

glasnt commented Apr 28, 2023


TestSimpleExample 2023-04-28T06:20:41Z retry.go:99: Returning due to fatal error: FatalError{Underlying: error while running command: exit status 1; 
Error: Error creating Site: googleapi: Error 404: Requested entity was not found.

  with module.dynamic-python-webapp.google_firebase_hosting_site.client,
  on ../../firebase.tf line 24, in resource "google_firebase_hosting_site" "client":
  24: resource "google_firebase_hosting_site" "client" {
}

I was getting this in testing this code yesterday, and if I reapplied the terraform, I'd get a 409 error, but the site was created.

@glasnt glasnt marked this pull request as draft May 7, 2023 22:17
@glasnt glasnt marked this pull request as ready for review May 17, 2023 03:57
@glasnt glasnt requested a review from a team as a code owner May 17, 2023 03:57
Copy link
Contributor

@grayside grayside left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with comments. Thank you for continuing to push through on making multi-deploy per project work!


- id: init-all
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
args: ['/bin/bash', '-c', 'cft test run all --stage init --verbose']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Since both sections below have an init step, what is this init-all doing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, this was copied from https://github.com/GoogleCloudPlatform/terraform-google-secure-cicd/blob/main/build/int.cloudbuild.yaml#L31 as a presumed 'best practice' (note: only example I could find)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm chatting with tf blueprint maintainers around best practices here, tbd

service_account = google_service_account.client.email
containers {
image = local.client_image
env {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussion: At first I found this variable's presence on the Cloud Run Jobs mysterious, and wondered if we should have inline comments linking to usage. But I'm not sure we want to try maintaining a list like that to be comprehensive. This is one of those pieces that hand-off to future maintainers might lose track how to handle changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added links to the script usage, which might help, but happy to do more

@glasnt glasnt merged commit 8110284 into main Jun 4, 2023
@glasnt glasnt deleted the feat/multi-firebase branch June 4, 2023 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple deployments per project

2 participants