Unable to import ApplicationCertificate #261
Labels
area/import
An issue related to `pulumi import` or the import resource option.
kind/bug
Some behavior is incorrect or out of spec
Hello!
Issue details
I have an existing infrastructure created with Terraform that I'm trying to import into a Pulumi stack. Pulumi is very picky that the resource matches exactly, but I am usually able to get around any small differences by setting some 'IgnoreChanges'. With the
ApplicationCertificate
resource, however, I have come unstuck.It may or may not be relevant that the query for an App Registration doesn't return the value of the certificate in the
keyCredentials
fields. See e.g. https://docs.microsoft.com/en-us/graph/api/resources/keycredential?view=graph-rest-1.0 .So when I try the import, this is the error I get:
You can see that Pulumi thinks the "value" is new. Ditto "encoding". If I tell Pulumi to ignore those properties by setting
CustomResourceOptions.IgnoreChanges
, then I get the following error on import:So in summary, I can't set the value because Pulumi doesn't think it matches what's already in Azure, and I can't ignore it (or not set the value at all) because it's required.
My only workaround now is to not import it at all, in which case Pulumi will simply add the certificate again to the App Registration. That seems to work and isn't terrible, but it would be nice to import it properly if possible.
Steps to reproduce
Expected:
The certificate is imported into the stack.
Actual:
The import fails because the existing 'Value' is not recognised (along with 'Encoding').
The text was updated successfully, but these errors were encountered: