Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting of api-version from resource request (C#?) #1877

Closed
sloncho opened this issue Aug 8, 2022 · 3 comments
Closed

Allow setting of api-version from resource request (C#?) #1877

sloncho opened this issue Aug 8, 2022 · 3 comments
Labels
kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue

Comments

@sloncho
Copy link

sloncho commented Aug 8, 2022

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

ATM there is no way to use azure custom resource providers in order to create custom azure resources. Not a "pulumi" custom resource.

Explanation: "azure custom resource provider" is in a preview, and the API version is "2018-09-01-preview". The creation/registration of the custom provider resource works as expected.

The problem appears, when we try to use that custom provider. We are using "azure resource" in order to do that. It appears that the way pulumi works, it builds the azure rest call/url by using the api-version of the "custom resource" class - and as such it produces the error:

azure-native:resources:Resource service-principal creating error: cannot check existence of resource '/subscriptions/xxxxxx/resourcegroups/xxxxxx/providers/Microsoft.CustomProviders%2Fresourceproviders/outCustomProvider/mycustomresourcetype/myresourcename': status code 400, {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'zzzz' and API version '2019-05-01' for type 'resourceProviders'. The supported api-versions are '2018-09-01-preview'.

Technically, the error is expected - as the "2019-05-01" is the azure api version of the "Resource" class, but the api call should carry the api-version of the "resource provider" - "2018-09-01-preview".

There is no "2018-09-01-preview" api schema for "Resource", so no way to use that specific implementation.

A possible solutions:

  1. Add "2018-09-01-preview" as possible alias to "Resource" class - maybe the easiest?
  2. Allow somehow to specify "api-version" on the resource
  3. Allow somehow to specify "api-version" using the customoptions.Provider
  4. Something else?

We are using C#, but maybe the problem exists with other languages too.

I'm willing to contribute, but I'll need guidance where to look for extension points.

Affected area/feature

AzureNative

@sloncho sloncho added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Aug 8, 2022
@guineveresaenger
Copy link
Contributor

Hi @sloncho - thank you for reporting this issue. I'll get back to you here on what we can do.

@guineveresaenger guineveresaenger removed the needs-triage Needs attention from the triage team label Aug 10, 2022
@guineveresaenger
Copy link
Contributor

Hi @sloncho - I unfortunately don't have a super exciting update here. We'll need some time to investigate, as there's unfortunately currently no quick fix for this. We're tracking this as an enhancement internally.

@mikhailshilkov mikhailshilkov added the resolution/duplicate This issue is a duplicate of another issue label Dec 1, 2023
@mikhailshilkov
Copy link
Member

Duplicate of #2467, we'll track there

@mikhailshilkov mikhailshilkov closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants