namespace :terraform do
  namespace :refresh do
    desc 'Refresh Terraform State - (rake terraform:refresh:default, rake terraform:refresh:default[bastion])'
    task :default, [:role] do |_task, args|
      Orchestrator::Terraform::Cli.command_tfvars('refresh', 'Terraform Refresh', args[:role])
    end
  end
end

desc 'Alias (terraform:refresh:default[item])'
task :tf_refresh, [:role] do |_task, args|
  Rake::Task['terraform:refresh:default'].invoke(args[:role])
end
