Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:08:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-01 15:08:00 +0300
commit1a0d6dbdc2ac3047f4953a359ef27ba6e26074ae (patch)
treeddb78a8a0d1350dc767f049a21e0f7d37edaa82c /lib/api/terraform
parentb11f7057d067885619ee3e513751f180b2e8ad85 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/terraform')
-rw-r--r--lib/api/terraform/state.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/api/terraform/state.rb b/lib/api/terraform/state.rb
new file mode 100644
index 00000000000..7e55dfedfeb
--- /dev/null
+++ b/lib/api/terraform/state.rb
@@ -0,0 +1,44 @@
+# frozen_string_literal: true
+
+module API
+ module Terraform
+ class State < Grape::API
+ before { authenticate! }
+ before { authorize! :admin_terraform_state, user_project }
+
+ params do
+ requires :id, type: String, desc: 'The ID of a project'
+ end
+ resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
+ params do
+ requires :name, type: String, desc: 'The name of a terraform state'
+ end
+ namespace ':id/terraform/state/:name' do
+ desc 'Get a terraform state by its name'
+ route_setting :authentication, basic_auth_personal_access_token: true
+ get do
+ status 501
+ content_type 'text/plain'
+ body 'not implemented'
+ end
+
+ desc 'Add a new terraform state or update an existing one'
+ route_setting :authentication, basic_auth_personal_access_token: true
+ post do
+ status 501
+ content_type 'text/plain'
+ body 'not implemented'
+ end
+
+ desc 'Delete a terraform state of certain name'
+ route_setting :authentication, basic_auth_personal_access_token: true
+ delete do
+ status 501
+ content_type 'text/plain'
+ body 'not implemented'
+ end
+ end
+ end
+ end
+ end
+end