Hello there :wave: I guess I’ll kick off conversa...
# google-cloud
p
Hello there 👋 I guess I’ll kick off conversations around the GCP provider with the first question. Are there any plans to support remote Docker image builds with Pulumi using Google Cloud Build? (i.e.,
gcloud builds submit
) Something like this could help increase speed CI/CD pipelines by building images with GCP instead of locally.
s
Isn’t
gcp.cloudbuild
what you’re looking for? https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/gcp/cloudbuild/
p
It seems that
gcp.couldbuild
lets you define triggers for running different builds. It does not let you declare a single build like you would be able to do with
gcloud build submit
though.
For example, being able to do something like this:
Copy code
import * as gcp from '@pulumi/gcp'
import * as docker from '@pulumi/docker'

const build = new gcp.cloudbuild.Build({
  source: '.',
  config: './cloudbuild.yaml',
})

const images = build.images.map(buildImage => new docker.RemoteImage('app', { name: buildImage.name }))
If
pulumi up
results in a very large amount of Docker images being built it might be prohibitive to build them all locally. This way, the builds can all happen in GCP.
s
Hmm, right. Good point.
p
Here’s how the workflow goes using
gcloud
https://cloud.google.com/cloud-build/docs/quickstart-docker
w
I suspect this would be reasonably easy to just open-code against the GCP SDK from within your JS - kind of similar to how the current
docker.Image
is implemented as just shelling out to
docker build
locally. For a slightly more advanced version, dynamic providers assets could be used to ensure that the build gets "replaced" (regenerated) on any diffs to the source or config. https://www.pulumi.com/docs/intro/concepts/programming-model/#dynamicproviders
p
@white-balloon-205, that’s good to know. I’ll take a look at the
docker.Image
source and see if I can take a stab at it. In the topic of dynamic providers, how open are you guys on embracing community dynamic providers and are there any existing lists?
It might be better to have this conversation in a different thread but we’re already thinking of leveraging dynamic providers to use Pulumi to manage things like Auth0 clients and APIs as well as Stripe Billing plans among other resources
w
Note that
docker.Image
itself is a bit more complex than it really needs to be - I expect you can do what you want here in a dozen-ish lines of JS code.
👍 1
custom providers to use Pulumi to manage things like Auth0 clients and APIs as well as Stripe Billing plans among other resources
Yes - the easiest way to get started with these sorts of things tends to be dynamic providers -though I think both of these are things we've looked at adding first class providers for as well.
p
That’s good to hear! We’re planning on implementing some of those dynamic providers for ourselves. Happy to build those in the open/contribute in GitHub if y’all have a repo/org for dynamic providers like that.
w
We don’t yet - but if you build them in public repos, we’re definitely happy to work with you on a plan for if/when/how to migrate into shared packages/projects and/or promote from Pulumi docs.
👍 1