title: Trying to attach SSL certificate on application gateway using azure terraform
body: <p>I am trying to pass PFX certificate from local machine to code azure terraform but when i am applying this method in terraform its showing one error certificate or password invalid. i have tested certificate and password both but its working fine. i have attache code and error details below
  Thanks-Onkar</p>
  <pre><code>resource &quot;azurerm_application_gateway&quot; &quot;network&quot; {
    name                = &quot;my-application-gateway-12345&quot;
    resource_group_name = azurerm_resource_group.rg.name
    location            = &quot;West US&quot;
  
    sku {
      name           = &quot;Standard_Small&quot;
      tier           = &quot;Standard&quot;
      capacity       = 2
    }
  
    gateway_ip_configuration {
        name         = &quot;my-gateway-ip-configuration&quot;
        subnet_id    = &quot;${azurerm_virtual_network.vnet.id}/subnets/${azurerm_subnet.sub1.name}&quot;
    }
  
    ssl_certificate {
      name     = &quot;certificate&quot;
      data     = &quot;${base64encode(filemd5(&quot;test.pfx&quot;))}&quot;
      password = &quot;*****&quot;
    }
  
    frontend_port {
        name         = &quot;feport&quot;
        port         = 80
    }
  
    frontend_ip_configuration {
        name         = &quot;feip&quot;
        public_ip_address_id = &quot;${azurerm_public_ip.pip.id}&quot;
    }
  
    backend_address_pool {
        name = &quot;beap&quot;
    }
  
    backend_http_settings {
        name                  = &quot;be-htst&quot;
        cookie_based_affinity = &quot;Disabled&quot;
        port                  = 443
        protocol              = &quot;Https&quot;
       request_timeout        = 1
    }
  
    http_listener {
          name                                  = &quot;httplstn&quot;
          frontend_ip_configuration_name        = &quot;feip&quot;
          frontend_port_name                    = &quot;feport&quot;
          protocol                              = &quot;https&quot;
          ssl_certificate_name                  = &quot;certificate&quot;
    }
  
    request_routing_rule {
            name                       = &quot;rqrt&quot;
            rule_type                  = &quot;Basic&quot;
            http_listener_name         = &quot;httplstn&quot;
            backend_address_pool_name  = &quot;beap&quot;
            backend_http_settings_name = &quot;be-htst&quot;
    }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/fiJIV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fiJIV.png" alt="below is the error which i am facing" /></a></p>
  <h2>Update</h2>
  <p>after changes as per your instruction following error is occurred
  <a href="https://i.stack.imgur.com/sEEuS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sEEuS.png" alt="after changes as per your instruction following error is occured" /></a></p>