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

provider: upgrade API Management to 2019-12-01 #6479

Merged
merged 12 commits into from
Apr 22, 2020

Conversation

katbyte
Copy link
Collaborator

@katbyte katbyte commented Apr 15, 2020

No description provided.

@katbyte katbyte requested a review from a team April 15, 2020 05:49
@ghost ghost added the size/XXL label Apr 15, 2020
@katbyte katbyte changed the title provider: upgrade API Management to 2019-12-01 [WIP] provider: upgrade API Management to 2019-12-01 Apr 15, 2020
"user_id": azure.SchemaApiManagementChildID(),

// 3.0 this seems to have been renamed to scope?
"product_id": azure.SchemaApiManagementChildID(),
Copy link
Contributor

@francescopersico francescopersico Apr 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a simple rename.

An apim subscription can be tied to:

  • a product -> "/products/{productId}"
  • all apis -> "/apis"
  • a single api -> "/apis/{apiId}"

So i think you must create a new block called "scope" with all the 3 options and in the docs you must document that only one must be filled like:

scope {
all_apis: boolean
api_name: string
product_name: string
}

used as:

scope {
product_name: "myproduct"
}

and than set the scope in SubscriptionCreateParameterProperties like
Scope: "/products/myproduct"

Hope it make sense.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking about this, this probably wants two fields here: api_id and product_id - both of which are optional & conflict with each other; which'll allow all 3 conditions to be met

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@francescopersico - i believe as i have coded it the original behaviour will be preserved? i'll leave adding the additional properties/block to a future PR by someone who knows this service better then I

@katbyte katbyte added this to the v2.7.0 milestone Apr 15, 2020
@katbyte
Copy link
Collaborator Author

katbyte commented Apr 20, 2020

Thanks for the review @francescopersico! really appreciate the info on how the scope changed worked. i'll see about getting this in today

@katbyte katbyte changed the title [WIP] provider: upgrade API Management to 2019-12-01 provider: upgrade API Management to 2019-12-01 Apr 21, 2020
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looking fine, but a couple of concerns and I suspect the acctests, still running at time of writing this, are going to fail due to the ID path elements I've commented on.

Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@katbyte katbyte merged commit 7253b6e into master Apr 22, 2020
@katbyte katbyte deleted the kt/apim-api-20191201-everything-changes branch April 22, 2020 16:54
katbyte added a commit that referenced this pull request Apr 22, 2020
@ghost
Copy link

ghost commented Apr 23, 2020

This has been released in version 2.7.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.7.0"
}
# ... other configuration ...

neil-yechenwei pushed a commit to neil-yechenwei/terraform-provider-azurerm that referenced this pull request Apr 26, 2020
neil-yechenwei pushed a commit to neil-yechenwei/terraform-provider-azurerm that referenced this pull request Apr 26, 2020
@ghost
Copy link

ghost commented May 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants