Module: Chef::Resource::SslCertificate::Key

Included in:
Chef::Resource::SslCertificate
Defined in:
libraries/resource_ssl_certificate_key.rb

Overview

ssl_certificate Chef Resource key related methods.

Constant Summary collapse

ATTRS =
%w(
  key_name
  key_dir
  key_path
  key_mode
  key_source
  key_bag
  key_item
  key_item_key
  key_encrypted
  key_secret_file
  key_content
  key_length
).freeze
SOURCES =
%w(
  attribute
  data_bag
  chef_vault
  file
  self_signed
).freeze

Instance Method Summary collapse

Instance Method Details

#initialize_key_defaultsObject


63
64
65
# File 'libraries/resource_ssl_certificate_key.rb', line 63

def initialize_key_defaults
  initialize_attribute_defaults(Key::ATTRS)
end

#key_bag(arg = nil) ⇒ Object


87
88
89
# File 'libraries/resource_ssl_certificate_key.rb', line 87

def key_bag(arg = nil)
  set_or_return(:key_bag, arg, kind_of: String)
end

#key_content(arg = nil) ⇒ Object


107
108
109
# File 'libraries/resource_ssl_certificate_key.rb', line 107

def key_content(arg = nil)
  set_or_return(:key_content, arg, kind_of: String)
end

#key_dir(arg = nil) ⇒ Object


71
72
73
# File 'libraries/resource_ssl_certificate_key.rb', line 71

def key_dir(arg = nil)
  set_or_return(:key_dir, arg, kind_of: String)
end

#key_encrypted(arg = nil) ⇒ Object


99
100
101
# File 'libraries/resource_ssl_certificate_key.rb', line 99

def key_encrypted(arg = nil)
  set_or_return(:key_encrypted, arg, kind_of: [TrueClass, FalseClass])
end

#key_item(arg = nil) ⇒ Object


91
92
93
# File 'libraries/resource_ssl_certificate_key.rb', line 91

def key_item(arg = nil)
  set_or_return(:key_item, arg, kind_of: String)
end

#key_item_key(arg = nil) ⇒ Object


95
96
97
# File 'libraries/resource_ssl_certificate_key.rb', line 95

def key_item_key(arg = nil)
  set_or_return(:key_item_key, arg, kind_of: String)
end

#key_length(arg = nil) ⇒ Object


111
112
113
# File 'libraries/resource_ssl_certificate_key.rb', line 111

def key_length(arg = nil)
  set_or_return(:key_length, arg, kind_of: Integer)
end

#key_mode(arg = nil) ⇒ Object


79
80
81
# File 'libraries/resource_ssl_certificate_key.rb', line 79

def key_mode(arg = nil)
  set_or_return(:key_mode, arg, kind_of: [Integer, String])
end

#key_name(arg = nil) ⇒ Object


67
68
69
# File 'libraries/resource_ssl_certificate_key.rb', line 67

def key_name(arg = nil)
  set_or_return(:key_name, arg, kind_of: String, required: true)
end

#key_path(arg = nil) ⇒ Object


75
76
77
# File 'libraries/resource_ssl_certificate_key.rb', line 75

def key_path(arg = nil)
  set_or_return(:key_path, arg, kind_of: String, required: true)
end

#key_secret_file(arg = nil) ⇒ Object


103
104
105
# File 'libraries/resource_ssl_certificate_key.rb', line 103

def key_secret_file(arg = nil)
  set_or_return(:key_secret_file, arg, kind_of: String)
end

#key_source(arg = nil) ⇒ Object


83
84
85
# File 'libraries/resource_ssl_certificate_key.rb', line 83

def key_source(arg = nil)
  set_or_return(:key_source, arg, kind_of: String)
end