-
Notifications
You must be signed in to change notification settings - Fork 17
feat(map): onboard new fabric_map data source and resource #777
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
base: main
Are you sure you want to change the base?
Conversation
🛑 Changelog entry required to mergeRun |
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.
Pull request overview
This PR adds support for the fabric_map resource and associated data sources (fabric_map and fabric_maps) to the Terraform provider. The implementation follows the established pattern for Fabric items with definition support.
Key changes:
- New resource
fabric_mapfor managing Fabric Map items with optional definition management - New data sources
fabric_mapandfabric_mapsfor querying Map items - Comprehensive test coverage including unit and acceptance tests
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/services/maps/base.go | Defines core constants and configuration for Map item type |
| internal/services/maps/resource_map.go | Implements the Map resource with definition validation |
| internal/services/maps/data_map.go | Implements single Map data source |
| internal/services/maps/data_maps.go | Implements list Maps data source |
| internal/services/maps/*_test.go | Test files for resource and data sources |
| internal/provider/provider.go | Registers new Map resource and data sources |
| examples/* | Example configurations and documentation |
| docs/* | Generated documentation for resource and data sources |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Type: "map", | ||
| Names: "Maps", | ||
| Types: "maps", | ||
| DocsURL: "https://learn.microsoft.com/azure/azure-maps/", |
Copilot
AI
Dec 16, 2025
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.
The DocsURL appears to reference Azure Maps (mapping/geospatial service) rather than Fabric Maps. This should point to Fabric-specific Map documentation if this is a different type of 'Map' item in Fabric. If these are the same, consider clarifying in comments to avoid confusion.
| DocsURL: "https://learn.microsoft.com/azure/azure-maps/", | |
| DocsURL: "https://learn.microsoft.com/rest/api/fabric/articles/item-management/definitions/map-definition", |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | ||
| } | ||
|
|
||
| # Access the content of the definition as JSON object | ||
| output "example_definition_content_object" { | ||
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload |
Copilot
AI
Dec 16, 2025
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.
The definition key used is 'content.json' but according to the schema documentation and base.go, the Map definition path is 'map.json', not 'content.json'. This example will not work correctly.
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content).payload |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | ||
| } | ||
|
|
||
| # Access the content of the definition as JSON object | ||
| output "example_definition_content_object" { | ||
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload |
Copilot
AI
Dec 16, 2025
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.
The definition key should be 'map.json' to match the configured definition path, not 'content.json'.
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content).payload |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | ||
| } | ||
|
|
||
| # Access the content of the definition as JSON object | ||
| output "example_definition_content_object" { | ||
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload |
Copilot
AI
Dec 16, 2025
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.
The definition path key should be 'map.json' as specified in the schema, not 'content.json'.
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content).payload |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | ||
| } | ||
|
|
||
| # Access the content of the definition as JSON object | ||
| output "example_definition_content_object" { | ||
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload |
Copilot
AI
Dec 16, 2025
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.
The definition path key should be 'map.json' to match the actual definition format paths.
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["content.json"].content).payload | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content, ".payload") | |
| } | |
| # Access the content of the definition as JSON object | |
| output "example_definition_content_object" { | |
| value = provider::fabric::content_decode(data.fabric_map.example_definition.definition["map.json"].content).payload |
📥 Pull Request
❓ What are you trying to address
Onboard new
fabric_mapdata source and resource.This closes #773 and #774