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

r/azurerm_api_management_api_subscription: support for api_id #12025

Merged
merged 5 commits into from
Jun 2, 2021

Conversation

patst
Copy link
Contributor

@patst patst commented Jun 1, 2021

Fixes #12016 .

Enables the configuration of subscriptions per API.

The test passed:

make testacc TEST='./azurerm/internal/services/apimanagement/api_management_subscription_resource_test.go' TESTARGS='-run=TestAccApiManagementSubscription_withApiId' TESTTIMEOUT='120m'
==> Checking that code complies with gofmt requirements...
==> Checking that Custom Timeouts are used...
==> Checking that acceptance test packages are used...
TF_ACC=1 go test ./azurerm/internal/services/apimanagement/api_management_subscription_resource_test.go -v -run=TestAccApiManagementSubscription_withApiId -timeout 120m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
2021/06/01 13:25:25 [DEBUG] not using binary driver name, it's no longer needed
2021/06/01 13:25:26 [DEBUG] not using binary driver name, it's no longer needed
=== RUN   TestAccApiManagementSubscription_withApiId
=== PAUSE TestAccApiManagementSubscription_withApiId
=== CONT  TestAccApiManagementSubscription_withApiId
--- PASS: TestAccApiManagementSubscription_withApiId (2670.30s)
PASS
ok      command-line-arguments  2672.300s

The scope attribute must be parsed to check if the scope is for a product, an api or for all apis. Probably the code can be better for the differentiation.

At the moment I assume the subscription is for all apis if neither product nor api id are configured.

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Thanks @patst - aside from one small comment which i will address now this LGTM 👍

@katbyte katbyte added this to the v2.62.0 milestone Jun 2, 2021
@katbyte katbyte changed the title r/azurerm_api_management_api_subscription: assign subscription to api r/azurerm_api_management_api_subscription: support for api_id Jun 2, 2021
@katbyte katbyte merged commit c6a7e05 into hashicorp:master Jun 2, 2021
katbyte added a commit that referenced this pull request Jun 2, 2021
@patst patst deleted the 12016-assign-subscription-to-api branch June 2, 2021 06:27
@ghost
Copy link

ghost commented Jun 4, 2021

This has been released in version 2.62.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.62.0"
}
# ... other configuration ...

@github-actions
Copy link

github-actions bot commented Jul 5, 2021

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2021
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.

Support for api_management_subscription for APIs
2 participants