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

DynamoDb replicas field always shows update #1653

Closed
dmattia opened this issue Oct 7, 2021 · 1 comment
Closed

DynamoDb replicas field always shows update #1653

dmattia opened this issue Oct 7, 2021 · 1 comment
Assignees
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@dmattia
Copy link

dmattia commented Oct 7, 2021

Hello!

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

Issue details

I had a DynamoDb table that I managed using another service that I wanted to import into Pulumi. Using the import opt, I could find the resource, but it told me that the replica configuration had a diff, as shown in this image:

Screen Shot 2021-10-07 at 9 23 27 AM

I was able to eventually import by adding ignoreChanges: ['replicas'], but now each pulumi up shows the same diff from that image unless I leave in the ignoreChanges block, even though as far as I can tell nothing should change.

Steps to reproduce

  1. Create a DynamoDb table with read replicas in the AWS console
  2. Create a pulumi resource that matches it exactly (steps 1 and 2 can be done easily by creating the table in pulumi, then deleting the table from state)
  3. Import the table into the resource
  4. run pulumi up

Expected: No changes would appear in the diff
Actual: The replicas field shows a diff

@dmattia dmattia added the kind/bug Some behavior is incorrect or out of spec label Oct 7, 2021
@leezen leezen added the impact/usability Something that impacts users' ability to use the product easily and intuitively label Oct 12, 2021
@mikhailshilkov mikhailshilkov added the resolution/fixed This issue was fixed label Oct 31, 2023
@mikhailshilkov
Copy link
Member

I tried reproducing this issue today but failed to do so. My steps:

  1. Create a global table with two replicas. I used this program:
import * as aws from "@pulumi/aws";

const example = new aws.dynamodb.Table("example", {
    attributes: [{
        name: "TestTableHashKey",
        type: "S",
    }],
    billingMode: "PAY_PER_REQUEST",
    hashKey: "TestTableHashKey",
    replicas: [
        {
            regionName: "us-east-2",
        },
        {
            regionName: "us-west-2",
        },
    ],
    streamEnabled: true,
    streamViewType: "NEW_AND_OLD_IMAGES",
});
  1. Deployed the above from stack A.
  2. Imported the same resource in stack B.
  3. Pasted the generated program
import * as aws from "@pulumi/aws";

const example = new aws.dynamodb.Table("example", {
    attributes: [{
        name: "TestTableHashKey",
        type: "S",
    }],
    billingMode: "PAY_PER_REQUEST",
    hashKey: "TestTableHashKey",
    name: "example-1904f44",
    pointInTimeRecovery: {
        enabled: false,
    },
    replicas: [
        {
            regionName: "us-west-2",
        },
        {
            regionName: "us-east-2",
        },
    ],
    streamEnabled: true,
    streamViewType: "NEW_AND_OLD_IMAGES",
    ttl: {
        attributeName: "",
    },
}, {
    protect: true,
});
  1. Ran pulumi up and received no diff.

I'll assume the issue has been fixed since 2021.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively 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

3 participants