Open seaerchin opened 2 weeks ago
Thanks for reporting this. I believe this is an issue with the GitHub provider. I'll move the issue over to that repo.
Hi @seaerchin. Thanks for reporting this problem. I'll take a look at reproducing the issue and get back to you. As a work-around, have you tried manually adding role: "member"
to each membership?
Yeap @iwahbe, I examined pulumi's internal state and realised it got imported with member. Updated the code and it fixed the issue
Hey @seaerchin. I'm glad you have a work-around.
Hey @seaerchin, what version of pulumi-github are you using? I just tried to repo on pulumi-github@v6.2.1, with pulumi at v3.119.0 and the output I got was:
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const some_team = new github.TeamMembers("some_team", {
members: [
{
role: "member",
username: "PulumiTestUser02",
},
{
role: "maintainer",
username: "PulumiTestUser01",
},
],
teamId: "123",
}, {
protect: true,
});
Copying the code into my program works works as expected: pulumi preview
shows no changes.
What happened?
import
of existing github team members causes therole
key to be omitted for members of the github team. this leads to erroneous code output for theimport
command, where the code snippet to be placed in code omits therole
key.Example
role: member
.pulumi import github:index/teamMembers:TeamMembers <team name> <team_id>
Sample output attached below
Output of
pulumi about
Additional context
the output should have
role: member
, as the updatedpulumi state
has that set. this causes the nextpulumi up
with the output above to delete and recreate the team member resource.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).