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

BucketV2.get() refresh shows diff #4258

Closed
corymhall opened this issue Jul 18, 2024 · 1 comment
Closed

BucketV2.get() refresh shows diff #4258

corymhall opened this issue Jul 18, 2024 · 1 comment
Assignees
Labels
area/refresh kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed service/s3 S3-related things (buckets, objects)

Comments

@corymhall
Copy link
Contributor

Describe what happened

  1. pulumi up --yes
  2. pulumi refresh --diff

You will see a diff on forceDestroy

 pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::pulumi-typescript-app::pulumi:pulumi:Stack::pulumi-typescript-app-dev]
    ~ aws:s3/bucketV2:BucketV2: (update)
        [id=chall-bucket-3ece948]
        [urn=urn:pulumi:dev::pulumi-typescript-app::aws:s3/bucketV2:BucketV2::chall-get-bucket]
        [provider=urn:pulumi:dev::pulumi-typescript-app::pulumi:providers:aws::aws::1c97ed26-b803-4ccf-b2e1-1ec639411ccc]
    
      + forceDestroy                      : false
Resources:
    ~ 1 to update
    3 unchanged

Sample program

import * as aws from '@pulumi/aws';

const provider = new aws.Provider('aws', {});

const bucket = new aws.s3.BucketV2('bucket', {}, { provider });

const bucketGet = aws.s3.BucketV2.get(
  'get-bucket',
  bucket.id,
  undefined,
  {
    provider,
  },
);

Log output

Below is the Read method. Interestingly there are no logs for Diff.

{
  "method": "/pulumirpc.ResourceProvider/Read",
  "request": {
    "id": "chall-bucket-3ece948",
    "urn": "urn:pulumi:dev::pulumi-typescript-app::aws:s3/bucketV2:BucketV2::chall-get-bucket",
    "properties": {
      "__meta": "{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":1200000000000,\"delete\":3600000000000,\"read\":1200000000000,\"update\":1200000000000}}",
      "accelerationStatus": "",
      "arn": "arn:aws:s3:::chall-bucket-3ece948",
      "bucket": "chall-bucket-3ece948",
      "bucketDomainName": "chall-bucket-3ece948.s3.amazonaws.com",
      "bucketPrefix": "",
      "bucketRegionalDomainName": "chall-bucket-3ece948.s3.us-east-2.amazonaws.com",
      "corsRules": [],
      "grants": [
        {
          "id": "e07865a5679c7977370948f1f1e51c21b12d8cfdd396a7e3172275d9164e01b8",
          "permissions": [
            "FULL_CONTROL"
          ],
          "type": "CanonicalUser",
          "uri": ""
        }
      ],
      "hostedZoneId": "Z2O1EMRO9K5GLX",
      "id": "chall-bucket-3ece948",
      "lifecycleRules": [],
      "loggings": [],
      "objectLockConfiguration": null,
      "objectLockEnabled": false,
      "policy": "",
      "region": "us-east-2",
      "replicationConfigurations": [],
      "requestPayer": "BucketOwner",
      "serverSideEncryptionConfigurations": [
        {
          "rules": [
            {
              "applyServerSideEncryptionByDefaults": [
                {
                  "kmsMasterKeyId": "",
                  "sseAlgorithm": "AES256"
                }
              ],
              "bucketKeyEnabled": false
            }
          ]
        }
      ],
      "tags": {},
      "tagsAll": {},
      "versionings": [
        {
          "enabled": false,
          "mfaDelete": false
        }
      ],
      "websites": []
    },
    "inputs": {}
  },
  "response": {
    "id": "chall-bucket-3ece948",
    "properties": {
      "__meta": "{\"e2bfb730-ecaa-11e6-8f88-34363bc7c4c0\":{\"create\":1200000000000,\"delete\":3600000000000,\"read\":1200000000000,\"update\":1200000000000}}",
      "accelerationStatus": "",
      "arn": "arn:aws:s3:::chall-bucket-3ece948",
      "bucket": "chall-bucket-3ece948",
      "bucketDomainName": "chall-bucket-3ece948.s3.amazonaws.com",
      "bucketPrefix": "",
      "bucketRegionalDomainName": "chall-bucket-3ece948.s3.us-east-2.amazonaws.com",
      "corsRules": [],
      "forceDestroy": false,
      "grants": [
        {
          "id": "e07865a5679c7977370948f1f1e51c21b12d8cfdd396a7e3172275d9164e01b8",
          "permissions": [
            "FULL_CONTROL"
          ],
          "type": "CanonicalUser",
          "uri": ""
        }
      ],
      "hostedZoneId": "Z2O1EMRO9K5GLX",
      "id": "chall-bucket-3ece948",
      "lifecycleRules": [],
      "loggings": [],
      "objectLockConfiguration": null,
      "objectLockEnabled": false,
      "policy": "",
      "region": "us-east-2",
      "replicationConfigurations": [],
      "requestPayer": "BucketOwner",
      "serverSideEncryptionConfigurations": [
        {
          "rules": [
            {
              "applyServerSideEncryptionByDefaults": [
                {
                  "kmsMasterKeyId": "",
                  "sseAlgorithm": "AES256"
                }
              ],
              "bucketKeyEnabled": false
            }
          ]
        }
      ],
      "tags": {},
      "tagsAll": {},
      "versionings": [
        {
          "enabled": false,
          "mfaDelete": false
        }
      ],
      "websites": []
    },
    "inputs": {}
  },
  "metadata": {
    "kind": "resource",
    "mode": "client",
    "name": "aws"
  }
}

Affected Resource(s)

  • BucketV2
  • Bucket

Output of pulumi about

CLI          
Version      3.124.0
Go Version   go1.22.5
Go Compiler  gc

Plugins
KIND      NAME             VERSION
resource  archive          0.0.6
resource  aws              6.45.0
resource  aws              6.43.0
language  nodejs           unknown
resource  tls              5.0.4

Host     
OS       darwin
Version  14.5
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: corymhall/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      urn:pulumi:dev::pulumi-typescript-app::pulumi:providers:aws::aws
aws:s3/bucketV2:BucketV2  urn:pulumi:dev::pulumi-typescript-app::aws:s3/bucketV2:BucketV2::chall-bucket
aws:s3/bucketV2:BucketV2  urn:pulumi:dev::pulumi-typescript-app::aws:s3/bucketV2:BucketV2::chall-get-bucket


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/corymhall
User           corymhall
Organizations  corymhall
Token type     personal

Dependencies:
NAME                                    VERSION
@aws-cdk/app-staging-synthesizer-alpha  2.149.0-alpha.0
@pulumi/aws                             6.43.0
@pulumi/pulumi                          3.124.0
@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 area/refresh and removed needs-triage Needs attention from the triage team labels Jul 18, 2024
@t0yv0 t0yv0 added the service/s3 S3-related things (buckets, objects) label Jul 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 Author

This has been fixed, I can no longer reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/refresh kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed service/s3 S3-related things (buckets, objects)
Projects
None yet
Development

No branches or pull requests

2 participants