-
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
New Data Source: azurerm_api_management_subscription
#27824
Conversation
internal/services/apimanagement/api_management_subscription_data_source.go
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.
Looks really nice we have a need for this exact feature.
"api_management_name": schemaz.SchemaApiManagementDataSourceName(), | ||
|
||
"resource_group_name": commonschema.ResourceGroupName(), |
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.
Let's replace these with the resource's ID since we can infer the resource group from it
"api_management_name": schemaz.SchemaApiManagementDataSourceName(), | |
"resource_group_name": commonschema.ResourceGroupName(), | |
"api_management_id": { | |
Type: pluginsdk.TypeString, | |
Required: true, | |
ForceNew: true, | |
ValidateFunc: apimanagementservice.ValidateServiceID, | |
}, |
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.
Applied the changes, and also updated the doc.
internal/services/apimanagement/api_management_subscription_data_source.go
Outdated
Show resolved
Hide resolved
internal/services/apimanagement/api_management_subscription_data_source.go
Show resolved
Hide resolved
internal/services/apimanagement/api_management_subscription_data_source.go
Outdated
Show resolved
Hide resolved
internal/services/apimanagement/api_management_subscription_data_source.go
Outdated
Show resolved
Hide resolved
} | ||
|
||
data "azurerm_api_management_subscription" "test" { | ||
api_management_id = api_management_id.test.id |
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.
api_management_id = api_management_id.test.id | |
api_management_id = azurerm_api_management.test.id |
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.
Thank you :)
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.
Thanks @CorrenSoft LGTM 👍
Community Note
Description
Note
I found a missing
{}
in the data source guide, and I took the liberty of update it. Let me know if that is a problem.PR Checklist
Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_api_management_subscription
- New data source [New Data Source:azurerm_api_management_subscription
#27824]This is a (please select all that apply):
Related Issue(s)
Fixes #20575
Note
If this PR changes meaningfully during the course of review please update the title and description as required.