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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error modifying s3 bucket tags #230

Closed
fujiapple852 opened this issue Nov 17, 2021 · 3 comments 路 Fixed by #232
Closed

Error modifying s3 bucket tags #230

fujiapple852 opened this issue Nov 17, 2021 · 3 comments 路 Fixed by #232
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@fujiapple852
Copy link

fujiapple852 commented Nov 17, 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

Modifying the tags of an S3 bucket results in a CloudControl ValidationException:

ValidationException: Model validation failed (#/Tags: expected type: JSONArray, found: String)

Steps to reproduce

Pulumi version: v3.17.1
Pulumi AWS Native version: 0.5.0

  1. Create a new S3 bucket with a single tag:
import pulumi_aws_native as aws_native
tags = [aws_native.s3.BucketTagArgs(key="foo", value="bar")]
bucket = aws_native.s3.Bucket(resource_name="my-bucket", tags=tags)
  1. Run pulumi up and observe that the tag is created as expected:
     Type                     Name       Status
     pulumi:pulumi:Stack      pulum-dev
 +   鈹斺攢 aws-native:s3:Bucket  my-bucket  created
  1. Modify the tag (changed bar to be bar2):
import pulumi_aws_native as aws_native
tags = [aws_native.s3.BucketTagArgs(key="foo", value="bar2")]
bucket = aws_native.s3.Bucket(resource_name="my-bucket", tags=tags)
  1. Run pulumi up and observe a failure:
     Type                     Name       Status                  Info
     pulumi:pulumi:Stack      pulum-dev  **failed**              1 error
 ~   鈹斺攢 aws-native:s3:Bucket  my-bucket  **updating failed**     [diff: ~tags]; 1 error

Diagnostics:
  aws-native:s3:Bucket (my-bucket):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: de811b93-3d5c-4ddd-aaf3-50d8efae9e63, api error ValidationException: Model validation failed (#/Tags: expected type: JSONArray, found: String)

Output of pulumi preview --diff:

  pulumi:pulumi:Stack: (same)
    [urn=urn:pulumi:dev::pulum::pulumi:pulumi:Stack::pulum-dev]
    ~ aws-native:s3:Bucket: (update)
        [id=my-bucket-598531a]
        [urn=urn:pulumi:dev::pulum::aws-native:s3:Bucket::my-bucket]
        [provider=urn:pulumi:dev::pulum::pulumi:providers:aws-native::default_0_5_0::17021c9a-ceba-4ab9-8ab2-a64da867f91b]
        bucketName: "my-bucket-598531a"
      ~ tags      : [
          ~ [0]: {
                    key  : "foo"
                  ~ value: "bar" => "bar2"
                }
        ]
Resources:
    ~ 1 to update
    1 unchanged
@fujiapple852 fujiapple852 added the kind/bug Some behavior is incorrect or out of spec label Nov 17, 2021
@mikhailshilkov mikhailshilkov self-assigned this Nov 17, 2021
@mikhailshilkov mikhailshilkov added this to the 0.65 milestone Nov 17, 2021
@Mdrbhatti
Copy link

Mdrbhatti commented Nov 17, 2021

I'm getting the same ValidationException when trying to update the buffer_interval of an existing Kinesis Firehose Delivery Stream. See the relevant code snippet here: https://gist.github.com/Mdrbhatti/8e623698812acc8effc7cc4526cafa70

pulumi preview --diff

~ aws-native:kinesisfirehose:DeliveryStream: (update)
            [id=xxxxx]
            [urn=xxxxx]
            [provider=urn:pulumi:xxxxxx::pulumi:providers:aws-native::default_0_5_0::b359ebc0-7ae8-4480-b00a-5d54bfdde89b]
          ~ extendedS3DestinationConfiguration: {
              ~ bufferingHints                  : {
                  ~ intervalInSeconds: 70 => 60
                }
            }

pulumi up

    error: update failed
 
  aws-native:kinesisfirehose:DeliveryStream (xxxxx):
    error: operation error CloudControl: UpdateResource, https response error StatusCode: 400, RequestID: xxxxxxxx, api error ValidationException: Model validation failed (#/ExtendedS3DestinationConfiguration: expected type: JSONObject, found: String)

@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Nov 18, 2021
@mikhailshilkov
Copy link
Member

@Mdrbhatti @fujiapple852 Could you give 0.6.0 a try?

@Mdrbhatti
Copy link

@mikhailshilkov 0.6.0 works fine for me now. Thank you for the quick fix!

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 resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants