chilly-hairdresser-56259
05/15/2020, 7:16 PMfuture-barista-68134
05/15/2020, 7:31 PMfederated_identity
from.. Can you print out the value when you run to see what’s there?chilly-hairdresser-56259
05/15/2020, 7:38 PMfuture-barista-68134
05/15/2020, 7:46 PMchilly-hairdresser-56259
05/15/2020, 7:47 PMfuture-barista-68134
05/15/2020, 7:56 PMchilly-hairdresser-56259
05/15/2020, 8:01 PMfuture-barista-68134
05/15/2020, 8:07 PMiam.stsAssumeFederatedPolicyJson(assume_role='sts:AssumeRoleWithSAML', federated_identity=pingOneSaml))
and then add a variable with the value of that hardcoded. Then use that variable instead of the function in the call here like so:
aws.iam.Role('%s-s3-ListBucket-role' % p_env,name="ListBuckets-%s-role" % p_env,assume_role_policy=assume_role_policy_variable)
chilly-hairdresser-56259
05/15/2020, 8:10 PMfuture-barista-68134
05/15/2020, 8:17 PMdef stsAssumeFederatedPolicyJson(assume_role, federated_identity):
return federated_identity.id.apply( lambda id:
policy_json={}
statement=[
{
'Action': assume_role,
'Effect': 'Allow',
'Principal': {
'Federated': str(id)
}
}
]
policy_json['Version']='2012-10-17'
policy_json['Statement']=statement
return json.dumps(policy_json)
)
federated_identity.id
is still an output, meaning it doesn’t have the value yet.chilly-hairdresser-56259
05/15/2020, 8:22 PMfuture-barista-68134
05/15/2020, 9:42 PMname
parameter. See docs here: https://www.pulumi.com/docs/intro/concepts/programming-model/#autonaming.chilly-hairdresser-56259
05/15/2020, 9:49 PMfuture-barista-68134
05/15/2020, 10:00 PMchilly-hairdresser-56259
05/18/2020, 1:13 AMfuture-barista-68134
05/18/2020, 1:30 PM