This message was deleted.
# general
s
This message was deleted.
q
I'm hoping there's something clever in here: https://www.pulumi.com/docs/intro/concepts/resources/options/ maybe import?
f
Import is likely what you need
q
thanks, Andy. Now to figure out how to extract the resource's ID
Unless the docs are saying to invent one when importing
f
If you want to get really fancy, you can actually write code to look up the resource and then import it if it exists
Pulumi providers usually Have functions to do the look up of existing resources
q
I was doing something like that to look up existing services and spin up short-lived versions for testing PRs. So I think I know what you mean.
Looks like I was just confused by the AWS example in the docs. Experimentation shows me they want something like
'locations/{region}/namespaces/{project}/services/{service-name}')
Just the usual "where is your service?"
f
Yeah, that looks about right. The provider docs for the resource usually have import examples, but the GCP ones are often odd, as you're probably familiar with
q
Bit painful to get all the inputs matching exactly, too. For example, the names don't match for the secrets I was mounting as volumes via Cloud Build. Still, glad to know what it would take.
👍 1