forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__main__.py
33 lines (28 loc) · 861 Bytes
/
__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
from pulumi_azure import core, appservice, containerservice
from pulumi import export, Output
resource_group = core.ResourceGroup("samples")
plan = appservice.Plan(
"linux-apps",
resource_group_name=resource_group.name,
kind="Linux",
reserved="true",
sku={
"tier": "Basic",
"size": "B1",
})
docker_image = "microsoft/azure-appservices-go-quickstart"
hello_app = appservice.AppService(
"hello-app",
resource_group_name=resource_group.name,
app_service_plan_id=plan.id,
app_settings={
"WEBSITES_ENABLE_APP_SERVICE_STORAGE": "false",
},
site_config={
"always_on": "true",
"linux_fx_version": "DOCKER|%s" % docker_image,
},
https_only="true")
export("hello_endpoint", hello_app.default_site_hostname.apply(
lambda endpoint: "https://" + endpoint + "/hello"
))