This Terraform module automates the process of setting up Azure DevOps for your Terraform Azure project. The module creates:
- Azure DevOps project
- Azure repo with branch policies
- AzureRM Service Connection
- Azure Blob storage for Terraform state-
- Variable groups
- Azure DevOps pipelines
- Publish JUnit test result XML to Azure DevOps pipelines
Before using this module, ensure you have the following:
- Azure DevOps account.
- Azure Devops personal access token.
- Microsoft DevLabs Terraform Task.
- Azure subscription with the necessary permissions and information (Subscription ID, Tenant ID).
- Azure CLI installed locally.
- Terraform installed locally.
module "azuredevops-bootstrap" {
source = "bayupw/azurerm-tf-bootstrap/azuredevops"
version = "1.0.0"
azuredevops_organisation = "<your-org-name>"
azuredevops_token = "<ADO personal token>"
project_name = "<ADO project name>"
project_features = {
"repositories" = "enabled"
"pipelines" = "enabled"
}
create_repo = true
repo_name = "my-tf-repo"
create_service_endpoint = true
service_endpoint_name = "AzureRM Service Endpoint"
tenantid = "<00000000-0000-0000-0000-000000000000>"
subscription_id = "<00000000-0000-0000-0000-000000000000>"
subscription_name = "<My Azure Subscription Name>"
create_storage = true
append_random_string = true
storage_rg_name = "rg-terraform-state-tf"
storage_account_name = "stterraformstate"
storage_container_name = "tfstate"
terraform_blob_key = "terraform.tfstate"
create_variables_group = true
create_pipeline = true
create_branch_policy = true
upload_tf_files = true
tf_file_path = "tf-files/"
}
Report issues/questions/feature requests on in the issues section.
Apache 2 Licensed. See LICENSE for full details.