Sha256: f5daf31b3961ca14880c4b45d60281094e7cd7de6b21884efac268ee0ba0b5c4
Contents?: true
Size: 762 Bytes
Versions: 16
Compression:
Stored size: 762 Bytes
Contents
# frozen_string_literal: true module RubyTerraform class Output class << self def for(parameters) Dir.chdir(create_config_directory(parameters)) do RubyTerraform.init(backend_config: parameters[:backend_config]) RubyTerraform.output(name: parameters[:name]) end end private def create_config_directory(parameters) source_directory = parameters[:source_directory] work_directory = parameters[:work_directory] configuration_directory = File.join(work_directory, source_directory) FileUtils.mkdir_p File.dirname(configuration_directory) FileUtils.cp_r source_directory, configuration_directory configuration_directory end end end end
Version data entries
16 entries across 16 versions & 1 rubygems