diff --git a/builtin/providers/azurerm/resource_arm_template_deployment.go b/builtin/providers/azurerm/resource_arm_template_deployment.go index 2a060b3ba..9538f61ee 100644 --- a/builtin/providers/azurerm/resource_arm_template_deployment.go +++ b/builtin/providers/azurerm/resource_arm_template_deployment.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "net/http" + "strconv" "strings" "time" @@ -171,12 +172,7 @@ func resourceArmTemplateDeploymentRead(d *schema.ResourceData, meta interface{}) var outputValueString string switch strings.ToLower(outputType.(string)) { case "bool": - // Use explicit "0"/"1" strings for boolean - if outputValue.(bool) { - outputValueString = "1" - } else { - outputValueString = "0" - } + outputValueString = strconv.FormatBool(outputValue.(bool)) case "string": outputValueString = outputValue.(string) diff --git a/builtin/providers/azurerm/resource_arm_template_deployment_test.go b/builtin/providers/azurerm/resource_arm_template_deployment_test.go index 459431779..40f0bea40 100644 --- a/builtin/providers/azurerm/resource_arm_template_deployment_test.go +++ b/builtin/providers/azurerm/resource_arm_template_deployment_test.go @@ -82,8 +82,8 @@ func TestAccAzureRMTemplateDeployment_withOutputs(t *testing.T) { testCheckAzureRMTemplateDeploymentExists("azurerm_template_deployment.test"), resource.TestCheckOutput("tfIntOutput", "-123"), resource.TestCheckOutput("tfStringOutput", "Standard_GRS"), - resource.TestCheckOutput("tfFalseOutput", "0"), - resource.TestCheckOutput("tfTrueOutput", "1"), + resource.TestCheckOutput("tfFalseOutput", "false"), + resource.TestCheckOutput("tfTrueOutput", "true"), resource.TestCheckResourceAttr("azurerm_template_deployment.test", "outputs.stringOutput", "Standard_GRS"), ), },