Skip to content

Terraform module to automate the process of setting up Azure DevOps for Terraform Azure project.

License

Notifications You must be signed in to change notification settings

bayupw/terraform-azuredevops-azurerm-tf-bootstrap

Repository files navigation

Terraform Azure DevOps Bootstrap Module

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

Prerequisites

Before using this module, ensure you have the following:

Sample usage

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/"
}

Contributing

Report issues/questions/feature requests on in the issues section.

License

Apache 2 Licensed. See LICENSE for full details.

Reference and Useful Repos

About

Terraform module to automate the process of setting up Azure DevOps for Terraform Azure project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages