Skip to content

Commit

Permalink
Uncomment Terraform import step in workflow to enable resource import…
Browse files Browse the repository at this point in the history
…s for Azure resources
  • Loading branch information
martinyy108 committed Nov 23, 2024
1 parent b64fecc commit 082acc4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ jobs:
CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }}
run: terraform init -upgrade -backend-config="storage_account_name=$STORAGE_ACCOUNT" -backend-config="container_name=$CONTAINER_NAME" -backend-config="resource_group_name=$RESOURCE_GROUP"

# - name: Terraform Import
# id: import
# env:
# ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
# ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
# ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
# ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
# run: |
# terraform import azurerm_virtual_network.example /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/infra-rg/providers/Microsoft.Network/virtualNetworks/my-vnet-01
# terraform import azurerm_virtual_desktop_workspace.workspace /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/workspaces/ws-01
# terraform import azurerm_virtual_desktop_host_pool.hostpool /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/hostPools/pd-hp-01
# terraform import azurerm_log_analytics_workspace.example /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/infra-rg/providers/Microsoft.OperationalInsights/workspaces/mylab-law-01
# terraform import azurerm_virtual_desktop_application_group.desktopapp /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/applicationGroups/desktop-app-group
# terraform import azurerm_virtual_desktop_workspace_application_group_association.workspaceremoteapp "/subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/workspaces/ws-01|/subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/applicationGroups/desktop-app-group"
# continue-on-error: false
- name: Terraform Import
id: import
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
run: |
terraform import azurerm_virtual_network.example /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/infra-rg/providers/Microsoft.Network/virtualNetworks/my-vnet-01
terraform import azurerm_virtual_desktop_workspace.workspace /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/workspaces/ws-01
terraform import azurerm_virtual_desktop_host_pool.hostpool /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/hostPools/pd-hp-01
terraform import azurerm_log_analytics_workspace.example /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/infra-rg/providers/Microsoft.OperationalInsights/workspaces/mylab-law-01
terraform import azurerm_virtual_desktop_application_group.desktopapp /subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/applicationGroups/desktop-app-group
terraform import azurerm_virtual_desktop_workspace_application_group_association.workspaceremoteapp "/subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/workspaces/ws-01|/subscriptions/b8e9db95-46a2-417b-84f4-4fca6c6a9733/resourceGroups/avd-rg/providers/Microsoft.DesktopVirtualization/applicationGroups/desktop-app-group"
continue-on-error: false

- name: Terraform Plan
id: plan
Expand Down

0 comments on commit 082acc4

Please sign in to comment.