hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.76k stars 9.12k forks source link

Trying to use the provider directly with the RPC API I always get "Resource Not Implemented" errors. #39512

Open ivands opened 1 day ago

ivands commented 1 day ago

Description

I'm directly running the latest provider plugin "terraform-provider-aws_v5.68.0_x5". And i'm using the RPC API to communicate with the plugin from Node.js. But API calls that require the type_name prop will always give me the following error.

{
  diagnostics: [
    {
      severity: 1,
      summary: 'Resource Not Implemented',
      detail: 'The combined provider does not implement the requested resource type. This is always an issue in the provider implementation and should be reported to the provider developers.\n' +
        '\n' +
        'Missing resource type: '
    }
  ]
}

Example:

const result = await call("PlanResourceChange", {
  type_name: 'aws_s3_bucket',
  prior_state: dynamicValue(null),
  proposed_new_state: dynamicValue({}),
});

Am i doing something wrong or is this a bug?

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 day ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

ewbankkit commented 10 hours ago

@ivands This documentation, https://developer.hashicorp.com/terraform/plugin/terraform-plugin-protocol, describes the sequence of protocol RPC calls required to successfully invoke the provider. In particular, resources are "registered" during the ConfigureProvider RPC.

ivands commented 9 hours ago

@ewbankkit But the same error happens for the ValidateResourceTypeConfig call. In the sequence ValidateResourceTypeConfig happens before Configure. I'm royally confused here.