debian-mirror-gitlab/app/graphql/mutations/terraform/state/delete.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
413 B
Ruby
Raw Normal View History

2021-01-29 00:20:46 +05:30
# frozen_string_literal: true
module Mutations
module Terraform
module State
class Delete < Base
graphql_name 'TerraformStateDelete'
def resolve(id:)
state = authorized_find!(id: id)
2022-07-23 23:45:48 +05:30
response = ::Terraform::States::TriggerDestroyService.new(state, current_user: current_user).execute
2021-01-29 00:20:46 +05:30
2022-07-23 23:45:48 +05:30
{ errors: response.errors }
2021-01-29 00:20:46 +05:30
end
end
end
end
end