profile
viewpoint

Ask questionsPlanned support for refreshing state against the remote state?

I was wondering if there was planned support for refreshing state against the remote state? Currently the only diff the provider sees is when the local TF file changes vs the tfstate file. I wasn't sure if maybe it was left out intentionally for some reason.

I've mainly only used the AWS provider and it refreshes against the remote state. Also it seems to be a standard thing: https://www.terraform.io/docs/extend/best-practices/detecting-drift.html

I ask because I've grown accustomed to creating/importing an AWS resource then making changes in the AWS console (the api and settings are complicated and sometimes it's just easier to use the console) then running terraform plan and using the diff to see what I need to set in my terraform file to get it to do what I want.

I planned to use this provider for the product I work on but I can't because I don't want to unknowingly blow away changes in the system because someone made a change in the UI and didn't use TF.

Mastercard/terraform-provider-restapi

Answer questions SvenHamers

@DRuggeri we could just use a string input where the user can copy the json layout they want to have in the state (just let them remove the things they don't want) create a dynamic struct https://github.com/Ompluscator/dynamic-struct by iterating over the json object and save this to the state, on plan compare by hash

useful!

Related questions

Unable to view any output hot 1
source:https://uonfu.com/
Github User Rank List