sparse-intern-71089
12/16/2021, 9:09 PMlittle-cartoon-10569
12/16/2021, 9:13 PMpolite-napkin-90098
12/16/2021, 9:15 PMimport { "<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>" }
at the top achieves that. I also expect the pulumi.String and pulumi.StringArray I used elsewhere would also fail if I hadn't.little-cartoon-10569
12/16/2021, 9:17 PMlittle-cartoon-10569
12/16/2021, 9:17 PMlittle-cartoon-10569
12/16/2021, 9:18 PM[]map[string]interface{}
bits might be fine for golangians, but it's hard to read for the rest of us. This style seems more grokable.polite-napkin-90098
12/16/2021, 9:19 PMpolite-napkin-90098
12/16/2021, 9:19 PMlittle-cartoon-10569
12/16/2021, 9:19 PMlittle-cartoon-10569
12/16/2021, 9:20 PMpulumi.String(...)
approach, see if it fixes the problem?polite-napkin-90098
12/16/2021, 9:20 PMlittle-cartoon-10569
12/16/2021, 9:20 PMlittle-cartoon-10569
12/16/2021, 9:21 PMpulumi.Any
approach is probably relying on auto-conversion of objects to JSON under the Pulumi hood anyway. pulumi.String
is just making it a bit more explicit.polite-napkin-90098
12/16/2021, 9:25 PMpolite-napkin-90098
12/16/2021, 9:26 PMpolite-napkin-90098
12/16/2021, 9:26 PMpolite-napkin-90098
12/17/2021, 5:36 PMpolite-napkin-90098
12/17/2021, 5:39 PMaws-native:iam:Role (eksRole):
error: resource partially created but read failed. read error: reading resource state: operation error CloudControl: GetResource, https response error StatusCode: 400, RequestID: 37537079-4292-4a5b-a9f0-ff4d2da08801, ResourceNotFoundException: AWS::IAM::Role Handler returned status FAILED: The role with name eksRole-e2fc0f1 cannot be found. (Service: Iam, Status Code: 404, Request ID: e396cf09-f627-420f-8a5b-ebee365e73a1, Extended Request ID: null) (HandlerErrorCode: NotFound, RequestToken: e64d8096-1398-47b4-a8e4-c636b98ae8a2), create error: operation CREATE failed with "InvalidRequest": This policy contains invalid Json (Service: Iam, Status Code: 400, Request ID: ecf8171b-1d3f-4805-b714-3bd259667535, Extended Request ID: null)
and when I look at the details I see the JSON is like
+ aws-native:iam:Role: (create)
[urn=urn:pulumi:EKS-test::EKS::aws-native:iam:Role::eksRole]
assumeRolePolicyDocument: "{ \"Version\": \"2012-10-17\", \"Statement\": [{ \"Effect\": \"Allow\", \"Principal\": { \"Service\": \"<http://eks.amazonaws.com|eks.amazonaws.com>\", }, \"Action\": \"sts:AssumeRole\", }] }"
managedPolicyArns : [
So a bunch of \s I don't need or want. Which is I guess what the pulumi.Any{} was about.polite-napkin-90098
12/17/2021, 5:40 PMpolite-napkin-90098
12/20/2021, 5:32 PM