Class: Manifold::Terraform::WorkspaceConfiguration
- Inherits:
-
Configuration
- Object
- Configuration
- Manifold::Terraform::WorkspaceConfiguration
- Defined in:
- lib/manifold/terraform/workspace_configuration.rb
Overview
Represents a Terraform configuration for a Manifold workspace.
Instance Attribute Summary collapse
-
#dimensions_config ⇒ Object
writeonly
Sets the attribute dimensions_config.
-
#manifold_config ⇒ Object
writeonly
Sets the attribute manifold_config.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add_vector(vector_config) ⇒ Object
- #as_json ⇒ Object
-
#initialize(name) ⇒ WorkspaceConfiguration
constructor
A new instance of WorkspaceConfiguration.
Methods inherited from Configuration
Constructor Details
#initialize(name) ⇒ WorkspaceConfiguration
Returns a new instance of WorkspaceConfiguration.
169 170 171 172 173 174 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 169 def initialize(name) super() @name = name @vectors = [] @dimensions_config = nil end |
Instance Attribute Details
#dimensions_config=(value) ⇒ Object (writeonly)
Sets the attribute dimensions_config
167 168 169 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 167 def dimensions_config=(value) @dimensions_config = value end |
#manifold_config=(value) ⇒ Object (writeonly)
Sets the attribute manifold_config
167 168 169 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 167 def manifold_config=(value) @manifold_config = value end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
166 167 168 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 166 def name @name end |
Instance Method Details
#add_vector(vector_config) ⇒ Object
176 177 178 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 176 def add_vector(vector_config) @vectors << vector_config end |
#as_json ⇒ Object
180 181 182 183 184 185 186 187 188 189 |
# File 'lib/manifold/terraform/workspace_configuration.rb', line 180 def as_json { "variable" => variables_block, "resource" => { "google_bigquery_dataset" => dataset_config, "google_bigquery_table" => TableConfigBuilder.new(name, @manifold_config).build_table_configs, "google_bigquery_routine" => routine_config }.compact } end |