pulumi / pulumi-terraform-provider

Use any Terraform provider with Pulumi
Apache License 2.0
4 stars 0 forks source link

Bridged azurerm: objectEncoder failed on property "features": Expected an Object PropertyValue #4

Closed mikhailshilkov closed 1 month ago

mikhailshilkov commented 1 month ago

What happened?

I bridged the azurerm provider:

pulumi package gen-sdk terraform-provider --language python --out azurerm -- hashicorp/azurerm

but it complains about

The argument "features" is required, but no definition was found.. Check `pulumi config get azurerm:features`.

I tried adding features in a few ways:

config:
  azurerm:features: {}

or

config:
  azurerm:features:
    api_management:
      recover_soft_deleted: true

but the provider still fails with

error: rpc error: code = Unknown desc = cannot encode provider configuration to call ValidateProviderConfig: objectEncoder failed on property "features": Expected an Object PropertyValue

Example

import pulumi_azurerm as azure
example = azure.ResourceGroup("example",
    name="example-resources",
    location="West Europe")

Output of pulumi about

3.126.0

Additional context

No response

Contributing

Vote on this issue by adding a šŸ‘ reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

iwahbe commented 1 month ago

It looks like this is caused by the plugin framework failing to decode a complex nested config call. Augmenting the error, I see:

    error: rpc error: code = Unknown desc = cannot encode provider configuration to call ValidateProviderConfig: objectEncoder failed on property "features": Expected an Object PropertyValue, found string ("{{\"recover_soft_deleted\":true}}")