pulumi-django-azure 1.0.3__py3-none-any.whl → 1.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-django-azure might be problematic. Click here for more details.
- pulumi_django_azure/django_deployment.py +16 -15
- {pulumi_django_azure-1.0.3.dist-info → pulumi_django_azure-1.0.6.dist-info}/METADATA +1 -1
- pulumi_django_azure-1.0.6.dist-info/RECORD +7 -0
- {pulumi_django_azure-1.0.3.dist-info → pulumi_django_azure-1.0.6.dist-info}/WHEEL +1 -1
- pulumi_django_azure-1.0.3.dist-info/RECORD +0 -7
- {pulumi_django_azure-1.0.3.dist-info → pulumi_django_azure-1.0.6.dist-info}/LICENSE +0 -0
- {pulumi_django_azure-1.0.3.dist-info → pulumi_django_azure-1.0.6.dist-info}/top_level.txt +0 -0
|
@@ -14,6 +14,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
14
14
|
tenant_id: str,
|
|
15
15
|
resource_group_name: pulumi.Input[str],
|
|
16
16
|
vnet: azure.network.VirtualNetwork,
|
|
17
|
+
pgsql_sku: azure.dbforpostgresql.SkuArgs,
|
|
17
18
|
pgsql_ip_prefix: str,
|
|
18
19
|
appservice_ip_prefix: str,
|
|
19
20
|
app_service_sku: azure.web.SkuDescriptionArgs,
|
|
@@ -50,7 +51,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
50
51
|
self._cdn_host = self._create_cdn(custom_host=cdn_host)
|
|
51
52
|
|
|
52
53
|
# PostgreSQL resources
|
|
53
|
-
self._create_database(ip_prefix=pgsql_ip_prefix)
|
|
54
|
+
self._create_database(sku=pgsql_sku, ip_prefix=pgsql_ip_prefix)
|
|
54
55
|
|
|
55
56
|
# Subnet for the apps
|
|
56
57
|
self._app_subnet = self._create_subnet(
|
|
@@ -145,7 +146,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
145
146
|
# Return the default CDN host name
|
|
146
147
|
return self._cdn_endpoint.host_name
|
|
147
148
|
|
|
148
|
-
def _create_database(self, ip_prefix: str):
|
|
149
|
+
def _create_database(self, sku: azure.dbforpostgresql.SkuArgs, ip_prefix: str):
|
|
149
150
|
# Create subnet for PostgreSQL
|
|
150
151
|
subnet = self._create_subnet(
|
|
151
152
|
name="pgsql",
|
|
@@ -176,10 +177,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
176
177
|
self._pgsql = azure.dbforpostgresql.Server(
|
|
177
178
|
f"pgsql-{self._name}",
|
|
178
179
|
resource_group_name=self._rg,
|
|
179
|
-
sku=
|
|
180
|
-
name="Standard_B2s",
|
|
181
|
-
tier=azure.dbforpostgresql.SkuTier.BURSTABLE,
|
|
182
|
-
),
|
|
180
|
+
sku=sku,
|
|
183
181
|
version="16",
|
|
184
182
|
auth_config=azure.dbforpostgresql.AuthConfigArgs(
|
|
185
183
|
password_auth=azure.dbforpostgresql.PasswordAuthEnum.DISABLED,
|
|
@@ -260,8 +258,6 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
260
258
|
# azure.web.NameValuePairArgs(name="WEBSITE_HTTPLOGGING_RETENTION_DAYS", value="7"),
|
|
261
259
|
# pgAdmin settings
|
|
262
260
|
azure.web.NameValuePairArgs(name="PGADMIN_DISABLE_POSTFIX", value="true"),
|
|
263
|
-
azure.web.NameValuePairArgs(name="PGADMIN_AUTHENTICATION_SOURCES", value="['oauth2, 'internal']"),
|
|
264
|
-
azure.web.NameValuePairArgs(name="PGADMIN_OAUTH2_NAME", value="azure"),
|
|
265
261
|
azure.web.NameValuePairArgs(name="PGADMIN_DEFAULT_EMAIL", value="dbadmin@dbadmin.net"),
|
|
266
262
|
azure.web.NameValuePairArgs(name="PGADMIN_DEFAULT_PASSWORD", value="dbadmin"),
|
|
267
263
|
],
|
|
@@ -357,10 +353,11 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
357
353
|
:param storage_account: The storage account
|
|
358
354
|
:return: The access keys
|
|
359
355
|
"""
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
356
|
+
keys = pulumi.Output.all(self._rg, storage_account.name).apply(
|
|
357
|
+
lambda args: azure.storage.list_storage_account_keys(
|
|
358
|
+
resource_group_name=args[0],
|
|
359
|
+
account_name=args[1],
|
|
360
|
+
)
|
|
364
361
|
)
|
|
365
362
|
|
|
366
363
|
return keys.keys
|
|
@@ -533,8 +530,12 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
533
530
|
scope=self._storage_account.id,
|
|
534
531
|
)
|
|
535
532
|
|
|
536
|
-
# Create a CORS
|
|
537
|
-
|
|
533
|
+
# Create a CORS rules for this website
|
|
534
|
+
if website_hosts:
|
|
535
|
+
origins = [f"https://{host}" for host in website_hosts]
|
|
536
|
+
else:
|
|
537
|
+
origins = ["*"]
|
|
538
|
+
|
|
538
539
|
azure.storage.BlobServiceProperties(
|
|
539
540
|
f"sa-{name}-blob-properties",
|
|
540
541
|
resource_group_name=self._rg,
|
|
@@ -545,7 +546,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
545
546
|
azure.storage.CorsRuleArgs(
|
|
546
547
|
allowed_headers=["*"],
|
|
547
548
|
allowed_methods=["GET", "OPTIONS", "HEAD"],
|
|
548
|
-
allowed_origins=
|
|
549
|
+
allowed_origins=origins,
|
|
549
550
|
exposed_headers=["Access-Control-Allow-Origin"],
|
|
550
551
|
max_age_in_seconds=86400,
|
|
551
552
|
)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pulumi_django_azure/__init__.py,sha256=tXTvPfr8-Nll5cjMyY9yj_0z_PQ0XAcxihzHRCES-hU,63
|
|
2
|
+
pulumi_django_azure/django_deployment.py,sha256=G41_JrvkyEwuzEHxirC6xRUiu64_L28rwm8XsphWpp0,23156
|
|
3
|
+
pulumi_django_azure-1.0.6.dist-info/LICENSE,sha256=NX2LN3U319Zaac8b7ZgfNOco_nTBbN531X_M_13niSg,1087
|
|
4
|
+
pulumi_django_azure-1.0.6.dist-info/METADATA,sha256=jnYAd1tB3vTwOa2snWf0VWbnQgvXAuzCQmrznUdmKhM,7887
|
|
5
|
+
pulumi_django_azure-1.0.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
6
|
+
pulumi_django_azure-1.0.6.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
7
|
+
pulumi_django_azure-1.0.6.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pulumi_django_azure/__init__.py,sha256=tXTvPfr8-Nll5cjMyY9yj_0z_PQ0XAcxihzHRCES-hU,63
|
|
2
|
-
pulumi_django_azure/django_deployment.py,sha256=y9xdV2bn2BgjUwt80kJDDpXypWk_qfKbnszlnW-rjd0,23241
|
|
3
|
-
pulumi_django_azure-1.0.3.dist-info/LICENSE,sha256=NX2LN3U319Zaac8b7ZgfNOco_nTBbN531X_M_13niSg,1087
|
|
4
|
-
pulumi_django_azure-1.0.3.dist-info/METADATA,sha256=WUtNjjn6aHhx2aw3dkBVJzbTWEl8efOlBg9IYuKdsrc,7887
|
|
5
|
-
pulumi_django_azure-1.0.3.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
6
|
-
pulumi_django_azure-1.0.3.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
7
|
-
pulumi_django_azure-1.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|