summaryrefslogtreecommitdiff
path: root/lib/api/terraform
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/terraform')
-rw-r--r--lib/api/terraform/state.rb4
-rw-r--r--lib/api/terraform/state_version.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/terraform/state.rb b/lib/api/terraform/state.rb
index 3dbde4639ca..c664c0a4590 100644
--- a/lib/api/terraform/state.rb
+++ b/lib/api/terraform/state.rb
@@ -7,6 +7,8 @@ module API
class State < ::API::Base
include ::Gitlab::Utils::StrongMemoize
+ feature_category :infrastructure_as_code
+
default_format :json
before do
@@ -51,7 +53,7 @@ module API
no_content! if data.empty?
remote_state_handler.handle_with_lock do |state|
- state.update_file!(CarrierWaveStringFile.new(data), version: params[:serial])
+ state.update_file!(CarrierWaveStringFile.new(data), version: params[:serial], build: current_authenticated_job)
end
body false
diff --git a/lib/api/terraform/state_version.rb b/lib/api/terraform/state_version.rb
index b4a0efd7a2b..d3680323b9f 100644
--- a/lib/api/terraform/state_version.rb
+++ b/lib/api/terraform/state_version.rb
@@ -5,6 +5,8 @@ module API
class StateVersion < ::API::Base
default_format :json
+ feature_category :infrastructure_as_code
+
before do
authenticate!
authorize! :read_terraform_state, user_project