Remote state Lab

Lab name - Remote state

First, create a simple configuration to create a local_file resource within the directory called RemoteState . The resource block should be created inside the file. Follow the below specifications for provisioning this resource:
Resource Name: state
filename: /root/ <variable local-state>
content: “This configuration uses <variable local-state> state”

Use the variable called local-state in the file which is already created for you and make use of variable interpolation syntax ${..} .
Once the configuration is ready, run a terraform init, plan and apply .


I am using the exact solution mentioned still getting error

Hi @Prayush-Singh,
As per my understanding, file should come under the RemoteState directory.


@Tej-Singh-Rana Thanks . It is fixed now …