[
%w[-var].map do |o|
definition(
name: o, option_type: :standard, value_type: :complex,
repeatable: true, separator: ' '
)
end,
%w[-backend-config].map do |o|
definition(
name: o, option_type: :standard, value_type: :complex,
repeatable: true,
override_keys: { singular: false, plural: :backend_config }
)
end,
%w[-var-file -target -platform -plugin-dir -replace -filter].map do |o|
definition(
name: o, option_type: :standard, value_type: :string,
repeatable: true
)
end,
%w[
-auto-approve
-backend
-get
-get-plugins
-input
-list
-lock
-refresh
-upgrade
-verify-plugins
-write
].map do |o|
definition(name: o, option_type: :standard, value_type: :boolean)
end,
%w[
-allow-missing
-allow-missing-config
-check
-compact-warnings
-destroy
-detailed-exitcode
-diff
-draw-cycles
-dry-run
-force
-force-copy
-ignore-remote-version
-json
-migrate-state
-no-color
-or-create
-raw
-reconfigure
-recursive
-update
-verbose
].map do |o|
definition(name: o, option_type: :flag, value_type: :boolean)
end,
%w[
-backup
-backup-out
-cloud-run
-from-module
-fs-mirror
-id
-lock-timeout
-lockfile
-module-depth
-net-mirror
-parallelism
-plan
-provider
-state
-state-out
-test-directory
-type
].map do |o|
definition(name: o, option_type: :standard, value_type: :string)
end,
definition(
name: '-config', option_type: :standard, value_type: :string,
extra_keys: { singular: %i[directory] }
),
definition(
name: '-out', option_type: :standard, value_type: :string,
extra_keys: { singular: %i[plan] }
),
definition(
name: '-chdir', option_type: :standard, value_type: :string,
placement: :after_command,
extra_keys: { singular: %i[working_directory] }
)
].flatten.freeze