pulumi / pulumi-aws

An Amazon Web Services (AWS) Pulumi resource package, providing multi-language access to AWS
Apache License 2.0
466 stars 157 forks source link

AWS RDS cluster not able to update `enableHttpEndpoint` property #2926

Closed dennispan closed 2 months ago

dennispan commented 1 year ago

What happened?

  1. In a pulumi project, add pulumi_aws.rds.Cluster
  2. Set enable_http_endpoint property to True
  3. Run pulumi up
  4. Once RDS is created, run pulumi up again

Expected: No change is anticiated

Actual: pulumi preview says there is one update needed, which is to update enable_http_endpoint. If we check the resource status, enableHttpEndpoint is false but it should be true at this point

Example

cluster = rds.Cluster(
      resource_name=self._inputs["name"],
      cluster_identifier=self._inputs["name"],
     ......
      enable_http_endpoint=self._inputs["enable_http_endpoint"],
      ......
      opts=ResourceOptions(provider=self._provider),
  )

Output of pulumi about

CLI          
Version      3.78.1
Go Version   go1.20.7
Go Compiler  gc

Plugins
NAME    VERSION
aws     6.4.1
python  unknown

Host     
OS       darwin
Version  14.0
Arch     arm64

This project is written in python: executable='/Library/Frameworks/Python.framework/Versions/3.11/bin/python3' version='3.11.4
'

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/dennispanbot
User           [obscured]
Organizations  [obscured]

Dependencies:
NAME        VERSION
pip         23.2.1
pre-commit  3.4.0
pulumi-aws  6.4.1
ruff        0.0.292
wheel       0.41.2
yamllint    1.32.0

Pulumi locates its logs in /var/folders/d8/t7tynv650qjbvwvgzdf9k_vm0000gn/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).

VenelinMartinov commented 1 year ago

I believe RDS delays some parameter changes until the next maintenance window - this could be related.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html

dennispan commented 1 year ago

That might be it. I tried changing apply_immediately to True but still not working

mikhailshilkov commented 1 year ago

@dennispan To clarify - if you check your resource in AWS console, do you see the value as False?

Also, could you please provide a full code snippet that I could run to reproduce the issue? Thank you!

dennispan commented 1 year ago

Yes the http endpoint are actually enabled. The code snippet is basically what I shared in the issue description. Most other properties are set based on stack configuration. Happy to share more details via email if needed

mikhailshilkov commented 1 year ago

I think I can repro it with

const exampleCluster = new aws.rds.Cluster("exampleCluster", {
  clusterIdentifier: "example",
  engine: "aurora-postgresql",
  engineMode: "provisioned",
  engineVersion: "13.12",
  enableHttpEndpoint: true,
  databaseName: "test",
  masterUsername: "test",
  masterPassword: "must_be_eight_characters",
  serverlessv2ScalingConfiguration: {
      maxCapacity: 1,
      minCapacity: 0.5,
  },
});

then the state contains "enableHttpEndpoint": false in the outputs. I suspect it has to be an upstream bug but I haven't found an existing issue tracking it.

Yes the http endpoint are actually enabled

Ah, that's good to hear. What is the practical consequence of the issue for you then?

t0yv0 commented 2 months ago

This does not repro for me anymore and must have been fixed.

CLI          
Version      3.130.0
Go Version   go1.22.6
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  aws     6.52.0
resource  awsx    2.15.0
resource  docker  4.5.5
resource  docker  3.6.1
language  nodejs  unknown

Host     
OS       darwin
Version  14.6.1
Arch     arm64

This project is written in nodejs: executable='/Users/anton/bin/node' version='v18.18.2'

Current Stack: anton-pulumi-corp/pulumi-aws-2926/dev

TYPE                     URN
pulumi:pulumi:Stack      urn:pulumi:dev::pulumi-aws-2926::pulumi:pulumi:Stack::pulumi-aws-2926-dev
pulumi:providers:aws     urn:pulumi:dev::pulumi-aws-2926::pulumi:providers:aws::default_6_52_0
aws:rds/cluster:Cluster  urn:pulumi:dev::pulumi-aws-2926::aws:rds/cluster:Cluster::exampleCluster

Found no pending operations associated with dev

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

Dependencies:
NAME            VERSION
@pulumi/aws     6.52.0
@pulumi/awsx    2.15.0
@pulumi/pulumi  3.134.0
@types/node     18.19.50
typescript      5.6.2

Pulumi locates its logs in /var/folders/gd/3ncjb1lj5ljgk8xl5ssn_gvc0000gn/T/com.apple.shortcuts.mac-helper// by default