Skip to content

Commit

Permalink
bugfix app id
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Istrati committed Jan 23, 2025
1 parent 9399f5b commit ed69dec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ case ${SPF_DIR} in iac*)
KEY=$(echo $LINE | cut -d"=" -f1)
BACK=${LINE/$KEY=/}
FRONT=$(echo ${KEY/SPF_TFVAR_/} | tr "[:upper:]" "[:lower:]")
OPTIONS=" ${OPTIONS} -var spf_${FRONT}=${BACK}"
if [ -n "${BACK}" ]; then OPTIONS=" ${OPTIONS} -var spf_${FRONT}=${BACK}"; fi
done <<< "$SPF_TFVARS"

echo "[EXEC] cd ${WORKDIR}/${SPF_DIR}/"
Expand Down
2 changes: 1 addition & 1 deletion iac/cicd/service_catalog_app_registry/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT-0

provider "aws" {
allowed_account_ids = try(split(",", var.spf_account), null)
allowed_account_ids = try(trimspace(var.spf_account), "") != "" ? split(",", var.spf_account) : null
skip_region_validation = true

default_tags {
Expand Down
4 changes: 2 additions & 2 deletions iac/global.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data "aws_partition" "this" {}
data "aws_caller_identity" "this" {}

provider "aws" {
allowed_account_ids = try(split(",", var.spf_account), null)
allowed_account_ids = try(trimspace(var.spf_account), "") != "" ? split(",", var.spf_account) : null
skip_region_validation = true

default_tags {
Expand All @@ -15,7 +15,7 @@ provider "aws" {
environment = "default"
contact = "github.com/eistrati"
globalId = var.spf_gid
awsApplication = try(var.spf_app_arn, null)
awsApplication = try(trimspace(var.spf_app_arn), "") != "" ? var.spf_app_arn : null
}
}
}
Expand Down

0 comments on commit ed69dec

Please sign in to comment.