-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Conversation
"user_id": azure.SchemaApiManagementChildID(), | ||
|
||
// 3.0 this seems to have been renamed to scope? | ||
"product_id": azure.SchemaApiManagementChildID(), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
…1-everything-changes
Thanks for the review @francescopersico! really appreciate the info on how the scope changed worked. i'll see about getting this in today |
There was a problem hiding this 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.
azurerm/internal/services/apimanagement/resource_arm_api_management_named_value.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/resource_arm_api_management_named_value.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/resource_arm_api_management_named_value.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/resource_arm_api_management_named_value.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/resource_arm_api_management_named_value.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/tests/resource_arm_api_management_named_value_test.go
Show resolved
Hide resolved
azurerm/internal/services/apimanagement/resource_arm_api_management_property.go
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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 ... |
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! |
No description provided.