class TerraformHttpBackendController < ApplicationController skip_before_action :verify_authenticity_token def create TerraformState.create(data: params) render json: '{ "success": true }', status: 200 end def show state = TerraformState.last if state.nil? render json: '{}', status: 404 else render json: state.data, status: 200 end end def destroy TerraformState.delete_all render json: '{ "success": true }', status: 200 end end