sparse-intern-71089
01/17/2024, 3:24 PMadorable-house-61348
01/18/2024, 5:55 PMquiet-gpu-97093
01/19/2024, 8:51 AMaws sns create-topic --name budget_exceeded_topic --tags Key=CLI,Value=True
), then I get this error message that stops the creation: An error occurred (InvalidParameter) when calling the CreateTopic operation: Invalid parameter: Tags Reason: Topic already exists with different tags
. In the case of Pulumi, it still somehow takes over the existing topic and updates it with its specified config.adorable-house-61348
01/19/2024, 10:31 AMimport pulumi
import pulumi_aws as aws
topic = aws.sns.Topic(
"topic", aws.sns.TopicArgs(name="my-topic-vvm", tags={"tag1": "val"})
)
if pulumi.config.Config().get("change_tags"):
topic_with_different_tags = aws.sns.Topic(
"topic_with_different_tags",
aws.sns.TopicArgs(name="my-topic-vvm", tags={"tag1": "val2"}),
)
The steps to repro are:
1. pulumi up
2. pulumi config set change_tags true
3. pulumi up
If you can reproduce the behaviour with the silent failure, I'd be very grateful if you can raise an issue with that!
Edit: my repro is in Python but feel free to use whatever language you prefer!adorable-house-61348
01/19/2024, 10:34 AMquiet-gpu-97093
01/19/2024, 11:11 AMadorable-house-61348
01/19/2024, 11:12 AMquiet-gpu-97093
01/19/2024, 11:14 AMadorable-house-61348
01/19/2024, 11:15 AMadorable-house-61348
01/19/2024, 11:15 AMadorable-house-61348
01/19/2024, 11:16 AMquiet-gpu-97093
01/19/2024, 3:15 PMadorable-house-61348
01/19/2024, 3:21 PMDuring some program executions, apply doesn't run. For example, it won't run during a preview, when resource output values may be unknown. Therefore, you should avoid side-effects within the callbacks. For this reason, you should not allocate new resources inside of your callbacks either, as it could lead to pulumi preview being wrong.
adorable-house-61348
01/19/2024, 3:22 PM