Module: Terraform
- Defined in:
- lib/terraform.rb,
lib/terraform/dsl.rb,
lib/terraform/version.rb
Defined Under Namespace
Modules: DSL
Constant Summary collapse
- VERSION =
"0.0.8"
- @@plugin_files =
Set.new [File.(File.join(File.dirname(__FILE__), "terraform/dsl.rb"))]
Class Method Summary collapse
- .register_plugin(path) ⇒ Object
-
.write_dsl_file(path) ⇒ Object
DEPRECATED Replaced by ‘write_terraform_files`.
- .write_terraform_files(path) ⇒ Object
Class Method Details
.register_plugin(path) ⇒ Object
15 |
# File 'lib/terraform.rb', line 15 def self.register_plugin(path) @@plugin_files.add(path) end |
.write_dsl_file(path) ⇒ Object
DEPRECATED Replaced by ‘write_terraform_files`. Remove in next major version release. Writes the terraform_dsl.rb to the given file or directory.
8 9 10 11 12 |
# File 'lib/terraform.rb', line 8 def self.write_dsl_file(path) puts "WARNING: `Terraform.write_dsl_file` is deprecated. Instead use `Terraform.write_terraform_files`." path = File.join(path, "terraform_dsl.rb") if File.directory?(path) FileUtils.cp(File.(File.join(File.dirname(__FILE__), "terraform/dsl.rb")), path) end |
.write_terraform_files(path) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/terraform.rb', line 17 def self.write_terraform_files(path) FileUtils.mkdir_p(path) @@plugin_files.each do |plugin| FileUtils.cp(File.(plugin), File.join(path, File.basename(plugin))) end end |