Skip to content

Commit

Permalink
Fix 101-managed-instance
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Nov 13, 2023
1 parent 1614947 commit 13ee183
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion quickstart/101-managed-instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ resource "azurerm_route_table" "example" {
resource "azurerm_subnet_route_table_association" "example" {
subnet_id = azurerm_subnet.example.id
route_table_id = azurerm_route_table.example.id

depends_on = [azurerm_subnet_network_security_group_association.example]
}

# Create managed instance
Expand All @@ -75,6 +77,8 @@ resource "azurerm_mssql_managed_instance" "main" {
sku_name = var.sku_name
vcores = var.vcores
storage_size_in_gb = var.storage_size_in_gb

depends_on = [azurerm_subnet_route_table_association.example]
}

resource "random_password" "password" {
Expand All @@ -89,4 +93,4 @@ resource "random_password" "password" {
resource "random_pet" "prefix" {
prefix = var.prefix
length = 1
}
}
8 changes: 6 additions & 2 deletions quickstart/101-managed-instance/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ terraform {
}

provider "azurerm" {
features {}
}
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
}

0 comments on commit 13ee183

Please sign in to comment.