Hey, I am having a problem that might be related t...
# typescript
b
Hey, I am having a problem that might be related to the autonaming logic in https://github.com/pulumi/pulumi-google-native/pull/551. Since v0.21.0 of
@pulumi/google-native
I am getting the following change on a non-modified `artifactregistry/v1:Repository`:
Copy code
~ name: "projects/***/locations/us/repositories/my-repo-822c5d8" => "projects/***/locations/us/repositories/my-repo-5637933"
(only the ID changes). When I apply it I get the following error:
Copy code
google-native:artifactregistry/v1:Repository (***):
    error: error sending request: googleapi: Error 400: Repository mode cannot be changed: "<https://artifactregistry.googleapis.com/v1/projects/***/locations/us/repositories/my-repo>" map[format:DOCKER name:projects/***/locations/us/repositories/my-repo-ee37a82]
Now this does not make sense to me because according to the GCP docs this name should just be
projects/***/locations/us/repositories/my-repo
and not have any random ID suffix (also I am pretty sure its immutable). Seems like a bug to me but I just wanted to check in if I missed something?
p
https://www.pulumi.com/docs/intro/concepts/resources/names/#autonaming < you can normally use a name: to override the autonaming feature. I am not using pulumi and GCP so can't comment on the specifics but it seems like this is what you need.
b
In this case the
repositoryId
is the source for the "name" of this resource. Also, explicitly setting the name produces the same error 😕
To continue working, I just ignored it for now:
Copy code
{ ignoreChanges: ["name"] }