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

RDS | EnabledCloudwatchLogsExports Reorder #1065

Closed
jkrusic19 opened this issue Aug 10, 2020 · 4 comments
Closed

RDS | EnabledCloudwatchLogsExports Reorder #1065

jkrusic19 opened this issue Aug 10, 2020 · 4 comments
Assignees
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@jkrusic19
Copy link

jkrusic19 commented Aug 10, 2020

Hello,

Summary of issue:
When using the AWS Provider for RDS in C# if I specify EnabledCloudwatchLogExports in the List it requires. It creates the resources as expected initially. Any subsequent pulumi up causes an (update) on the resource even with no changes.

Code Sample:

var rdsCluster = new RDS.Cluster(
                $"{rdsargs.environment}-{rdsargs.application}-{rdsargs.service}-rds-cluster", new RDS.ClusterArgs()
            {
                ApplyImmediately = rdsargs.DatabaseChangeApplyImmediate,
                DatabaseName = rdsargs.DatabaseName,
                ClusterIdentifierPrefix = $"{rdsargs.environment}-{rdsargs.application}-{rdsargs.service}",
                DbClusterParameterGroupName = ClusterParameterGroup.Name,
                DbSubnetGroupName = ClusterDBSubnetGroup.Name,
                EnabledCloudwatchLogsExports =
                {
                    "audit",
                    "error",
                    "slowquery",
                    "general"
                },
                MasterUsername = "admin",
                MasterPassword = new Random.RandomPassword($"{rdsargs.environment}-{rdsargs.application}-{rdsargs.service}-rds-passwd", new Random.RandomPasswordArgs()
                {
                    Length = 16,
                    Special = true,
                    OverrideSpecial = "_%@"
                }).Result,
                Engine = dbFamily,
                EngineVersion = dbengine[1],
                IamRoles =
                {
                  rdsargs.DatabaseRoleArn  
                },
                PreferredBackupWindow = "21:00-01:45",
                PreferredMaintenanceWindow = "Mon:02:00-Mon:04:15",
                StorageEncrypted = true,
                VpcSecurityGroupIds =
                {
                    rdsSg.Id
                }
            });


Output of Diff after initial deployment of resource, so second pulumi up:

~ aws:rds/cluster:Cluster: (update)
        [id=sandbox-eclipse-firm20200807145700776800000001]
        [urn=urn:pulumi:sandbox::test::aws:rds/cluster:Cluster::sandbox-test-me-rds-cluster]
        [provider=urn:pulumi:sandbox::eclipse::pulumi:providers:aws::default_2_11_0::142bd0f8-dac1-4460-9078-cb0b8a5b8ead]
      ~ enabledCloudwatchLogsExports: [
            [0]: <null>
            [1]: <null>
          **_~ [2]: "general" => "slowquery"
          ~ [3]: "slowquery" => "general"**
		 
+-aws:rds/clusterInstance:ClusterInstance: (replace) - **This is actually false, there is no replacement at all it just updates the LogExports.**
        [id=tf-20200807145745967200000003]
        [urn=urn:pulumi:sandbox::test::aws:rds/clusterInstance:ClusterInstance::sandbox-test-me-db-instance-2]
        [provider=urn:pulumi:sandbox::test::pulumi:providers:aws::default_2_11_0::142bd0f8-dac1-4460-9078-cb0b8a5b8ead]
      ~ clusterIdentifier: "sandbox-test-me20200807145700776800000001" => output<string>

Expect:
Upon pulumi up I expect zero changes to occur.

@lukehoban
Copy link
Contributor

Out of curiosity, if you change the order in your program, does that prevent the diff from being reported? It appears that the underlying provider is expecting these to be in alphabetical order perhaps? We’ll need to look deeper to understand whether there’s an issue in the cloud provider, in the upstream provider, or in pulumi’s mapping of this.

@jkrusic19
Copy link
Author

jkrusic19 commented Aug 10, 2020

@lukehoban looks like you are correct, something is expecting alphabetical order. When place structured as the following, no updates are required.

EnabledCloudwatchLogsExports = { "audit", "error", "general", "slowquery" }

@lukehoban lukehoban added kind/enhancement Improvements or new features awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). labels Nov 19, 2022
@iwahbe iwahbe added bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. kind/bug Some behavior is incorrect or out of spec and removed awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/enhancement Improvements or new features labels Jul 18, 2023
@iwahbe
Copy link
Member

iwahbe commented Jul 18, 2023

EnabledCloudwatchLogsExports is a set in the underlying provider. I expect that is the source of the bug.

@t0yv0 t0yv0 self-assigned this Mar 28, 2024
@t0yv0 t0yv0 added this to the 0.103 milestone Mar 28, 2024
@t0yv0 t0yv0 added the impact/reliability Something that feels unreliable or flaky label Mar 28, 2024
@mjeffryes mjeffryes assigned rquitales and unassigned rquitales May 20, 2024
@mikhailshilkov mikhailshilkov removed this from the 0.103 milestone Jun 5, 2024
@t0yv0 t0yv0 added the awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. label Oct 23, 2024
@corymhall corymhall added the resolution/fixed This issue was fixed label Jan 16, 2025
@corymhall corymhall self-assigned this Jan 16, 2025
@corymhall
Copy link
Contributor

Just tested this out today and I can no longer reproduce. Looks like the issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting/bridge The issue cannot be resolved without action in pulumi-terraform-bridge. bug/diff kind/bug related to Pulumi generating wrong diffs on preview or up. impact/reliability Something that feels unreliable or flaky kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

7 participants