diff --git a/tkn/infra-aws-fedora.yaml b/tkn/infra-aws-fedora.yaml index 95bff8a33..e8756f182 100644 --- a/tkn/infra-aws-fedora.yaml +++ b/tkn/infra-aws-fedora.yaml @@ -154,6 +154,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -274,8 +279,13 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/infra-aws-kind.yaml b/tkn/infra-aws-kind.yaml index ed83f8243..db0118d4b 100644 --- a/tkn/infra-aws-kind.yaml +++ b/tkn/infra-aws-kind.yaml @@ -113,7 +113,7 @@ spec: description: | Comma-separated list of VPC service endpoints to create. Accepted values: s3, ecr, ssm. Empty = no endpoints created. - default: "" + default: "''" # Metadata params - name: tags @@ -128,6 +128,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -233,8 +238,13 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/infra-aws-mac.yaml b/tkn/infra-aws-mac.yaml index 1e08b66a1..b8a481c25 100644 --- a/tkn/infra-aws-mac.yaml +++ b/tkn/infra-aws-mac.yaml @@ -124,6 +124,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -229,8 +234,13 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/infra-aws-ocp-snc.yaml b/tkn/infra-aws-ocp-snc.yaml index 08f8aba2b..b10d60e33 100644 --- a/tkn/infra-aws-ocp-snc.yaml +++ b/tkn/infra-aws-ocp-snc.yaml @@ -149,6 +149,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -259,13 +264,20 @@ spec: if [[ $(params.timeout) != "" ]]; then cmd+="--timeout $(params.timeout) " fi - if [[ $(params.service-endpoints) != "" ]]; then + if [[ "$(params.service-endpoints)" != "" ]]; then cmd+="--service-endpoints $(params.service-endpoints) " fi cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/infra-aws-rhel-ai.yaml b/tkn/infra-aws-rhel-ai.yaml index dfa7a8ab5..939657d10 100644 --- a/tkn/infra-aws-rhel-ai.yaml +++ b/tkn/infra-aws-rhel-ai.yaml @@ -158,6 +158,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -281,7 +286,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/infra-aws-rhel.yaml b/tkn/infra-aws-rhel.yaml index d606fd96e..dbac79010 100644 --- a/tkn/infra-aws-rhel.yaml +++ b/tkn/infra-aws-rhel.yaml @@ -173,6 +173,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -299,7 +304,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/infra-aws-windows-server.yaml b/tkn/infra-aws-windows-server.yaml index b5512a799..1a0843a08 100644 --- a/tkn/infra-aws-windows-server.yaml +++ b/tkn/infra-aws-windows-server.yaml @@ -117,7 +117,7 @@ spec: Comma-separated list of VPC service endpoints to create. Accepted values: s3, ecr, ssm. Empty = no endpoints created. default: "''" - + - name: tags description: tags for the resources created on the providers default: "''" @@ -130,6 +130,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -227,14 +232,17 @@ spec: cmd+="--spot --spot-increase-rate $(params.spot-increase-rate) --spot-eviction-tolerance $(params.spot-eviction-tolerance) " fi if [[ $(params.airgap) == "true" ]]; then cmd+="--airgap "; fi - if [[ $(params.service-endpoints) != "" ]]; then - cmd+="--service-endpoints $(params.service-endpoints) " - fi + if [[ $(params.service-endpoints) != "" ]]; then cmd+="--service-endpoints $(params.service-endpoints) "; fi cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/infra-azure-rhel-ai.yaml b/tkn/infra-azure-rhel-ai.yaml index bff72d017..08c0e88a6 100644 --- a/tkn/infra-azure-rhel-ai.yaml +++ b/tkn/infra-azure-rhel-ai.yaml @@ -121,6 +121,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -235,7 +240,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/template/infra-aws-fedora.yaml b/tkn/template/infra-aws-fedora.yaml index f958b17b0..d318bde68 100644 --- a/tkn/template/infra-aws-fedora.yaml +++ b/tkn/template/infra-aws-fedora.yaml @@ -154,6 +154,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -274,8 +279,13 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/template/infra-aws-kind.yaml b/tkn/template/infra-aws-kind.yaml index 8aaf7c7e9..0c51e9e33 100644 --- a/tkn/template/infra-aws-kind.yaml +++ b/tkn/template/infra-aws-kind.yaml @@ -128,6 +128,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -233,8 +238,13 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/template/infra-aws-mac.yaml b/tkn/template/infra-aws-mac.yaml index e8ef867fa..77b4e3b22 100644 --- a/tkn/template/infra-aws-mac.yaml +++ b/tkn/template/infra-aws-mac.yaml @@ -124,6 +124,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -229,8 +234,13 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/template/infra-aws-ocp-snc.yaml b/tkn/template/infra-aws-ocp-snc.yaml index e6d2110f3..c601453cd 100644 --- a/tkn/template/infra-aws-ocp-snc.yaml +++ b/tkn/template/infra-aws-ocp-snc.yaml @@ -149,6 +149,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -265,7 +270,14 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/template/infra-aws-rhel-ai.yaml b/tkn/template/infra-aws-rhel-ai.yaml index 5fb0231b6..6689d0620 100644 --- a/tkn/template/infra-aws-rhel-ai.yaml +++ b/tkn/template/infra-aws-rhel-ai.yaml @@ -158,6 +158,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -281,7 +286,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/template/infra-aws-rhel.yaml b/tkn/template/infra-aws-rhel.yaml index 69342fdd0..6f26bf613 100644 --- a/tkn/template/infra-aws-rhel.yaml +++ b/tkn/template/infra-aws-rhel.yaml @@ -173,6 +173,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -299,7 +304,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi diff --git a/tkn/template/infra-aws-windows-server.yaml b/tkn/template/infra-aws-windows-server.yaml index 41156d9e5..f904f9ae0 100644 --- a/tkn/template/infra-aws-windows-server.yaml +++ b/tkn/template/infra-aws-windows-server.yaml @@ -130,6 +130,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: 'false' + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -231,8 +236,13 @@ spec: cmd+="--tags $(params.tags) " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then - cmd+="--keep-state " + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi fi eval "${cmd}" diff --git a/tkn/template/infra-azure-rhel-ai.yaml b/tkn/template/infra-azure-rhel-ai.yaml index 00a17b081..a89879614 100644 --- a/tkn/template/infra-azure-rhel-ai.yaml +++ b/tkn/template/infra-azure-rhel-ai.yaml @@ -121,6 +121,11 @@ spec: The parameter is intended to add verbosity on the task execution and also print masked credentials (showing first and last character with *** in the middle) on stdout to help with debugging default: "false" + - name: force-destroy + description: | + If force-destroy is set the command will destroy even if there is a lock. + Allowed values: true, false + default: "false" - name: keep-state description: | Keep Pulumi state files in S3 backend after successful destroy (by default, state files are removed). Only used when operation is destroy. @@ -235,7 +240,14 @@ spec: cmd+="--tags '$(params.tags)' " fi - if [[ "$(params.operation)" == "destroy" && "$(params.keep-state)" == "true" ]]; then + if [[ "$(params.operation)" == "destroy" ]]; then + if [[ "$(params.keep-state)" == "true" ]]; then + cmd+="--keep-state " + fi + if [[ "$(params.force-destroy)" == "true" ]]; then + cmd+="--force-destroy " + fi + fi cmd+="--keep-state " fi