Class: TerraformWrapper::Shared::Backends::AWS
- Includes:
- Logging
- Defined in:
- lib/terraform-wrapper/shared/backends/aws.rb
Constant Summary collapse
- @@default_class =
'terraform-state'
- @@type =
'aws'
Instance Attribute Summary collapse
-
#bucket ⇒ Object
readonly
Returns the value of attribute bucket.
-
#encrypt ⇒ Object
readonly
Returns the value of attribute encrypt.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#region ⇒ Object
readonly
Returns the value of attribute region.
Instance Method Summary collapse
- #hash ⇒ Object
-
#initialize(options:, variables:) ⇒ AWS
constructor
A new instance of AWS.
Methods included from Logging
configure_logger_for, logger_for
Methods inherited from Common
Constructor Details
#initialize(options:, variables:) ⇒ AWS
Returns a new instance of AWS.
31 32 33 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 31 def initialize(options:, variables:) construct(options: , variables: variables) end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
27 28 29 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 27 def bucket @bucket end |
#encrypt ⇒ Object (readonly)
Returns the value of attribute encrypt.
27 28 29 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 27 def encrypt @encrypt end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 27 def key @key end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
27 28 29 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 27 def region @region end |
Instance Method Details
#hash ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 37 def hash result = {} result['bucket'] = @bucket result['region'] = @region result['key'] = @key result['encrypt'] = @encrypt.to_s result['kms_key_id'] = @kms unless @kms.nil? result['role_arn'] = @role unless @role.nil? result end |