Skip to content

Commit

Permalink
docs: adjust index.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherNagl committed Aug 17, 2024
1 parent 016de03 commit 81fa799
Showing 1 changed file with 25 additions and 39 deletions.
64 changes: 25 additions & 39 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,53 +18,50 @@ terraform {
required_providers {
microsoftfabric = {
source = "ChristopherNagl/microsoftfabric"
version = "0.3.1"
version = "0.4.1"
}
}
}
# 2. Configure the Microsoft Fabric Provider
provider "microsoftfabric" {
client_id = "xxxx"
client_secret = "xxxx"
tenant_id = "xxxx"
token_file_path = "${path.module}/token.json"
client_id = "xxx"
client_secret = "Txxx"
tenant_id = "9xxx"
username = "xx"
password = "xx"
}
# 3. Create a worksapce
resource "microsoftfabric_workspace" "example" {
name = "terraform_demo"
}
```
##### Step 3 Result:
![Alt text](example_pictures/step3_create_workspace.PNG)
*Figure 1: Step 3 - Result*
```terraform
# 4. Assign capacity to workspace
// to do
// I only have a trial fabric capacity, so I can't implement this for now
```
![Alt text](example_pictures/step4_assign_capacity.PNG)
*Figure 2: Step 4 - Result of manual assign capacity as workaround*
```terraform
# 4. Assign workspace to capacity
resource "microsoftfabric_workspace_capacity_assignment" "workspace_assignment" {
workspace_id = microsoftfabric_workspace.example.id
capacity_id = "xxxxx"
}
# 5. assign user to workspace
resource "microsoftfabric_workspace_user_assignment" "example_assignment" {
workspace_id = microsoftfabric_workspace.example.id # Replace with your workspace ID
users = [
{
email = "AdeleV@3cg7y4.onmicrosoft.com"
role = "Member"
email = "AdeleV@3cg7y4.onmicrosoft.com"
role = "Member"
principal_type = "User"
},
{
email = "f4c6053c-5243-4690-9e1f-f1b5a7558202"
role = "Contributor"
principal_type = "Group"
}
]
}
```
![Alt text](example_pictures/step5_assign_user.PNG)
*Figure 3: Step 5 - Result of assign users to workspace*
```terraform
# 6. Connect workaspace with AzureDevOps
# 6. Connect workspace with AzureDevOps
resource "microsoftfabric_workspace_git" "example_git" {
workspace_id = microsoftfabric_workspace.example.id
Expand All @@ -79,12 +76,8 @@ resource "microsoftfabric_workspace_git" "example_git" {
initialization_strategy = "PreferRemote"
}
```
![Alt text](example_pictures/step6_connect_workspace_git.PNG)
*Figure 4: Step 6 - Result of connect workaspace with AzureDevOps*
```terraform
# 7. Creating reassources for which the RestApi only supports Name and Description so far
# 7. Creating resources for which the RestApi only supports Name and Description so far
resource "microsoftfabric_eventstream" "example_eventstream" {
workspace_id = microsoftfabric_workspace.example.id
name = "Eventstream_demo"
Expand All @@ -102,11 +95,7 @@ resource "microsoftfabric_eventhouse" "example_eventhouse" {
display_name = "example_eventhouse_demo"
description = "An example_eventhouse description"
}
```
![Alt text](example_pictures/step7.PNG)
*Figure 5: Step 7 - Result creating reassources for which the RestApi only supports Name and Description so far*
```terraform
# 8. Create Deployment Pipeline
resource "microsoftfabric_pipeline" "example_pipeline" {
display_name = "example pipeline"
Expand All @@ -120,20 +109,17 @@ resource "microsoftfabric_pipeline" "example_pipeline" {
]
}
```
![Alt text](example_pictures/step8_pipeline.PNG)
*Figure 5: Step 8 - Result of create Deployment Pipeline*
<!-- schema generated by tfplugindocs -->

## Schema

### Required

- `client_id` (String) The Client ID for Power BI API access.
- `client_secret` (String, Sensitive) The Client Secret for Power BI API access.
- `tenant_id` (String) The Tenant ID for Power BI API access.
- `username` (String) The username for Power BI API access.
- `password` (String, Sensitive) The password for Power BI API access.

### Optional

- `token_file_path` (String) The path to the token file, in case that the access token is generated somewhere else

### To do's
- Add option to login with email and password

0 comments on commit 81fa799

Please sign in to comment.