Method: RubyTerraform::ClassMethods#format
- Defined in:
- lib/ruby_terraform.rb
#format(parameters = {}, invocation_options = {}) ⇒ Object Also known as: fmt
Invokes the terraform fmt command which rewrites all terraform configuration files to a canonical format.
Both configuration files (.tf) and variables files (.tfvars) are updated. JSON files (.tf.json or .tfvars.json) are not modified.
If :directory is not specified in the parameters map then the current working directory will be used. If :directory is “-” then content will be read from the standard input. The given content must be in the terraform language native syntax; JSON is not supported.
255 256 257 258 |
# File 'lib/ruby_terraform.rb', line 255 def format(parameters = {}, = {}) exec(RubyTerraform::Commands::Format, parameters, ) end |