|
365 | 365 | :StackName StackId}})) |
366 | 366 | (update-stack! cloudformation-client request StackId))))) |
367 | 367 |
|
368 | | -(defn- execute-change-set! [cloudformation-client stack-name {:keys [changes id]}] |
369 | | - (when (seq changes) |
370 | | - ; This op only returns {} |
371 | | - (aws/invoke cloudformation-client |
372 | | - {:op :ExecuteChangeSet |
373 | | - :request |
374 | | - {:ChangeSetName id |
375 | | - :StackName stack-name}}))) |
| 368 | +(defn- execute-change-set! [cloudformation-client stack-name {:keys [id]}] |
| 369 | + ; This op only returns {} |
| 370 | + (aws/invoke cloudformation-client |
| 371 | + {:op :ExecuteChangeSet |
| 372 | + :request |
| 373 | + {:ChangeSetName id |
| 374 | + :StackName stack-name}})) |
376 | 375 |
|
377 | 376 | (defn- outputs-map-raw [outputs-seq] |
378 | 377 | (reduce |
|
456 | 455 | (let [signal (update signal ::ds/config init-cloudformation-client) |
457 | 456 | {::ds/keys [config]} signal |
458 | 457 | {:keys [cloudformation-client]} config |
459 | | - {:keys [changes stack-id]} change-set |
| 458 | + {:keys [changes execution-status stack-id]} change-set |
460 | 459 | ex! (if change-set |
461 | 460 | (fn [] |
462 | | - (if (seq changes) |
| 461 | + (if (or (seq changes) (= "AVAILABLE" execution-status)) |
463 | 462 | (let [r (execute-change-set! cloudformation-client name change-set)] |
464 | 463 | (if (u/anomaly? r) |
465 | 464 | [stack-id false] |
|
750 | 749 | {:keys [cloudformation-client]} config |
751 | 750 | {:keys [Id StackId]} |
752 | 751 | #__ (create-change-set! cloudformation-client signal (template-data config :template template :validate? false)) |
753 | | - {:keys [Changes]} |
| 752 | + {:keys [Changes ExecutionStatus]} |
754 | 753 | #__ (wait-until-complete-change-set! Id StackId cloudformation-client |
755 | 754 | :fail-on-no-changes? fail-on-no-changes?)] |
756 | 755 | {:changes Changes |
757 | 756 | :client cloudformation-client |
758 | 757 | :cloudformation-client cloudformation-client |
| 758 | + :execution-status ExecutionStatus |
759 | 759 | :id Id |
760 | 760 | :name name |
761 | 761 | :stack-id StackId |
|
0 commit comments