Skip to content

Commit

Permalink
Merge pull request #12 from OctopusSamples/update-bootstrap-script
Browse files Browse the repository at this point in the history
Changing managed identity from system to user
  • Loading branch information
twerthi authored Jul 31, 2023
2 parents c913839 + 64dc54e commit 3bd2ba9
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ resource "azurerm_network_interface" "windows-worker-nic" {
}
}

resource "azurerm_user_assigned_identity" "database-admin" {
location = var.octopus_azure_location
resource_group_name = var.octopus_azure_resourcegroup_name

name = "samples-database-admin"
}

resource "azurerm_windows_virtual_machine" "samples-windows-worker" {
name = var.octopus_azure_windows_worker_name
location = var.octopus_azure_location
Expand Down Expand Up @@ -109,7 +116,9 @@ resource "azurerm_windows_virtual_machine" "samples-windows-worker" {
#custom_data = "${base64encode(file("../configure-tentacle.ps1"))}"

identity {
type = "SystemAssigned"
#type = "SystemAssigned"
type = "UserAssigned"
identity_ids = [azurerm_user_assigned_identity.database-admin.id]
}

tags = var.tags
Expand Down

0 comments on commit 3bd2ba9

Please sign in to comment.