Class: TerraformConfig::VolumeSet
- Defined in:
- lib/core/terraform_config/volume_set.rb
Overview
rubocop:disable Metrics/ClassLength
Constant Summary collapse
- PERFORMANCE_CLASSES =
%w[general-purpose-ssd high-throughput-ssd].freeze
- FILE_SYSTEM_TYPES =
%w[xfs ext4].freeze
- MIN_CAPACITY =
10
- MIN_SCALING_FACTOR =
1.1
Constants included from Dsl
Instance Attribute Summary collapse
-
#autoscaling ⇒ Object
readonly
Returns the value of attribute autoscaling.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#file_system_type ⇒ Object
readonly
Returns the value of attribute file_system_type.
-
#gvc ⇒ Object
readonly
Returns the value of attribute gvc.
-
#initial_capacity ⇒ Object
readonly
Returns the value of attribute initial_capacity.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#performance_class ⇒ Object
readonly
Returns the value of attribute performance_class.
-
#snapshots ⇒ Object
readonly
Returns the value of attribute snapshots.
-
#storage_class_suffix ⇒ Object
readonly
Returns the value of attribute storage_class_suffix.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #importable? ⇒ Boolean
-
#initialize(gvc:, name:, initial_capacity:, performance_class:, file_system_type:, storage_class_suffix: nil, description: nil, tags: nil, snapshots: nil, autoscaling: nil) ⇒ VolumeSet
constructor
rubocop:disable Metrics/ParameterLists, Metrics/MethodLength.
- #reference ⇒ Object
- #to_tf ⇒ Object
Methods inherited from Base
Methods included from Dsl
Constructor Details
#initialize(gvc:, name:, initial_capacity:, performance_class:, file_system_type:, storage_class_suffix: nil, description: nil, tags: nil, snapshots: nil, autoscaling: nil) ⇒ VolumeSet
rubocop:disable Metrics/ParameterLists, Metrics/MethodLength
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/core/terraform_config/volume_set.rb', line 13 def initialize( # rubocop:disable Metrics/ParameterLists, Metrics/MethodLength gvc:, name:, initial_capacity:, performance_class:, file_system_type:, storage_class_suffix: nil, description: nil, tags: nil, snapshots: nil, autoscaling: nil ) super() @gvc = gvc @name = name @initial_capacity = initial_capacity @performance_class = performance_class @file_system_type = file_system_type @storage_class_suffix = storage_class_suffix @description = description @tags = @snapshots = snapshots @autoscaling = autoscaling validate_attributes! end |
Instance Attribute Details
#autoscaling ⇒ Object (readonly)
Returns the value of attribute autoscaling.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def autoscaling @autoscaling end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def description @description end |
#file_system_type ⇒ Object (readonly)
Returns the value of attribute file_system_type.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def file_system_type @file_system_type end |
#gvc ⇒ Object (readonly)
Returns the value of attribute gvc.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def gvc @gvc end |
#initial_capacity ⇒ Object (readonly)
Returns the value of attribute initial_capacity.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def initial_capacity @initial_capacity end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def name @name end |
#performance_class ⇒ Object (readonly)
Returns the value of attribute performance_class.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def performance_class @performance_class end |
#snapshots ⇒ Object (readonly)
Returns the value of attribute snapshots.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def snapshots @snapshots end |
#storage_class_suffix ⇒ Object (readonly)
Returns the value of attribute storage_class_suffix.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def storage_class_suffix @storage_class_suffix end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
10 11 12 |
# File 'lib/core/terraform_config/volume_set.rb', line 10 def @tags end |
Instance Method Details
#importable? ⇒ Boolean
41 42 43 |
# File 'lib/core/terraform_config/volume_set.rb', line 41 def importable? true end |
#reference ⇒ Object
45 46 47 |
# File 'lib/core/terraform_config/volume_set.rb', line 45 def reference "cpln_volume_set.#{name}" end |
#to_tf ⇒ Object
49 50 51 52 53 54 55 |
# File 'lib/core/terraform_config/volume_set.rb', line 49 def to_tf block :resource, :cpln_volume_set, name do base_arguments_tf snapshots_tf autoscaling_tf end end |