This translates to a resource replacement in the Pulumi provider. The default implementation of a replace by Pulumi is to create the new resource first before the delete is executed.
Conceptually, given a repository and a username, you can't create a RepositoryCollaborator twice with different permissions. I think this resource should be marked deleteBeforeReplace by default.
Sample program
Pulumi program to manage the pulumiverse Github organization:
CLI
Version 3.118.0
Go Version go1.22.3
Go Compiler gc
Plugins
KIND NAME VERSION
resource github 5.26.0
language nodejs unknown
Host
OS ubuntu
Version 22.04
Arch x86_64
This project is written in nodejs: executable='/usr/bin/node' version='v18.17.1'
Current Stack: pulumiverse/infra/prod
<stripped the resource list>
Backend
Name pulumi.com
URL https://app.pulumi.com/tmeckel
User tmeckel
Organizations tmeckel, ophios, pulumiverse, puluminaries
Token type personal
Dependencies:
NAME VERSION
@pulumi/github 5.26.0
@pulumi/pulumi 3.116.0
@tsconfig/node16 16.1.3
typescript 4.9.5
yaml 2.4.3
@bjerk/eslint-config 6.0.2
@simenandre/prettier 5.0.0
@types/node 18.19.33
runtypes 6.7.0
Pulumi locates its logs in /tmp by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
Describe what happened
The TF resource
github_repository_collaborator
hasForceNew: true
for these 3 properties:username
repository
permission
This translates to a resource replacement in the Pulumi provider. The default implementation of a replace by Pulumi is to create the new resource first before the delete is executed.
Conceptually, given a
repository
and ausername
, you can't create aRepositoryCollaborator
twice with different permissions. I think this resource should be markeddeleteBeforeReplace
by default.Sample program
Pulumi program to manage the
pulumiverse
Github organization:https://github.com/pulumiverse/infra
Log output
Affected Resource(s)
github.RepositoryCollaborator
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).