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.
38 39 40 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 38 def initialize(options:, variables:) construct(options: , variables: variables) end |
Instance Attribute Details
#bucket ⇒ Object (readonly)
Returns the value of attribute bucket.
31 32 33 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 31 def bucket @bucket end |
#encrypt ⇒ Object (readonly)
Returns the value of attribute encrypt.
32 33 34 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 32 def encrypt @encrypt end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
33 34 35 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 33 def key @key end |
#region ⇒ Object (readonly)
Returns the value of attribute region.
34 35 36 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 34 def region @region end |
Instance Method Details
#hash ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/terraform-wrapper/shared/backends/aws.rb', line 44 def hash() result = Hash.new 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? return result end |