https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
general
  • b

    busy-umbrella-36067

    10/30/2018, 4:05 PM
    running into some issues with iam roles. preview and update break with that error, destroy and refresh work though
  • b

    busy-umbrella-36067

    10/30/2018, 4:05 PM
    panic: interface conversion: interface {} is map[string]interface {}, not string
        goroutine 138 [running]:
        <http://github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.newAWSStringSet(0x28a5f80|github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.newAWSStringSet(0x28a5f80>, 0xc420615a60, 0xc420615e00, 0x2, 0x2)
        	/home/travis/gopath/src/github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go:386 +0x328
        <http://github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.(*awsPolicyStatement).equals(0xc420959c20|github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.(*awsPolicyStatement).equals(0xc420959c20>, 0xc420959cb0, 0x0)
        	/home/travis/gopath/src/github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go:176 +0x2e1
        <http://github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.(*awsPolicyDocument).equals(0xc420724a00|github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.(*awsPolicyDocument).equals(0xc420724a00>, 0xc420724a80, 0x0)
        	/home/travis/gopath/src/github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence/aws_policy_equivalence.go:114 +0x109
        <http://github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.PoliciesAreEquivalent(0xc4204f3000|github.com/pulumi/pulumi-aws/vendor/github.com/jen20/awspolicyequivalence.PoliciesAreEquivalent(0xc4204f3000>, 0xf3, 0xc4207b4410, 0xc8, 0xc420adee10, 0xc420adee08, 0xc420adedf8)
  • s

    stocky-spoon-28903

    10/30/2018, 4:35 PM
    That’s… not good (especially since it’s in a library that Terraform uses with my name on it!)
  • s

    stocky-spoon-28903

    10/30/2018, 4:35 PM
    @busy-umbrella-36067 do you have a role which reproduces this?
  • b

    busy-umbrella-36067

    10/30/2018, 4:36 PM
    @stocky-spoon-28903 im passing a promise to the statement instead of a string. I think thats triggering it
  • b

    busy-umbrella-36067

    10/30/2018, 4:36 PM
    -.js
  • s

    stocky-spoon-28903

    10/30/2018, 4:36 PM
    Hmm, I’d think the pulumi engine should be dealing with that ok
  • s

    stocky-spoon-28903

    10/30/2018, 4:37 PM
    I don’t see where there would be a promise there - let me see if I can repro
  • b

    busy-umbrella-36067

    10/30/2018, 4:37 PM
    bucket.arn
  • s

    stocky-spoon-28903

    10/30/2018, 4:37 PM
    Ahhh
  • b

    busy-umbrella-36067

    10/30/2018, 4:37 PM
    pulumi creates the s3 bucket
  • s

    stocky-spoon-28903

    10/30/2018, 4:37 PM
    Yes, you’ll need:
  • s

    stocky-spoon-28903

    10/30/2018, 4:38 PM
    bucket.arn.apply(bucketArn => {
        return JSON.stringify({
            Version: "2012-10-17",
            Statement: [{
              Effect: "Allow",
              Action: [ "s3:ListBucket", "s3:HeadBucket", "s3:PutObject", "s3:GetObject" ],
              Resource: [ bucketArn ]
            }]
        });
    });
  • s

    stocky-spoon-28903

    10/30/2018, 4:39 PM
    For the value of
    policy
  • s

    stocky-spoon-28903

    10/30/2018, 4:39 PM
    It shouldn’t panic like that - but I think I know why it is
  • b

    busy-umbrella-36067

    10/30/2018, 4:39 PM
    oh, that makes sense
  • b

    busy-umbrella-36067

    10/30/2018, 5:32 PM
    important question: why is 🍹 the pulumi emoji?
    a
    c
    • 3
    • 5
  • o

    orange-tailor-85423

    10/30/2018, 5:48 PM
    Pulumi configs - is there a way to store those values in a file/JSON and read them in?
    c
    • 2
    • 1
  • o

    orange-tailor-85423

    10/30/2018, 5:48 PM
    rather than "pulumi config set blah 4"
  • o

    orange-tailor-85423

    10/30/2018, 5:48 PM
    so we can generalize the config.ts
  • s

    stocky-spoon-28903

    10/30/2018, 5:48 PM
    @busy-umbrella-36067 I think your panic gets ‘fixed’ by https://github.com/pulumi/pulumi-terraform/pull/269 - in so much as it doesn’t panic any more, but gives the expected serialization error.
  • s

    stocky-spoon-28903

    10/30/2018, 5:49 PM
    You still need to do
    apply
    on the output required.
  • s

    stocky-spoon-28903

    10/30/2018, 6:03 PM
    @busy-umbrella-36067 If you remove the call to JSON.stringify (which must have available values) it behaves as you want though:
  • s

    stocky-spoon-28903

    10/30/2018, 6:03 PM
    -.js
  • s

    stocky-spoon-28903

    10/30/2018, 6:03 PM
    (That has some of the ceremony removed to make an easier repro, but correctly applies)
  • b

    busy-umbrella-36067

    10/30/2018, 6:05 PM
    @stocky-spoon-28903 I was going off the examples repo, is there a reason
    JSON
    is used in those?
  • s

    stocky-spoon-28903

    10/30/2018, 6:06 PM
    Probably because they predate automatic serialization 🙂
  • s

    stocky-spoon-28903

    10/30/2018, 6:06 PM
    They should probably be updated
  • b

    busy-umbrella-36067

    10/30/2018, 6:07 PM
    I’ll try it that way, I guess the role resource won’t need it either
  • s

    stocky-spoon-28903

    10/30/2018, 6:08 PM
    That one actually does until the PR I linked earlier is merged
Powered by Linen
Title
s

stocky-spoon-28903

10/30/2018, 6:08 PM
That one actually does until the PR I linked earlier is merged
View count: 1