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

[DS-DEF] Enhance KQL Queryset item data-source by adding definition support #131

Open
1 of 11 tasks
DariuszPorowski opened this issue Dec 9, 2024 · 0 comments
Open
1 of 11 tasks
Labels
enhancement Enhancement to existing feature tf/data-source Terraform Data-Source type/DS-DEF Fabric Item data-source with definition
Milestone

Comments

@DariuszPorowski
Copy link
Member

DariuszPorowski commented Dec 9, 2024

📝 Description

When I am managing my Infrastructure as Code using Terraform for KQL Queryset. I want to be able to get details of KQL Queryset definition. So, I can use it as input to another resource/data-source.

🔬 Details / References

🚧 Potential Terraform Configuration / Desired Solution

# Get item details by name
data "fabric_kql_queryset" "example_by_name" {
  display_name = "example"
  workspace_id = "00000000-0000-0000-0000-000000000000"
}

# Get item details by id
data "fabric_kql_queryset" "example_by_id" {
  id           = "11111111-1111-1111-1111-111111111111"
  workspace_id = "00000000-0000-0000-0000-000000000000"
}

# Get item details with definition
# Examples uses `id` but `display_name` can be used as well
data "fabric_kql_queryset" "example_definition" {
  id                = "11111111-1111-1111-1111-111111111111"
  workspace_id      = "00000000-0000-0000-0000-000000000000"
  output_definition = true
}

# Access the content of the definition with JSONPath expression
output "example_definition_content_jsonpath" {
  value = provider::fabric::content_decode(data.fabric_kql_queryset.example_definition.definition["RealTimeQueryset.json"].content)
}

# Access the content of the definition as JSON object
output "example_definition_content_object" {
  value = provider::fabric::content_decode(data.fabric_kql_queryset.example_definition.definition["RealTimeQueryset.json"].content)
}

# This is an invalid data source
# Do not specify `id` and `display_name` in the same data source block
# data "fabric_kql_queryset" "example" {
#   display_name = "example"
#   id           = "11111111-1111-1111-1111-111111111111"
#   workspace_id = "00000000-0000-0000-0000-000000000000"
# }

📎 Additional context

No response

✅ Definition of Done

  • Data Transfer Objects (DTOs)
  • Data Client functions
  • Data Source Implementation
  • Data Source Added to Provider
  • Unit Tests for Happy path
  • Unit Tests for Error path
  • Acceptance Tests
  • Example in the ./examples folder
  • Schema documentation in code
  • Updated auto-generated provider docs with task docs

🔰 Code of Conduct

  • I agree to follow this project's Code of Conduct.
@DariuszPorowski DariuszPorowski added tf/data-source Terraform Data-Source feature New feature or request labels Dec 9, 2024
@DariuszPorowski DariuszPorowski added this to the 2024-12 milestone Dec 9, 2024
@DariuszPorowski DariuszPorowski added the enhancement Enhancement to existing feature label Dec 9, 2024
@DariuszPorowski DariuszPorowski changed the title [DS-DEF] Integrate KQL Queryset as Fabric Item with Definition data-source [DS-DEF] Enhance KQL Queryset item data-source by adding definition support Dec 9, 2024
@DariuszPorowski DariuszPorowski added type/DS-DEF Fabric Item data-source with definition and removed feature New feature or request labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing feature tf/data-source Terraform Data-Source type/DS-DEF Fabric Item data-source with definition
Projects
None yet
Development

No branches or pull requests

1 participant