You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the code provided below and executing the following steps causes one to get stuck:
pulumi up
see stack tag
pulumi destroy
see stack tag is still there due to retainOnDelete option
pulumi up
Get 400 error about trying to create a tag that is already there.
Since there is no way to delete a stack tag in the UI, one is stuck - short of using the API to delete the tag.
import * as pulumi from "@pulumi/pulumi";
import * as pCloud from "@pulumi/pulumiservice"
const stackTag = new pCloud.StackTag("my-stack-tag", {
organization: pulumi.getOrganization(),
project: pulumi.getProject(),
stack: pulumi.getStack(),
name: "stacktag",
value: "stacktagvalue"
}, {retainOnDelete: true})
Example
See above
Output of pulumi about
CLI
Version 3.128.0
Go Version go1.22.5
Go Compiler gc
Plugins
KIND NAME VERSION
language nodejs unknown
resource pulumiservice 0.23.2
Host
OS darwin
Version 13.6.9
Arch x86_64
Backend
Name pulumi.com
Dependencies:
NAME VERSION
@pulumi/pulumi 3.129.0
@pulumi/pulumiservice 0.23.2
@types/node 18.19.45
typescript 5.5.4
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).
The text was updated successfully, but these errors were encountered:
The use case is I have a stack that configures the stack tag for itself.
The stack is then destroyed, but I want to keep the stack tag on the destroyed stack - and so use the retainOnDelete option.
And, then, later, I run pulumi up to rebuild the stack and I can't because the API is upset about the tag already existing.
So I would prefer that the API accept the request to (re)create the tag even if it already exists.
This is consistent with other pulumi service resources like deployment settings.
Importing and deleting is not really a viable option here given the use-case since the stack may be destroyed and upped multiple times - say due to a schedule that destroys at night and deploys in the morning.
Unfortunately, I don't think this is possible currently. This sounds like an instance of pulumi/pulumi#3388. Since the tag and value itself is the uniquely identifying property of the StackTag, there is no support in pulumi for this behavior today (but perhaps soon).
What happened?
Using the code provided below and executing the following steps causes one to get stuck:
pulumi up
pulumi destroy
retainOnDelete
optionpulumi up
Example
See above
Output of
pulumi about
CLI
Version 3.128.0
Go Version go1.22.5
Go Compiler gc
Plugins
KIND NAME VERSION
language nodejs unknown
resource pulumiservice 0.23.2
Host
OS darwin
Version 13.6.9
Arch x86_64
Backend
Name pulumi.com
Dependencies:
NAME VERSION
@pulumi/pulumi 3.129.0
@pulumi/pulumiservice 0.23.2
@types/node 18.19.45
typescript 5.5.4
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).
The text was updated successfully, but these errors were encountered: