Class: TerraformConfig::Generator
- Inherits:
-
Object
- Object
- TerraformConfig::Generator
- Defined in:
- lib/core/terraform_config/generator.rb
Overview
rubocop:disable Metrics/ClassLength
Defined Under Namespace
Classes: InvalidTemplateError
Constant Summary collapse
- SUPPORTED_TEMPLATE_KINDS =
%w[gvc secret identity policy volumeset workload auditctx agent].freeze
- WORKLOAD_SPEC_KEYS =
%i[ type containers identity_link default_options local_options rollout_options security_options load_balancer firewall_config support_dynamic_tags job ].freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(config:, template:) ⇒ Generator
constructor
A new instance of Generator.
- #tf_configs ⇒ Object
Constructor Details
#initialize(config:, template:) ⇒ Generator
Returns a new instance of Generator.
24 25 26 27 28 |
# File 'lib/core/terraform_config/generator.rb', line 24 def initialize(config:, template:) @config = config @template = template.deep_underscore_keys.deep_symbolize_keys validate_template_kind! end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
22 23 24 |
# File 'lib/core/terraform_config/generator.rb', line 22 def config @config end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
22 23 24 |
# File 'lib/core/terraform_config/generator.rb', line 22 def template @template end |
Instance Method Details
#tf_configs ⇒ Object
30 31 32 |
# File 'lib/core/terraform_config/generator.rb', line 30 def tf_configs tf_config.locals.merge(filename => tf_config) end |