Setup Gitflow and Run Terraform in an Azure DevOps Pipeline

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • EPISODE 8
    Setup an End-to-End Azure DevOps Pipeline and Gitflow process.
    Keep the knowledge flowing!
    www.buymeacoff...
    Source Code:
    github.com/mar...
    AzDO Bash@3 Task:
    learn.microsof...
    Azure ARM Resources Provider
    registry.terra...
    v3.41.0
    registry.terra...
    Additional Providers:
    Random Provider (registry.terra...)
    Terraform Resource List:
    random_string
    azurerm_resource_group
    Azure Resource Naming Conventions
    learn.microsof...

ความคิดเห็น • 9

  • @AminNiktash
    @AminNiktash ปีที่แล้ว +1

    Great content and it would be more practical if we have workspace variables and not just the environment. the PR workflow is awesome :) also wondering how we can pass variables to the ADO pipeline from a third-party like Service Now?

    • @azure-terraformer
      @azure-terraformer  ปีที่แล้ว +1

      What do you mean by workspace variables? I'll have to look into integration with 3p tools! Good idea!

    • @AminNiktash
      @AminNiktash ปีที่แล้ว +1

      @@azure-terraformer I mean lets have option to create or select workspace over pipeline workflow so anytime we reuse the pipeline we will have a new workspace or if we want can just select and modify existing one.
      Example: #!/bin/bash
      echo "*********** Create or select workspace"
      if [ $(terraform workspace list | grep -c "$1") -eq 0 ] ; then
      echo "Create new workspace $1"
      terraform workspace new "$1" -no-color
      else
      echo "Switch to workspace $1"
      terraform workspace select "$1" -no-color
      fi

    • @AminNiktash
      @AminNiktash ปีที่แล้ว

      I used that Bash script on my Yml pipeline multi stage just testing however like to see how we can use it on a more complex scenario workflow, thanks

    • @azure-terraformer
      @azure-terraformer  ปีที่แล้ว +2

      Ah, I see what you mean. There are different schools of thought. While you CAN use the same pipeline to deploy every environment, I prefer having different pipelines (same YAML, different AzDO pipeline) to exercise some command+control around the application / environment you are deploying. It also creates a clean deployment history for that environment in the pipeline run history. Just my opinion, but my recommendation is to be careful about having too much reuse / centralization.

    • @TheDummyHead
      @TheDummyHead ปีที่แล้ว +2

      > "too much reuse / centralization"
      When DRY goes wrong it is so painful to work with 😵

  • @artisticcheese
    @artisticcheese ปีที่แล้ว +1

    What is the purpose of validate in release pipeline?

    • @azure-terraformer
      @azure-terraformer  ปีที่แล้ว +1

      Just an inexpensive check in case Terraform code has gotten nasty somehow. It fails faster then a plan if there are some bad references somewhere.

    • @artisticcheese
      @artisticcheese ปีที่แล้ว +2

      @@azure-terraformer yes, but it runs only after PR was already checked