aboutsummaryrefslogtreecommitdiffhomepage
path: root/dhall
diff options
context:
space:
mode:
authorClement Delafargue <clement.delafargue@fretlink.com>2020-07-01 11:34:40 +0200
committerClement Delafargue <clement.delafargue@fretlink.com>2020-07-02 11:42:35 +0200
commitf642276169b56be94e8537458d0ce2286dc71748 (patch)
treea306c3b326cd673c73dc801b2b62472683d7c783 /dhall
parent90634ee04cc1a4ab983de6bf142f25978463bc4a (diff)
downloadansible-clever-f642276169b56be94e8537458d0ce2286dc71748.tar.gz
ansible-clever-f642276169b56be94e8537458d0ce2286dc71748.tar.zst
ansible-clever-f642276169b56be94e8537458d0ce2286dc71748.zip
Add dhall definitions for linked service dependencies
Diffstat (limited to 'dhall')
-rw-r--r--dhall/Config.dhall4
-rw-r--r--dhall/ServiceDependency.dhall9
-rw-r--r--dhall/package.dhall6
3 files changed, 18 insertions, 1 deletions
diff --git a/dhall/Config.dhall b/dhall/Config.dhall
index 9e46679..1e0f4ae 100644
--- a/dhall/Config.dhall
+++ b/dhall/Config.dhall
@@ -1,5 +1,7 @@
1let Addon = (./Addon.dhall).Type 1let Addon = (./Addon.dhall).Type
2 2
3let ServiceDependency = (./ServiceDependency.dhall).Type
4
3let Vault = ./Vault.dhall 5let Vault = ./Vault.dhall
4 6
5let FixedOrRange = 7let FixedOrRange =
@@ -28,6 +30,7 @@ let Config =
28 , clever_haskell_entry_point : Optional Text 30 , clever_haskell_entry_point : Optional Text
29 , clever_disable_metrics : Bool 31 , clever_disable_metrics : Bool
30 , clever_addons : List Addon 32 , clever_addons : List Addon
33 , clever_service_dependencies : List ServiceDependency
31 , clever_env : Environment 34 , clever_env : Environment
32 , clever_build_flavor : Optional Text 35 , clever_build_flavor : Optional Text
33 , clever_scaling : Optional ScalingParameters 36 , clever_scaling : Optional ScalingParameters
@@ -48,6 +51,7 @@ let mkConfig =
48 , clever_haskell_entry_point = None Text 51 , clever_haskell_entry_point = None Text
49 , clever_disable_metrics = False 52 , clever_disable_metrics = False
50 , clever_addons = [] : List Addon 53 , clever_addons = [] : List Addon
54 , clever_service_dependencies = [] : List ServiceDependency
51 , clever_env = {=} 55 , clever_env = {=}
52 , clever_build_flavor = None Text 56 , clever_build_flavor = None Text
53 , clever_scaling = None ScalingParameters 57 , clever_scaling = None ScalingParameters
diff --git a/dhall/ServiceDependency.dhall b/dhall/ServiceDependency.dhall
new file mode 100644
index 0000000..9cad9b4
--- /dev/null
+++ b/dhall/ServiceDependency.dhall
@@ -0,0 +1,9 @@
1let ServiceDependency =
2 < Addon : { addon_id : Text } | Application : { app_id : Text } >
3
4let addon = λ(addon_id : Text) → ServiceDependency.Addon { addon_id = addon_id }
5
6let application =
7 λ(app_id : Text) → ServiceDependency.Application { app_id = app_id }
8
9in { Type = ServiceDependency, addon = addon, application = application }
diff --git a/dhall/package.dhall b/dhall/package.dhall
index c653ddb..c430b44 100644
--- a/dhall/package.dhall
+++ b/dhall/package.dhall
@@ -1 +1,5 @@
1{ Addon = ./Addon.dhall, Config = ./Config.dhall, Vault = ./Vault.dhall } 1{ Addon = ./Addon.dhall
2, ServiceDependency = ./ServiceDependency.dhall
3, Config = ./Config.dhall
4, Vault = ./Vault.dhall
5}