問題文
A working directory was initialized with a local backend. The team now wants the state to live in a shared remote backend, and they want the existing state carried over. What must they do?
選択肢
- Copy the state file over by hand, then change the block.
- Change the backend block and run terraform init with the option that ignores the existing configuration, which will then pick up the state automatically.
- Change the backend block and run terraform apply, which will detect that the state location moved and write the state to the new location as part of the next successful run.
- Change the backend block and run terraform init with the option that copies the existing state to the new backend.