Skip to content

Commit

Permalink
refactor(fabric-items): use generic impl
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Zaidenvoren <[email protected]>
  • Loading branch information
DariuszPorowski and PabloZaiden committed Dec 30, 2024
1 parent 39cbb52 commit 3e2ca4c
Show file tree
Hide file tree
Showing 164 changed files with 4,412 additions and 3,996 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/changelog-existence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
changelog-existence:
name: 🔄 Check Changelog
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: ⤵️ Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
changelog-skip:
name: 🔄 Check Changelog
if: ${{ contains(github.event.pull_request.labels.*.name, 'skip-changelog') || github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 🔎 Find comment
if: github.actor != 'dependabot[bot]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ permissions:
jobs:
codeql:
name: 🩺 CodeQL Analysis
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-24.04' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
jobs:
main:
name: 🕵️ Check Dependency
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: ⤵️ Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# Build job
build:
name: 🏗️ Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: ⤵️ Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
deploy:
name: 🚀 Deploy
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-assign-author.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
assign-author:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
jobs:
release:
name: 🚀 Release
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
id-token: write
contents: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ permissions:
jobs:
main:
name: 🔍 Check PR title
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: 🔍 Run Semantic PR validation
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
release-tag:
name: 🏷️ Set Release Tag
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ permissions:
jobs:
changes:
name: 🔂 Check Changes
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
src: ${{ steps.filter.outputs.src }}
steps:
Expand All @@ -56,7 +56,7 @@ jobs:
if: needs.changes.outputs.src == 'true'
environment:
name: development
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
name: 🏗️ Check Build
needs: changes
if: needs.changes.outputs.src == 'true'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:

checkdocs:
name: 📃 Check Docs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
Expand Down Expand Up @@ -305,7 +305,7 @@ jobs:
if: needs.changes.outputs.src == 'true'
environment:
name: development
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
contents: read
Expand Down Expand Up @@ -462,7 +462,7 @@ jobs:
- test
- changes
if: always() && needs.changes.outputs.src == 'true'
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
issues: write
Expand Down Expand Up @@ -514,7 +514,7 @@ jobs:
if: always()
name: 🧪 Check Tests
needs: test
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: ✅ OK
if: ${{ !(contains(needs.*.result, 'failure')) }}
Expand Down
46 changes: 46 additions & 0 deletions docs/data-sources/environments.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,50 @@ Read-Only:
- `description` (String) The Environment description.
- `display_name` (String) The Environment display name.
- `id` (String) The Environment ID.
- `properties` (Attributes) The Environment properties. (see [below for nested schema](#nestedatt--values--properties))
- `workspace_id` (String) The Workspace ID.

<a id="nestedatt--values--properties"></a>

### Nested Schema for `values.properties`

Read-Only:

- `publish_details` (Attributes) Environment publish operation details. (see [below for nested schema](#nestedatt--values--properties--publish_details))

<a id="nestedatt--values--properties--publish_details"></a>

### Nested Schema for `values.properties.publish_details`

Read-Only:

- `component_publish_info` (Attributes) Environment component publish information. (see [below for nested schema](#nestedatt--values--properties--publish_details--component_publish_info))
- `end_time` (String) End time of publish operation.
- `start_time` (String) Start time of publish operation.
- `state` (String) Publish state. Possible values: `Cancelled`, `Cancelling`, `Failed`, `Running`, `Success`, `Waiting`.
- `target_version` (String) Target version to be published.

<a id="nestedatt--values--properties--publish_details--component_publish_info"></a>

### Nested Schema for `values.properties.publish_details.component_publish_info`

Read-Only:

- `spark_libraries` (Attributes) Spark libraries publish information. (see [below for nested schema](#nestedatt--values--properties--publish_details--component_publish_info--spark_libraries))
- `spark_settings` (Attributes) Spark settings publish information. (see [below for nested schema](#nestedatt--values--properties--publish_details--component_publish_info--spark_settings))

<a id="nestedatt--values--properties--publish_details--component_publish_info--spark_libraries"></a>

### Nested Schema for `values.properties.publish_details.component_publish_info.spark_libraries`

Read-Only:

- `state` (String) Publish state. Possible values: `Cancelled`, `Cancelling`, `Failed`, `Running`, `Success`, `Waiting`.

<a id="nestedatt--values--properties--publish_details--component_publish_info--spark_settings"></a>

### Nested Schema for `values.properties.publish_details.component_publish_info.spark_settings`

Read-Only:

- `state` (String) Publish state. Possible values: `Cancelled`, `Cancelling`, `Failed`, `Running`, `Success`, `Waiting`.
39 changes: 36 additions & 3 deletions docs/data-sources/eventhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ page_title: "fabric_eventhouse Data Source - terraform-provider-fabric"
subcategory: ""
description: |-
Get a Fabric Eventhouse.
Use this data source to fetch a Eventhouse https://learn.microsoft.com/fabric/real-time-intelligence/eventhouse.
Use this data source to fetch an Eventhouse https://learn.microsoft.com/fabric/real-time-intelligence/eventhouse.
-> This item supports Service Principal authentication.
---

# fabric_eventhouse (Data Source)

Get a Fabric Eventhouse.

Use this data source to fetch a [Eventhouse](https://learn.microsoft.com/fabric/real-time-intelligence/eventhouse).
Use this data source to fetch an [Eventhouse](https://learn.microsoft.com/fabric/real-time-intelligence/eventhouse).

-> This item supports Service Principal authentication.

Expand All @@ -29,6 +29,24 @@ data "fabric_eventhouse" "example_by_name" {
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_eventhouse" "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_eventhouse.example_definition.definition["EventhouseProperties.json"].content, ".")
}
# Access the content of the definition as JSON object
output "example_definition_content_object" {
value = provider::fabric::content_decode(data.fabric_eventhouse.example_definition.definition["EventhouseProperties.json"].content)
}
# This is an invalid data source
# Do not specify `id` and `display_name` in the same data source block
# data "fabric_eventhouse" "example" {
Expand All @@ -49,11 +67,17 @@ data "fabric_eventhouse" "example_by_name" {

- `display_name` (String) The Eventhouse display name.
- `id` (String) The Eventhouse ID.
- `output_definition` (Boolean) Output definition parts as gzip base64 content? Default: `false`

!> Your terraform state file may grow a lot if you output definition content. Only use it when you must use data from the definition.

- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts))

### Read-Only

- `definition` (Attributes Map) Definition parts. Possible path keys: `EventhouseProperties.json`. (see [below for nested schema](#nestedatt--definition))
- `description` (String) The Eventhouse description.
- `format` (String) The Eventhouse format. Possible values: `NotApplicable`
- `properties` (Attributes) The Eventhouse properties. (see [below for nested schema](#nestedatt--properties))

<a id="nestedatt--timeouts"></a>
Expand All @@ -64,12 +88,21 @@ Optional:

- `read` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

<a id="nestedatt--definition"></a>

### Nested Schema for `definition`

Read-Only:

- `content` (String) Gzip base64 content of definition part.
Use [`provider::fabric::content_decode`](../functions/content_decode.md) function to decode content.

<a id="nestedatt--properties"></a>

### Nested Schema for `properties`

Read-Only:

- `database_ids` (List of String) The IDs list of KQL Databases.
- `database_ids` (List of String) List of all KQL Database children IDs.
- `ingestion_service_uri` (String) Ingestion service URI.
- `query_service_uri` (String) Query service URI.
11 changes: 11 additions & 0 deletions docs/data-sources/eventhouses.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,15 @@ Read-Only:
- `description` (String) The Eventhouse description.
- `display_name` (String) The Eventhouse display name.
- `id` (String) The Eventhouse ID.
- `properties` (Attributes) The Eventhouse properties. (see [below for nested schema](#nestedatt--values--properties))
- `workspace_id` (String) The Workspace ID.

<a id="nestedatt--values--properties"></a>

### Nested Schema for `values.properties`

Read-Only:

- `database_ids` (List of String) List of all KQL Database children IDs.
- `ingestion_service_uri` (String) Ingestion service URI.
- `query_service_uri` (String) Query service URI.
12 changes: 12 additions & 0 deletions docs/data-sources/kql_databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,16 @@ Read-Only:
- `description` (String) The KQL Database description.
- `display_name` (String) The KQL Database display name.
- `id` (String) The KQL Database ID.
- `properties` (Attributes) The KQL Database properties. (see [below for nested schema](#nestedatt--values--properties))
- `workspace_id` (String) The Workspace ID.

<a id="nestedatt--values--properties"></a>

### Nested Schema for `values.properties`

Read-Only:

- `database_type` (String) The type of the database. Possible values:`ReadWrite`, `Shortcut`.
- `eventhouse_id` (String) Parent Eventhouse ID.
- `ingestion_service_uri` (String) Ingestion service URI.
- `query_service_uri` (String) Query service URI.
22 changes: 22 additions & 0 deletions docs/data-sources/lakehouses.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,26 @@ Read-Only:
- `description` (String) The Lakehouse description.
- `display_name` (String) The Lakehouse display name.
- `id` (String) The Lakehouse ID.
- `properties` (Attributes) The Lakehouse properties. (see [below for nested schema](#nestedatt--values--properties))
- `workspace_id` (String) The Workspace ID.

<a id="nestedatt--values--properties"></a>

### Nested Schema for `values.properties`

Read-Only:

- `default_schema` (String) Default schema of the Lakehouse. This property is returned only for schema enabled Lakehouse.
- `onelake_files_path` (String) OneLake path to the Lakehouse files directory
- `onelake_tables_path` (String) OneLake path to the Lakehouse tables directory.
- `sql_endpoint_properties` (Attributes) An object containing the properties of the SQL endpoint. (see [below for nested schema](#nestedatt--values--properties--sql_endpoint_properties))

<a id="nestedatt--values--properties--sql_endpoint_properties"></a>

### Nested Schema for `values.properties.sql_endpoint_properties`

Read-Only:

- `connection_string` (String) SQL endpoint connection string.
- `id` (String) SQL endpoint ID.
- `provisioning_status` (String) The SQL endpoint provisioning status.
6 changes: 3 additions & 3 deletions docs/data-sources/warehouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ Optional:

Read-Only:

- `connection_string` (String) Connection String
- `created_date` (String) Created Date
- `last_updated_time` (String) Last Updated Time
- `connection_string` (String) The SQL connection string connected to the workspace containing this warehouse.
- `created_date` (String) The date and time the warehouse was created.
- `last_updated_time` (String) The date and time the warehouse was last updated.
11 changes: 11 additions & 0 deletions docs/data-sources/warehouses.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,15 @@ Read-Only:
- `description` (String) The Warehouse description.
- `display_name` (String) The Warehouse display name.
- `id` (String) The Warehouse ID.
- `properties` (Attributes) The Warehouse properties. (see [below for nested schema](#nestedatt--values--properties))
- `workspace_id` (String) The Workspace ID.

<a id="nestedatt--values--properties"></a>

### Nested Schema for `values.properties`

Read-Only:

- `connection_string` (String) The SQL connection string connected to the workspace containing this warehouse.
- `created_date` (String) The date and time the warehouse was created.
- `last_updated_time` (String) The date and time the warehouse was last updated.
8 changes: 4 additions & 4 deletions docs/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
page_title: "fabric_environment Resource - terraform-provider-fabric"
subcategory: ""
description: |-
This resource manages a Fabric Environment.
See Environment https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment for more information.
Manage a Fabric Environment.
Use this resource to manage an Environment https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment.
-> This item supports Service Principal authentication.
---

# fabric_environment (Resource)

This resource manages a Fabric Environment.
Manage a Fabric Environment.

See [Environment](https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment) for more information.
Use this resource to manage an [Environment](https://learn.microsoft.com/fabric/data-engineering/create-and-use-environment).

-> This item supports Service Principal authentication.

Expand Down
Loading

0 comments on commit 3e2ca4c

Please sign in to comment.