How to prevent asking for resource creation

I have already created storage account when it prompts I provided details resource group and location details etc.
My requirement is over, but when I tried to work on other resource & creating other resource prompting for storage account creation details and then it is going to respective resource.

How do I stop asking and prevention of storage account creation? Please suggest.

Hi @sk8228402,
Terraform is asking for variable name because if you set a different name from the resource you have created before, it will be replaced. If you try inserting the same name of the resource created, the apply will go on.

Terraform asks for variable names that are present in files, an alternative is provide a file with .tfvars extension where you can insert values for variables in

The apply command will be terraform apply -var-file="main.tfvars". In this way Terraform won’t ask all the time to provide variable name.

Tell me if everything is clear


Hi Luca,

I copied variables from file and paste in the file called main.tfvars as per your suggestion. looks like variables are not being recognized. Please suggest further. Please find below screenshot.

main.tfvars has to be done like this

region="insert your value here"
ResourceGroup="insert your value here"
Storage_Account_Name="insert your value here"