pulumi / pulumi-pulumiservice

https://pulumi.com
Apache License 2.0
13 stars 7 forks source link

Environment `project` not wired through on `TeamEventPermission` #429

Closed ringods closed 3 weeks ago

ringods commented 4 weeks ago

What happened?

The TeamEventPermission resource contains a project input property:

https://github.com/pulumi/pulumi-pulumiservice/blob/3633bde0fa144e49666474c28e7dbc18a9a3be49/provider/cmd/pulumi-resource-pulumiservice/schema.json#L1486-L1490

While this property is generated in the language SDKs, it is not wired through in the implementation:

https://github.com/pulumi/pulumi-pulumiservice/blob/3633bde0fa144e49666474c28e7dbc18a9a3be49/provider/pkg/provider/team_environment_perm.go#L21-L26

Using this resource with a non-default ESC project results in:

failed to add permission read for environment test-public to team devops-public due to error: 404 API error: Not Found: Environment 'default/test-public' not found

Example

data = pulumi.Output.from_input(
    {
        'values': {
            'root': {
                'cloud-config': {
                    pulumi.get_stack(): {
                        'foo': 'bar',
                    }
                },
            },
        },
    }
).apply(lambda x: pulumi.StringAsset(yaml.safe_dump(x)))

esc_env = Environment(
    'public',
    organization=pulumi.get_organization(),
    project=pulumi.get_project(),
    name=f'{pulumi.get_stack()}-public',
    yaml=data,
)

TeamEnvironmentPermission(
    'public',
    environment=esc_env.name,
    organization=esc_env.organization,
    project=esc_env.project,
    permission=EnvironmentPermission.READ,
    team='devops-public',
)

Output of pulumi about

CLI          
Version      3.137.0
Go Version   go1.23.2
Go Compiler  gc

Plugins
KIND      NAME           VERSION
resource  aws            6.56.1
resource  kubernetes     4.18.2
resource  pulumiservice  0.26.3
language  python         unknown
resource  random         4.16.7

Host     
OS       darwin
Version  14.5
Arch     arm64

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).

IaroslavTitov commented 3 weeks ago

Fixed in https://github.com/pulumi/pulumi-pulumiservice/pull/430, but not deployed yet

pulumi-bot commented 3 weeks ago

This PR has been shipped in release v0.26.5.

IaroslavTitov commented 3 weeks ago

Shipped, resolving