azure-sdk-for-go: web/CertificatesClient should not force a value for the "password" property
Bug Report
- import path of package
"github.com/Azure/azure-sdk-for-go/services/web/mgmt/2019-08-01/web" - SDK version
master go version go1.13.4 darwin/amd64
You can now create App Service Managed Certificates by providing a Certificate struct with the following properties to the CertificatesClient.CreateOrUpdate function:
certificate := web.Certificate{
CertificateProperties: &web.CertificateProperties{
CanonicalName: utils.String(name),
ServerFarmID: utils.String(appServicePlanID),
},
Location: utils.String(location),
Tags: tags.Expand(t),
}
Note that Password is not required and should not be set. If a value for Password is set, the API will return GatewayTimeout errors.
Unfortunately, the SDK currently validates that Password is not nil. This has to be fixed to enable the creation of App Service Managed Certificates.
The validation happens here: https://github.com/Azure/azure-sdk-for-go/blob/e56ec3f142bfbc83f619f7e7eaf72abf03a3ef17/services/web/mgmt/2019-08-01/web/certificates.go#L67
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 16 (5 by maintainers)
So I’ve just tested this out, and it looks like it works if you set the password to an empty string like this:
This was my suspicion about three months ago when I posted earlier, but haven’t had a chance till now to test my theory. I have created a PR to fix this for the new resource here:
https://github.com/terraform-providers/terraform-provider-azurerm/pull/9378