Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/ruby_terraform/commands/apply.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ module Commands
# * +:refresh+: when +true+, updates state prior to checking for
# differences; when +false+ uses locally available state; defaults to
# +true+; this has no effect when +:plan+ is provided.
# * +:refresh_only+: when +true+, checks whether remote objects still
# match the outcome of the most recent Terraform apply but does not
# propose any actions to undo any changes made outside of Terraform; this
# has no effect when +:plan+ is provided
# * +:replace+: force replacement of a particular resource instance using
# its resource address. If the apply would've normally produced an update
# or no-op action for this instance, Terraform will replace it instead.
Expand Down Expand Up @@ -105,6 +109,7 @@ def options
-no-color
-parallelism
-refresh
-refresh-only
-replace
-state
-state-out
Expand Down
4 changes: 4 additions & 0 deletions lib/ruby_terraform/commands/plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ module Commands
# * +:refresh+: when +true+, updates state prior to checking for
# differences; when +false+ uses locally available state; defaults to
# +true+; this has no effect when +:plan+ is provided.
# * +:refresh_only+: when +true+, checks whether remote objects still
# match the outcome of the most recent Terraform apply but does not
# propose any actions to undo any changes made outside of Terraform
# * +:replace+: force replacement of a particular resource instance using
# its resource address. If the plan would've normally produced an update
# or no-op action for this instance, Terraform will plan to replace it
Expand Down Expand Up @@ -100,6 +103,7 @@ def options
-out
-parallelism
-refresh
-refresh-only
-replace
-state
-target
Expand Down
1 change: 1 addition & 0 deletions lib/ruby_terraform/options/definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module Options
-list
-lock
-refresh
-refresh-only
-upgrade
-verify-plugins
-write
Expand Down
5 changes: 5 additions & 0 deletions spec/ruby_terraform/commands/apply_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@
described_class, 'apply', :refresh
)

it_behaves_like(
'a command with a boolean option',
described_class, 'apply', :refresh_only
)

it_behaves_like(
'a command with an option',
described_class, 'apply', :state
Expand Down
5 changes: 5 additions & 0 deletions spec/ruby_terraform/commands/plan_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@
described_class, 'plan', :refresh
)

it_behaves_like(
'a command with a boolean option',
described_class, 'plan', :refresh_only
)

it_behaves_like(
'a command with an option',
described_class, 'plan', :state
Expand Down