Module: Kitchen::Pulumi

Defined in:
lib/kitchen/pulumi.rb,
lib/kitchen/pulumi/error.rb,
lib/kitchen/pulumi/inspec.rb,
lib/kitchen/pulumi/system.rb,
lib/kitchen/pulumi/command.rb,
lib/kitchen/pulumi/shell_out.rb,
lib/kitchen/pulumi/configurable.rb,
lib/kitchen/pulumi/command/input.rb,
lib/kitchen/pulumi/command/output.rb,
lib/kitchen/pulumi/config_schemas.rb,
lib/kitchen/pulumi/config_attribute.rb,
lib/kitchen/pulumi/kitchen_instance.rb,
lib/kitchen/pulumi/inspec_with_hosts.rb,
lib/kitchen/pulumi/config_schemas/hash.rb,
lib/kitchen/pulumi/inspec_without_hosts.rb,
lib/kitchen/pulumi/config_schemas/string.rb,
lib/kitchen/pulumi/config_schemas/system.rb,
lib/kitchen/pulumi/inspec_options_mapper.rb,
lib/kitchen/pulumi/system_attrs_resolver.rb,
lib/kitchen/pulumi/system_hosts_resolver.rb,
lib/kitchen/pulumi/config_attribute/color.rb,
lib/kitchen/pulumi/config_schemas/boolean.rb,
lib/kitchen/pulumi/config_schemas/systems.rb,
lib/kitchen/pulumi/config_attribute/config.rb,
lib/kitchen/pulumi/config_attribute_cacher.rb,
lib/kitchen/pulumi/config_attribute/backend.rb,
lib/kitchen/pulumi/config_attribute/plugins.rb,
lib/kitchen/pulumi/config_attribute/secrets.rb,
lib/kitchen/pulumi/config_attribute/systems.rb,
lib/kitchen/pulumi/config_attribute_definer.rb,
lib/kitchen/pulumi/config_attribute/directory.rb,
lib/kitchen/pulumi/config_attribute/fail_fast.rb,
lib/kitchen/pulumi/config_attribute/config_file.rb,
lib/kitchen/pulumi/config_schemas/array_of_hashes.rb,
lib/kitchen/pulumi/config_attribute/refresh_config.rb,
lib/kitchen/pulumi/config_attribute/preserve_config.rb,
lib/kitchen/pulumi/config_attribute/stack_evolution.rb,
lib/kitchen/pulumi/config_attribute/test_stack_name.rb,
lib/kitchen/pulumi/config_attribute/secrets_provider.rb,
lib/kitchen/pulumi/config_schemas/stack_settings_hash.rb,
lib/kitchen/pulumi/file_path_config_attribute_definer.rb,
lib/kitchen/pulumi/config_schemas/config_evolution_array.rb

Overview

Namespace for Kitchen-Pulumi logic

Author:

  • Jacob Learned

Defined Under Namespace

Modules: Command, ConfigAttribute, ConfigAttributeCacher, ConfigSchemas, Configurable, ShellOut Classes: ConfigAttributeDefiner, Error, FilePathConfigAttributeDefiner, InSpec, InSpecOptionsMapper, InSpecWithHosts, InSpecWithoutHosts, KitchenInstance, System, SystemAttrsResolver, SystemHostsResolver

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.with_temp_conf(config_file = '') {|temp_conf| ... } ⇒ Object

Copies the contents of the given config file to a temporary file and yields the path of the temporary file to the block given

for block {|temp_conf| ... }

Parameters:

  • config_file (String) (defaults to: '')

    the path to the config file to copy into the temp file

Yields:

  • (temp_conf)

    gives the path to the temporary config file


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/kitchen/pulumi.rb', line 17

def self.with_temp_conf(config_file = '')
  temp_conf = Tempfile.new(['kitchen-pulumi', '.yaml'])

  if config_file.empty?
    yield('') if block_given?
  else
    begin
      IO.copy_stream(config_file, temp_conf.path)
      yield(temp_conf.path) if block_given?
    ensure
      temp_conf.close
      temp_conf.unlink
    end
  end
end