getporter / az-mixin

An Azure CLI mixin for Porter
https://getporter.org/mixins/az/
Apache License 2.0
0 stars 11 forks source link

Add idemponent resource group command #35

Closed carolynvs closed 2 years ago

carolynvs commented 2 years ago

The group command makes it simpler to ensure a resource group exists, and that it has been cleaned up when the bundle is uninstalled.

When used in any action other than uninstall, the mixin will ensure that the resource group exists.

install:
  - az:
      description: "Ensure my group exists"
      group:
        name: mygroup
        location: westus

When used in the uninstall action, the mixin ensures that the resource group is deleted.

uninstall:
  - az:
      description: "Cleanup my group"
      group:
        name: mygroup

I have also added the ignoreError functionality from the exec mixin so that custom user commands can handle errors.

~🚨 This relies on https://github.com/getporter/porter/pull/1846. Once that is merged, I'll cut a release and we can reference the release in our go.mod.~

carolynvs commented 2 years ago

I've updated the PR to use porter v1.0.0-alpha.7