-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path__main__.py
36 lines (29 loc) · 1.03 KB
/
__main__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import pulumi
import pulumi_openttd
config = pulumi.Config()
global_stack = pulumi.StackReference(f"{pulumi.get_organization()}/global-config/prod")
pulumi_openttd.autotag.register()
sentry_key = pulumi_openttd.get_sentry_key(
"dibridge", global_stack.get_output("sentry_ingest_hostname"), global_stack.get_output("domain")
)
SETTINGS = {
"discord_channel_id": config.require("discord-channel-id"),
"discord_token": config.require_secret("discord-token"),
"irc_channel": config.require("irc-channel"),
"irc_host": config.require("irc-host"),
"irc_nick": config.require("irc-nick"),
"memory_max": config.require("memory-max"),
"memory": config.require("memory"),
"sentry_dsn": sentry_key,
"sentry_environment": config.require("sentry-environment"),
"stack": pulumi_openttd.get_stack(),
}
service = pulumi_openttd.NomadService(
"dibridge",
pulumi_openttd.NomadServiceArgs(
dependencies=[],
repository="dibridge",
service="dibridge",
settings=SETTINGS,
),
)