1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi gary,
There is no construct that accept an array of policies to attach to a principal, but, the beauty of CDK is that is programmatic, so that you can loop as
for (var i = 1, i<= N; i++) {
new iot.CfnPolicyPrincipalAttachment(this, "policy principal attachment " + i, {
policyName: "iot-policy-" + i,
principal: iotCertificate.attrArn,
});
}
Hope it helps ;)
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 7 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
Thanks alatech, my policy names are actually not incremental but that's ok, I can put them in an array and iterate through it. I only have 4 policies at them moment, so something to consider if things get bigger.