Skip to content

Commit 430f317

Browse files
Add Azure Key Vault resource to backend setup
Introduces an azurerm_key_vault resource named 'dbatoolsci' with RBAC authorization enabled, soft delete retention, and purge protection settings. Also adds data source for current Azure client config.
1 parent acd4226 commit 430f317

File tree

1 file changed

+14
-0
lines changed
  • gh-runners/tests/backend-setup

1 file changed

+14
-0
lines changed

gh-runners/tests/backend-setup/main.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,17 @@ resource "azurerm_storage_container" "tfstate" {
3131
storage_account_name = azurerm_storage_account.tfstate.name
3232
container_access_type = "private"
3333
}
34+
35+
data "azurerm_client_config" "current" {}
36+
37+
resource "azurerm_key_vault" "vmss" {
38+
name = "dbatoolsci"
39+
resource_group_name = azurerm_resource_group.tfstate.name
40+
location = azurerm_resource_group.tfstate.location
41+
tenant_id = data.azurerm_client_config.current.tenant_id
42+
sku_name = "standard"
43+
soft_delete_retention_days = 7
44+
purge_protection_enabled = false
45+
46+
enable_rbac_authorization = true
47+
}

0 commit comments

Comments
 (0)