Skip to content

Commit

Permalink
Fix invalid function argument error
Browse files Browse the repository at this point in the history
* When a CI Storage container isn't deployed, Terraform throws an 'Invalid value for "value" parameter: the given value is not sensitive, so this call is redundant.' error. Moving the 'nonsensitive' function call to inside the conditional check fixes this
  • Loading branch information
DrizzlyOwl authored and dynamictulip committed Oct 27, 2023
1 parent f424656 commit 46ee998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/ci-storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ data "azurerm_storage_account_blob_container_sas" "ci-test-reports" {

output "ci-test-reports-storage-sas-url" {
description = "A SAS tokenised URL for accessing the CI Reports in the Blob Storage Container"
value = nonsensitive(local.enable_ci_report_storage_container ? "${azurerm_storage_account.ci-test-reports[0].primary_blob_endpoint}${azurerm_storage_container.ci-test-reports[0].name}${data.azurerm_storage_account_blob_container_sas.ci-test-reports[0].sas}" : null)
value = local.enable_ci_report_storage_container ? nonsensitive("${azurerm_storage_account.ci-test-reports[0].primary_blob_endpoint}${azurerm_storage_container.ci-test-reports[0].name}${data.azurerm_storage_account_blob_container_sas.ci-test-reports[0].sas}") : null
}

0 comments on commit 46ee998

Please sign in to comment.