azurerm_key_vault_certificate: fixed 'Unknown' issuer not working Issue #5589 #6979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The 'Unknown' issuer certificate workflow does not create a "ready to use" but pending certificate which needs to get signed. Until then it will not have a SID which is the reason why the current code times out waiting for a SID to become available (Refer to https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/internal/services/keyvault/key_vault_certificate_resource.go#L445).
In this workflow, the user needs to manually download a certificate signing request (CSR file) from the portal and get it signed by an external CA (upload the CSR there and so on). Because of this the azurerm resource for an unknown issuer is finished with its work as soon as the certificate exists which is the case when the go client receives http status code 200. (Refer to https://github.com/Azure/azure-sdk-for-go/blob/master/services/keyvault/2016-10-01/keyvault/client.go#L1303 )
All possible issuers are: