Module: Terrafying::State
- Defined in:
- lib/terrafying/state.rb
Defined Under Namespace
Classes: LocalStateStore
Constant Summary collapse
- STATE_FILENAME =
'terraform.tfstate'
Class Method Summary collapse
Class Method Details
.local(config) ⇒ Object
17 18 19 |
# File 'lib/terrafying/state.rb', line 17 def self.local(config) LocalStateStore.new(config.path) end |
.remote(config) ⇒ Object
21 22 23 |
# File 'lib/terrafying/state.rb', line 21 def self.remote(config) Terrafying::DynamoDb::StateStore.new(config.scope) end |
.store(config) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/terrafying/state.rb', line 9 def self.store(config) if LocalStateStore.has_local_state?(config) local(config) else remote(config) end end |