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

Unable to disable subscription for azure.apimanagement.Api #381

Closed
johlrich opened this issue Oct 3, 2019 · 7 comments
Closed

Unable to disable subscription for azure.apimanagement.Api #381

johlrich opened this issue Oct 3, 2019 · 7 comments

Comments

@johlrich
Copy link

johlrich commented Oct 3, 2019

Leaving off the subscriptionKeyParameterNames or explicitly setting it to undefined creates the Api with the subscription enabled with default header / query parameter names.

I am unsure how this resource behaves with just the terraform provider.

@johlrich
Copy link
Author

johlrich commented Oct 3, 2019

While looking into a workaround and I'd guess this is just a case of a missing property in the upstream tf provider

The CreateOrUpdate azurerm body shows a subscriptionRequired boolean in addition to the subscriptionKeyParameterNames on the azurerm apis https://docs.microsoft.com/en-us/rest/api/apimanagement/2019-01-01/apis/createorupdate#request-body

The terraform list of parameters only seems to have subscriptionKeyParameterNames https://www.terraform.io/docs/providers/azurerm/r/api_management_api.html#argument-reference

@mikhailshilkov mikhailshilkov self-assigned this Oct 3, 2019
@mikhailshilkov
Copy link
Member

@johlrich Thanks for checking this!
I believe this is hashicorp/terraform-provider-azurerm#3863 upstream

@mikhailshilkov mikhailshilkov removed their assignment Oct 4, 2019
@jackbatzner
Copy link

This actually referenced in PR 4885, please see my comments for why this can't be implemented just yet.

@baoduy
Copy link

baoduy commented Mar 28, 2020

If you link your API to a Product that is not require API key, you can all you API without key.

 const product = new azure.apimanagement.Product(name, {
    resourceGroupName: apimInfo.group,
    apiManagementName: apimInfo.name,
    productId: name,
    displayName: displayName || name,
    published: true,
    subscriptionRequired:false,
    approvalRequired: false
  });

@Gerrit-K
Copy link

Meanwhile this has been fixed in upstream a couple of weeks ago. @mikhailshilkov I'm not familiar with the pulumi release / update cycle, but could you maybe reassess this? Thanks!

@mikhailshilkov
Copy link
Member

@Gerrit-K We updated to that upstream version in our version 3.11. Should we close this issue?

@Gerrit-K
Copy link

@mikhailshilkov sorry for that, apparently my IDE didn't refresh after I updated the npm package. I can confirm that it works now, so I'd agree on closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants