anyone know how to create/enable artifact registry...
# google-cloud
t
anyone know how to create/enable artifact registry that automatically routes to artifact registry instead of "routed to container registry"? for some reason gcp is defaulting to container registry for newly enabled artifact registry despite the former being deprecated. i could elevate my privs and click the "Route to artifact registry" button on the website, but I'm hoping there's a way to do this within pulumi.
a
I've seen the same behavior earlier and don't have an answer for that. It's definitely a bit annoying, especially having to run the redirect manually
I would guess that it just enabled the registry api, and that does go by default to container registry I think
t
I enabled
<http://artifactregistry.googleapis.com|artifactregistry.googleapis.com>
and it defaults to "route to container registry". i ended up just granting myself the necessary privs and clicking the button on the website myself.
a
yeah, that's what I did too
it's not ideal, but it's minor toil in most cases
(and you can automate the iam privilege granting too)
t
yeah, it's minor, but it breaks the whole repeatable automation thing. there's now a manual task that needs be done between automation steps.
i don't understand why google is defaulting to container registry in the first place since it's deprecated.
a
It might be possible to just run enable-upgrade-redirection directly using gcloud?
I'm not sure about the migration bit though, but there should be a call for that from gcloud or api too
t
i was also able to replicate the issue by creating a project and manually creating the artifact registry.
just google being google i guess.
a
from having worked in google cloud... that would not surprise me.
so artifact registry api has legacyRedirectionState in the project ressource that can be changed.
this can be changed with the google-native plugin
so technically you can enable the redirection so it uses artifact registry using that call I think
t
of course it has to be the other gcp plugin.
a
yep
the other one is more basic, but it tends to mirror the apis well
t
sometimes i wish i'd stuck with terraform.
thanks for the info. at least now i know
a
I've had that thought... but then I write down 2 modules, rage about variables and return to pulumi
t
can you mix providers? is that a thing?
a
you can I guess, but it'll mean getting again the objects