Seamlessly Upgrade Azure Terraform to 4.0.0 Without Downtime: Handling Deprecated Resources

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

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

  • @byron_glover
    @byron_glover 2 หลายเดือนก่อน +3

    Thanks for this video. I literally have to do this at work next week and was wondering what the approach might be. A bit tedious that the only option is reimport though. Would it b worth running a plan to see how bad the situation is on the latest version before incrementally upgrading from like 2.x to 3.x ? My project has like 150ish resources, mostly function apps.

    • @azure-terraformer
      @azure-terraformer  2 หลายเดือนก่อน +1

      Glad it was helpful! Definitely do some testing in an isolated workspace! The terraform plan unfortunately only outputs the first deprecated resource it doesn’t output them all.

    • @byron_glover
      @byron_glover 2 หลายเดือนก่อน +1

      @@azure-terraformer Oh that's good to know! In that case, should I just do a "terraform state list" and check each resource in the docs for deprecation? I think there is only like 10 or so which are created many times.

    • @raul3722
      @raul3722 2 หลายเดือนก่อน +1

      @@byron_glover I used this command to list all the deprecations in the current plan (I was in v3.116.0): terraform plan -json | jq '.diagnostic | select( . != null )' | jq '{detail: .detail, filename: .range.filename, start_line: .range.start.line}'

    • @sironjuh
      @sironjuh 2 หลายเดือนก่อน +1

      Just upgraded from 3.x to 4.x and luckily there were no deprecated resources, just the configuration blocks had some changes in naming and values that the new provider expects. So after upgrading the provider, I just renamed/moved those values to the new blocks to match the new setup and Terraform was happy.

    • @azure-terraformer
      @azure-terraformer  2 หลายเดือนก่อน

      @sironjuh good job! Way to be a good steward of your infrastructure and keeping your providers updated! 🙌

  • @Jandi69488
    @Jandi69488 2 หลายเดือนก่อน

    Brother can you do a video on how we can bring over a hand built kubernetes cluster into the kuberntes provider.
    I have lost all the yaml files. And need to replicate what’s currently active.