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.
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.
@@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.
@@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}'
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.
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.
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.
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.
@@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.
@@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}'
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.
@sironjuh good job! Way to be a good steward of your infrastructure and keeping your providers updated! 🙌
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.