Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

operation UPDATE failed with "NotUpdatable" #1785

Open
corymhall opened this issue Oct 24, 2024 · 0 comments
Open

operation UPDATE failed with "NotUpdatable" #1785

corymhall opened this issue Oct 24, 2024 · 0 comments
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@corymhall
Copy link
Contributor

What happened?

The CCAPI schema supports conditionalCreateOnlyProperties which are

A list of JSON pointers for properties that can only be updated under certain conditions. For example, you can upgrade the engine version of an RDS DBInstance but you cannot downgrade it. When updating this property for a resource in a CloudFormation stack, the resource will be replaced if it cannot be updated.

For the Rule resource the EventBusName is one such property.

"conditionalCreateOnlyProperties" : [ "/properties/EventBusName" ]

It sounds like CloudFormation will automatically handle replacing if it can't be updated, but we will have to somehow handle it ourselves. The problem for us is that it doesn't look like we have a way of knowing in which scenarios it will be a replace so we can't tell the user whether it will be an update or a replace until we try it.

Example

First create it using the default event bus

const topic = new native.sns.Topic('topic');
const rule = new native.events.Rule('rule', {
  eventPattern: {
    source: ['custom.myATMapp'],
    detailType: ['transaction'],
    detail: {
      result: ['approved'],
    },
  },
  targets: [
    {
      id: 'target',
      arn: topic.topicArn,
    },
  ],
});

Then add in a user provided event bus

const topic = new native.sns.Topic('topic');
const eventBus = new native.events.EventBus('bus');
const rule = new native.events.Rule('rule', {
  eventBusName: eventBus.name,
  eventPattern: {
    source: ['custom.myATMapp'],
    detailType: ['transaction'],
    detail: {
      result: ['approved'],
    },
  },
  targets: [
    {
      id: 'target',
      arn: topic.topicArn,
    },
  ],
});

Output of pulumi about


CLI          
Version      3.130.0
Go Version   go1.22.6
Go Compiler  gc

Plugins
KIND      NAME             VERSION
resource  archive          0.0.6
resource  aws              6.52.0
resource  aws-native       0.108.4
resource  awsx             2.13.0
resource  docker           4.5.3
resource  docker           3.6.1
resource  lambda-builders  0.1.0
language  nodejs           unknown
resource  tls              5.0.4

Host     
OS       darwin
Version  15.0.1
Arch     arm64

This project is written in nodejs: executable='/Users/chall/.nvm/versions/node/v20.11.1/bin/node' version='v20.11.1'

Current Stack: chall-pulumi-corp/pulumi-typescript-app/dev

TYPE                         URN
pulumi:pulumi:Stack          urn:pulumi:dev::pulumi-typescript-app::pulumi:pulumi:Stack::pulumi-typescript-app-dev
pulumi:providers:aws-native  urn:pulumi:dev::pulumi-typescript-app::pulumi:providers:aws-native::default_0_108_4
aws-native:sns:Topic         urn:pulumi:dev::pulumi-typescript-app::aws-native:sns:Topic::topic
aws-native:events:EventBus   urn:pulumi:dev::pulumi-typescript-app::aws-native:events:EventBus::bus
aws-native:events:Rule       urn:pulumi:dev::pulumi-typescript-app::aws-native:events:Rule::rule


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/chall-pulumi-corp
User           chall-pulumi-corp
Organizations  chall-pulumi-corp, pulumi
Token type     personal

Dependencies:
NAME                                    VERSION
@aws-cdk/app-staging-synthesizer-alpha  2.149.0-alpha.0
@pulumi/archive                         0.0.6
@pulumi/aws                             6.52.0
@pulumi/aws-native                      0.108.4
@pulumi/awsx                            2.13.0
@pulumi/cdk                             0.5.0
@pulumi/lambda-builders                 0.1.0
@pulumi/pulumi                          3.127.0
@pulumi/tls                             5.0.4
aws-cdk-lib                             2.149.0
sst                                     3.0.13
tsx                                     4.16.2
@types/node                             20.12.7

Pulumi locates its logs in /var/folders/3b/6mr1jkqx7r797ff75k27jfjc0000gn/T/ by default

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

@corymhall corymhall added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 24, 2024
@flostadler flostadler removed the needs-triage Needs attention from the triage team label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants