aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-04-07 15:27:38 +0100
committerChristopher Baines <mail@cbaines.net>2018-04-12 08:30:56 +0100
commit2e97d9f957eff4ba66f1c4c65ff0b5156471cf6c (patch)
tree7b55cfce7488fc59d75374e49850829f0931fb76 /config
parent13bf88b2e8e6cec0d2207fe7b92f7446eea49354 (diff)
downloadgovuk-mini-environment-admin-2e97d9f957eff4ba66f1c4c65ff0b5156471cf6c.tar
govuk-mini-environment-admin-2e97d9f957eff4ba66f1c4c65ff0b5156471cf6c.tar.gz
Change mini_environment_id to state_id on TerraformState
To allow supporting tracking related TerraformStates for backends as well.
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e706194..cb7a20c 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -32,9 +32,16 @@ Rails.application.routes.draw do
end
end
- resources :terraform_http_backend,
- controller: :terraform_http_backend,
- except: %i(new edit update)
+ scope :terraform_http_backend do
+ get(
+ '*state_id',
+ to: 'terraform_http_backend#show',
+ format: false,
+ as: 'terraform_http_backend'
+ )
+ post '*state_id', to: 'terraform_http_backend#create', format: false
+ delete '*state_id', to: 'terraform_http_backend#destroy', format: false
+ end
resources :mini_environments, path: '/' do
post '/', to: 'mini_environments#perform_action', as: 'perform_action'