Skip to content

Commit

Permalink
Fixing example tests (pulumi#978)
Browse files Browse the repository at this point in the history
* Update so I can create a PR

* Convert policy to json string

* Fixed classic azure arm template example
  • Loading branch information
pierskarsenbarg committed Apr 21, 2021
1 parent 19f289f commit a8968a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions aws-py-assume-role/create-role/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2016-2020, Pulumi Corporation. All rights reserved.

import pulumi_aws as aws
import json
from pulumi import Config, ResourceOptions, export


Expand All @@ -10,7 +11,7 @@ def assume_role_policy_for_principal(principal):
which can be used to control which principals may assume an IAM Role, by
granting the `sts:AssumeRole` action to those principals.
"""
return {
return json.dumps({
'Version': '2012-10-17',
'Statement': [
{
Expand All @@ -20,7 +21,7 @@ def assume_role_policy_for_principal(principal):
'Action': 'sts:AssumeRole'
}
]
}
})


config = Config()
Expand Down Expand Up @@ -48,15 +49,15 @@ def assume_role_policy_for_principal(principal):

policy = aws.iam.RolePolicy('allow-s3-management-policy',
role=allow_s3_management_role,
policy={
policy=json.dumps({
'Version': '2012-10-17',
'Statement': [{
'Sid': 'AllowS3Management',
'Effect': 'Allow',
'Resource': '*',
'Action': 's3:*',
}],
},
}),
opts=ResourceOptions(parent=allow_s3_management_role)
)

Expand Down
2 changes: 1 addition & 1 deletion aws-ts-containers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const listener = new awsx.elasticloadbalancingv2.NetworkListener("nginx", { port
// Define the service to run. We pass in the listener to hook up the network load balancer
// to the containers the service will launch.
const service = new awsx.ecs.FargateService("nginx", {
desiredCount: 2,
desiredCount: 3,
taskDefinitionArgs: {
containers: {
nginx: {
Expand Down
2 changes: 1 addition & 1 deletion classic-azure-py-arm-template/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
)

# Finally, export the allocated storage account name.
export('storageAccountName', arm_deployment.outputs['storage_account_name'])
export('storageAccountName', arm_deployment.outputs['storageAccountName'])

0 comments on commit a8968a5

Please sign in to comment.