73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
---
|
|
trigger:
|
|
- none
|
|
|
|
parameters:
|
|
- name: target_azdo_project
|
|
displayName: Target AZDO Project (Business Unit / AZDO Functionality / Azdo Project)
|
|
type: string
|
|
values:
|
|
- lcu/pipelines/platform
|
|
- lcu/pipelines/letters_and_notices_integration
|
|
- lcu/pipelines/repo
|
|
- lcu/pipelines/unified_opt_in
|
|
- lcu/pipelines/incentive_log
|
|
default: lcu/pipelines/platform
|
|
|
|
- name: tf_operation
|
|
displayName: Terraform operation to perform
|
|
type: string
|
|
default: state list
|
|
values:
|
|
- state list
|
|
- state import
|
|
- state rm
|
|
|
|
- name: tf_additional_command_options
|
|
displayName: Options to pass to the Terraform Operation
|
|
type: string
|
|
default: ' '
|
|
|
|
- name: resource_address
|
|
displayName: (Optional) the Terraform resource name we are importing to state (state import, state mv, state rm)
|
|
type: string
|
|
default: ' '
|
|
|
|
- name: resource_destination_address
|
|
displayName: (Optional) Resource Destination Address (state mv)
|
|
type: string
|
|
default: ' '
|
|
|
|
- name: resource_id
|
|
displayName: (Optional) the Azure resource ID to import to (state import)
|
|
type: string
|
|
default: ' '
|
|
|
|
variables:
|
|
- template: ./azure-tf-pvars.yaml
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: azdo_pipeline_templates
|
|
type: git
|
|
name: Infrastructure Platform/azdo-pipeline-templates
|
|
ref: main
|
|
- repository: shared_terraform_configurations
|
|
type: git
|
|
name: Infrastructure Platform/shared-terraform-configurations
|
|
ref: main
|
|
- repository: shared_platform_terraform_modules
|
|
type: git
|
|
name: Infrastructure Platform/shared-platform-terraform-modules
|
|
ref: main
|
|
|
|
stages:
|
|
- template: terraform-utility.yaml@azdo_pipeline_templates
|
|
parameters:
|
|
tf_operation: ${{ parameters.tf_operation }}
|
|
tf_additional_command_options: ${{ parameters.tf_additional_command_options }}
|
|
resource_address: ${{ parameters.resource_address }}
|
|
resource_destination_address: ${{ parameters.resource_destination_address }}
|
|
resource_id: ${{ parameters.resource_id }}
|
|
tf_workspace: azdo-${{ replace(parameters.target_azdo_project, '/', '-') }}
|