Remote state command line

I’m fairly new to terraform and have been reading O’Reily - Up and running with Terraform. The examples include setting remote state backend variables on the commandline which don’t seem to work. Looking at the current documentation remote state backend information seems to be configured as part of the main terraform config now. Has the command line option been removed or am I missing something?

CLI argument is below.

terraform remote config -backend=s3 -backend-config=“bucket=tf_test_state” -backend-config=“key=global/s3/terraform.tfstate” -backend-config=“region=ap-southeast-2” -backend-config=“encrypt=true” validate

Hi @davetayl,

This book seems to have been written for Terraform 0.8 or earlier. The terraform remote config command no longer exists from Terraform 0.9 onwards, because that mechanism was replaced by an in-configuration mechanism for backend settings.

I believe an early release of the Second Edition of this book is now available that is updated for the latest version of Terraform, and should include the updated state backend configuration mechanism.