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 a22e7cc commit bc16915
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 @@ -23,7 +23,21 @@ jobs:
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.10


- 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
continue-on-error: false

- name: Terraform Init
id: init
env:
Expand All @@ -46,20 +60,6 @@ jobs:
run: terraform plan -no-color
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
# continue-on-error: false

- name: Terraform Show
id: show
env:
Expand Down

0 comments on commit bc16915

Please sign in to comment.