diff --git a/quickstarts/103-fabric-sql-database/README.md b/quickstarts/103-fabric-sql-database/README.md new file mode 100644 index 0000000..11d4d6b --- /dev/null +++ b/quickstarts/103-fabric-sql-database/README.md @@ -0,0 +1,58 @@ + +# Fabric SQL Database (100 level) + +--- + +## Requirements + +| Name | Version | +|-----------|---------------| +| terraform | >= 1.8, < 2.0 | +| fabric | 1.1.0 | + +## Providers + +| Name | Version | +|--------|---------| +| fabric | 1.1.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|-------------------------------------------------------------------------------------------------------------------------------|-------------| +| [fabric_sql_database.example_sql](https://registry.terraform.io/providers/microsoft/fabric/1.1.0/docs/resources/sql_database) | resource | +| [fabric_workspace.example_workspace](https://registry.terraform.io/providers/microsoft/fabric/1.1.0/docs/resources/workspace) | resource | +| [fabric_capacity.capacity](https://registry.terraform.io/providers/microsoft/fabric/1.1.0/docs/data-sources/capacity) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|-----------------------------|-----------------------------------------|----------|---------|:--------:| +| fabric\_capacity\_name | The existing Fabric Capacity name. | `string` | n/a | yes | +| fabric\_sql\_database\_name | The name of SQL database to be created. | `string` | n/a | yes | +| fabric\_workspace\_name | The name of workspace to be created. | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|---------------------------|-------------------------------------| +| fabric\_sql\_database\_id | The created Fabric SQL database id | +| fabric\_workspace\_id | The created Fabric workspace id | + +## Usage + +Execute example with the following commands: + +```shell +terraform init +terraform apply +``` + +## Limitations and Considerations + +- This example is provided as a sample only and is not intended for production use without further customization. + \ No newline at end of file diff --git a/quickstarts/103-fabric-sql-database/_footer.md b/quickstarts/103-fabric-sql-database/_footer.md new file mode 100644 index 0000000..66479f9 --- /dev/null +++ b/quickstarts/103-fabric-sql-database/_footer.md @@ -0,0 +1,8 @@ +## Usage + +Execute example with the following commands: + +```shell +terraform init +terraform apply +``` diff --git a/quickstarts/103-fabric-sql-database/_header.md b/quickstarts/103-fabric-sql-database/_header.md new file mode 100644 index 0000000..875ea93 --- /dev/null +++ b/quickstarts/103-fabric-sql-database/_header.md @@ -0,0 +1 @@ +# Fabric SQL Database (100 level) diff --git a/quickstarts/103-fabric-sql-database/main.tf b/quickstarts/103-fabric-sql-database/main.tf new file mode 100644 index 0000000..b5165c1 --- /dev/null +++ b/quickstarts/103-fabric-sql-database/main.tf @@ -0,0 +1,17 @@ +# The existing capacity name. +data "fabric_capacity" "capacity" { + display_name = var.fabric_capacity_name +} + +# Create fabric workspace. +resource "fabric_workspace" "example_workspace" { + display_name = var.fabric_workspace_name + description = "Getting started workspace" + capacity_id = data.fabric_capacity.capacity.id +} + +# Create fabric SQL Database. +resource "fabric_sql_database" "example_sql" { + workspace_id = fabric_workspace.example_workspace.id + display_name = var.fabric_sql_database_name +} diff --git a/quickstarts/103-fabric-sql-database/outputs.tf b/quickstarts/103-fabric-sql-database/outputs.tf new file mode 100644 index 0000000..2c7838b --- /dev/null +++ b/quickstarts/103-fabric-sql-database/outputs.tf @@ -0,0 +1,11 @@ +# The created Fabric workspace id +output "fabric_workspace_id" { + value = fabric_workspace.example_workspace.id + description = "The created Fabric workspace id" +} + +# The created Fabric SQL database id +output "fabric_sql_database_id" { + value = fabric_sql_database.example_sql.id + description = "The created Fabric SQL database id" +} diff --git a/quickstarts/103-fabric-sql-database/provider.tf b/quickstarts/103-fabric-sql-database/provider.tf new file mode 100644 index 0000000..fd53291 --- /dev/null +++ b/quickstarts/103-fabric-sql-database/provider.tf @@ -0,0 +1,16 @@ +# We strongly recommend using the required_providers block to set the Fabric Provider source and version being used +terraform { + required_version = ">= 1.8, < 2.0" + required_providers { + fabric = { + source = "microsoft/fabric" + version = "1.1.0" + } + } +} + +# Configure the Microsoft Fabric Terraform Provider +provider "fabric" { + # Configuration options + preview = true # Farbic SQL database is in preview state. +} diff --git a/quickstarts/103-fabric-sql-database/variables.tf b/quickstarts/103-fabric-sql-database/variables.tf new file mode 100644 index 0000000..ce79e4a --- /dev/null +++ b/quickstarts/103-fabric-sql-database/variables.tf @@ -0,0 +1,14 @@ +variable "fabric_workspace_name" { + description = "The name of workspace to be created." + type = string +} + +variable "fabric_sql_database_name" { + description = "The name of SQL database to be created." + type = string +} + +variable "fabric_capacity_name" { + description = "The existing Fabric Capacity name." + type = string +}