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] Add mirrored database data-source #282

Open
1 of 10 tasks
OrBaubergMicrosoft opened this issue Mar 5, 2025 · 0 comments · May be fixed by #284
Open
1 of 10 tasks

[DS] Add mirrored database data-source #282

OrBaubergMicrosoft opened this issue Mar 5, 2025 · 0 comments · May be fixed by #284
Labels
tf/data-source Terraform Data-Source

Comments

@OrBaubergMicrosoft
Copy link

📝 Description

When I am automating and managing data analytics infrastructure using Microsoft Fabric across multiple environments,
I want to get details of mirrored databases as code in Terraform.
To consistently and securely manage mirrored databases as code in Terraform while automating and managing data analytics infrastructure using Microsoft Fabric across multiple environments.

🔬 Details / References

🚧 Potential Terraform Configuration / Desired Solution

Get item details by name

data "fabric_mirrored_database" "example_by_name" {
display_name = "example"
workspace_id = "00000000-0000-0000-0000-000000000000"
}

Get item details by id

data "fabric_mirrored_database" "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_mirrored_database" "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_mirrored_database.example_definition.definition["mirroring.json"].content)
}

Access the content of the definition as JSON object

output "example_definition_content_object" {
value = provider::fabric::content_decode(data.fabric_mirrored_database.example_definition.definition["mirroring.json"].content)
}

This is an invalid data source

Do not specify id and display_name in the same data source block

data "fabric_mirrored_database" "example" {

display_name = "example"

id = "11111111-1111-1111-1111-111111111111"

workspace_id = "00000000-0000-0000-0000-000000000000"

}

📎 Additional context

No response

☑️ Acceptance Criteria

No response

✅ Definition of Done

  • Data Transfer Objects (DTOs)
  • 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tf/data-source Terraform Data-Source
Projects
None yet
1 participant