Open druskus20 opened 2 months ago
Key @druskus20, I'm sorry you're running into this! I was able to reproduce it and started investigating how to fix this. We'll need to filter out the AWS system tags when doing the updates.
Wow I didn't expect this quick reply. Yeah indeed my idea of a fix would be to filter out the aws tags
@druskus20 While digging deeper into this, I noticed that the AWS reserved tags are not included in the request on the Pulumi side. It's actually AWS CloudControl that's wrongly including those in the request to the downstream service.
I opened an issue on their end to track this: https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/2128
In the meantime, you could perform updates to the tags of this resource by replacing it on tag changes. You can do this by using the replaceOnChanges
resource option like so:
const application = new aws.servicecatalogappregistry.Application("repro", {
tags: {
name_extra: 'pulumi-test',
additional: 'new-val'
}
}, {replaceOnChanges: ['tags']});
Oh wow. Thank you so much, that is exactly what I am currently doing 👍
What happened?
I believe I have encountered a bug while working with Pulumi's AWS-native provider, specifically in the
@pulumi/aws-native/servicecatalogappregistry
module.The bug
The bug manifests in the following scenario:
pulumi up
, everything works as expected. The application is created with the correct tags:If I subsequently modify a tag and apply the changes with pulumi up, I encounter the following error:
**updating failed** [diff: ~tags]; 1 error
aws: prefixed tag key names are not allowed for external use.
Example
The following code is used to create the application:
Output of
pulumi about
Additional context
Possible explanation
The AWS Application automatically gets a
aws:servicecatalog:applicationName: pulumi-test
tag on creationIt seems that when applying a tag update, Pulumi includes an AWS-managed tag key, such as aws:servicecatalog:applicationName: pulumi-test, in the request. This results in the error message:
aws: prefixed tag key names are not allowed for external use.
I am using a simple wrapper around the Application class to add custom tags to an AWS Application.
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).