careful-family-14644
03/02/2023, 5:23 PMlittle-cartoon-10569
03/02/2023, 8:02 PMcareful-family-14644
03/03/2023, 2:46 PMlittle-cartoon-10569
03/04/2023, 1:44 AMwitty-candle-66007
03/06/2023, 3:01 PMcareful-family-14644
03/06/2023, 3:44 PMwitty-candle-66007
03/06/2023, 7:12 PMvalidateStack
for this use-case since that’s the only way to have access to all the resources in the stack at a given time.
Stack validation does run predeployment but you are limited to what properties you can see. And as you’ll see in example code, this leads to another policy being needed to ensure that works during predeployment.careful-family-14644
03/06/2023, 9:21 PMpulumi up
it will still create the objects and then show the violations. That's somewhat what I'm worried about at this point.witty-candle-66007
03/06/2023, 9:35 PMpulumi preview
or the first part of a pulumi up
and both types of policies will also run after the pulumi up
completes. So your goal of checking before deployment will work here. In fact, if you test the provided code and change the enforcementLevel
to mandatory
for the policies and do a pulumi up
you’ll see that you won’t be allowed to do the actual deployment step if there’s a policy violation.bucket.bucket
policy. Just need to test it a bit more..bucket
property.careful-family-14644
03/08/2023, 10:15 PMwitty-candle-66007
03/09/2023, 9:20 PMadvisory
which won’t stop the update.
But setting the policy to mandatory
would prevent the update from occurring.careful-family-14644
03/14/2023, 1:07 PMpulumi preview
I would receive errors as expected. But using pulumi up --yes --skip-preview --policy-pacy ../policies
in order to automate the process, the warnings show up but only after the stack is created.BucketPublicAccessBlock
as it resides outside of the Bucket
resource itself unfortunately.pulumi up
function?witty-candle-66007
03/14/2023, 2:39 PM--skip-preview
throws a wrench into things.careful-family-14644
03/15/2023, 7:17 PMwitty-candle-66007
03/15/2023, 7:27 PM--skip-preview
as a way of addressing this use-case? (I’m thinking of opening a github issue for this.)careful-family-14644
03/15/2023, 8:01 PM