From 31a0d903c09b9ee95650d5de4c4f9bba43143d31 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 26 Sep 2024 23:45:04 -0400 Subject: [PATCH] add default customstackruns --- setup/stacks/customruns.yaml | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 setup/stacks/customruns.yaml diff --git a/setup/stacks/customruns.yaml b/setup/stacks/customruns.yaml new file mode 100644 index 0000000..e4e8665 --- /dev/null +++ b/setup/stacks/customruns.yaml @@ -0,0 +1,62 @@ +apiVersion: deployments.plural.sh/v1alpha1 +kind: CustomStackRun +metadata: + name: force-unlock +spec: + name: force-unlock + documentation: "force release a terraform lock if present" + commands: + - cmd: terraform + args: [init] + - cmd: terraform + args: + - force-unlock + - '-force' + - "{{ context.lockId }}" + configuration: + - name: lockId + type: STRING + documentation: the lock id to release +--- +apiVersion: deployments.plural.sh/v1alpha1 +kind: CustomStackRun +metadata: + name: state-rm +spec: + name: state-rm + documentation: "remove a resource from tf state" + commands: + - cmd: terraform + args: [init] + - cmd: terraform + args: + - state + - rm + - "{{ context.resource }}" + configuration: + - name: resource + type: STRING + documentation: the resource path to remove +--- +apiVersion: deployments.plural.sh/v1alpha1 +kind: CustomStackRun +metadata: + name: import +spec: + name: import + documentation: "import a resource into tf state" + commands: + - cmd: terraform + args: [init] + - cmd: terraform + args: + - import + - "{{ context.resource }}" + - "{{ context.identifier }}" + configuration: + - name: resource + type: STRING + documentation: the resource path to import + - name: identifier + type: STRING + documentation: the provider-specific identifier to import \ No newline at end of file