Azure / Azure/terraform-provider-azapi

Support for Azure Resource Graph queries

Open
#1,132 0 comments 2 reactions 0 assignees View on GitHub
triaged
Dominant language
Go
Stars
244
Forks
97
Avg merge
5d 9h
Merged PRs (30d)
9

Description

Would you be interested to add support for querying Azure Resource Graph in this provider?

Using `azapi_resource_action` won't work as it does not handle the pagination of the response:

```terraform
# This does not work due to pagination requirements.
data "azapi_resource_action" "arg_query" {
type = "Microsoft.ResourceGraph/resources@2024-04-01"
action = "resources"
body = {
query <

WDYT?

API reference: https://learn.microsoft.com/en-us/rest/api/azureresourcegraph/resourcegraph/resources/resources?view=rest-azureresourcegraph-resourcegraph-2024-04-01&tabs=HTTP

Some example use cases:
1. Query Private Endpoints using Azure resource graph and create DNS records for it
2. Query resources by type and assign a policy to it

Contributor guide

Open the contributing guide

Research direction

Start by examining the existing azapi_resource_action data source and the linked Azure Resource Graph REST API reference, focusing on pagination and request parameters. Add the proposed azapi_resource_graph_query data source with the shown query and management group inputs, and verify that paginated results are returned for the example use cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
api, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.