pulumi-django-azure 1.0.27__py3-none-any.whl → 1.0.29__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 +19 -3
- pulumi_django_azure/management/commands/purge_cdn.py +1 -0
- {pulumi_django_azure-1.0.27.dist-info → pulumi_django_azure-1.0.29.dist-info}/METADATA +3 -3
- {pulumi_django_azure-1.0.27.dist-info → pulumi_django_azure-1.0.29.dist-info}/RECORD +6 -6
- {pulumi_django_azure-1.0.27.dist-info → pulumi_django_azure-1.0.29.dist-info}/WHEEL +1 -1
- {pulumi_django_azure-1.0.27.dist-info → pulumi_django_azure-1.0.29.dist-info}/top_level.txt +0 -0
|
@@ -68,6 +68,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
68
68
|
app_service_sku: azure.web.SkuDescriptionArgs,
|
|
69
69
|
storage_account_name: str,
|
|
70
70
|
storage_allowed_origins: Sequence[str] | None = None,
|
|
71
|
+
pgsql_parameters: dict[str, str] | None = None,
|
|
71
72
|
pgadmin_access_ip: Sequence[str] | None = None,
|
|
72
73
|
pgadmin_dns_zone: azure.dns.Zone | None = None,
|
|
73
74
|
cache_ip_prefix: str | None = None,
|
|
@@ -88,6 +89,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
88
89
|
:param app_service_sku: The SKU for the app service plan.
|
|
89
90
|
:param storage_account_name: The name of the storage account. Should be unique across Azure.
|
|
90
91
|
:param storage_allowed_origins: The origins (hosts) to allow access through CORS policy. You can specify '*' to allow all.
|
|
92
|
+
:param pgsql_parameters: The parameters to set on the PostgreSQL server. (optional)
|
|
91
93
|
:param pgadmin_access_ip: The IP addresses to allow access to pgAdmin. If empty, all IP addresses are allowed.
|
|
92
94
|
:param pgadmin_dns_zone: The Azure DNS zone to a pgadmin DNS record in. (optional)
|
|
93
95
|
:param cache_ip_prefix: The IP prefix for the cache subnet. (optional)
|
|
@@ -111,7 +113,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
111
113
|
self._cdn_host = self._create_cdn(custom_host=cdn_host)
|
|
112
114
|
|
|
113
115
|
# PostgreSQL resources
|
|
114
|
-
self._create_database(sku=pgsql_sku, ip_prefix=pgsql_ip_prefix)
|
|
116
|
+
self._create_database(sku=pgsql_sku, ip_prefix=pgsql_ip_prefix, parameters=pgsql_parameters)
|
|
115
117
|
|
|
116
118
|
# Cache resources
|
|
117
119
|
if cache_ip_prefix and cache_sku:
|
|
@@ -257,7 +259,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
257
259
|
# Return the default CDN host name
|
|
258
260
|
return self._cdn_endpoint.host_name
|
|
259
261
|
|
|
260
|
-
def _create_database(self, sku: azure.dbforpostgresql.SkuArgs, ip_prefix: str):
|
|
262
|
+
def _create_database(self, sku: azure.dbforpostgresql.SkuArgs, ip_prefix: str, parameters: dict[str, str]):
|
|
261
263
|
# Create subnet for PostgreSQL
|
|
262
264
|
subnet = self._create_subnet(
|
|
263
265
|
name="pgsql",
|
|
@@ -306,6 +308,18 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
306
308
|
),
|
|
307
309
|
)
|
|
308
310
|
|
|
311
|
+
# Add parameters
|
|
312
|
+
if parameters:
|
|
313
|
+
for name, value in parameters.items():
|
|
314
|
+
azure.dbforpostgresql.Configuration(
|
|
315
|
+
f"pgsql-config-{self._name}-{name}",
|
|
316
|
+
resource_group_name=self._rg,
|
|
317
|
+
server_name=self._pgsql.name,
|
|
318
|
+
source="user-override",
|
|
319
|
+
configuration_name=name,
|
|
320
|
+
value=value,
|
|
321
|
+
)
|
|
322
|
+
|
|
309
323
|
pulumi.export("pgsql_host", self._pgsql.fully_qualified_domain_name)
|
|
310
324
|
|
|
311
325
|
def _create_cache(self, sku: azure.redis.SkuArgs, ip_prefix: str):
|
|
@@ -970,7 +984,9 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
970
984
|
azure.web.NameValuePairArgs(name="IS_AZURE_ENVIRONMENT", value="true"),
|
|
971
985
|
# Build settings
|
|
972
986
|
azure.web.NameValuePairArgs(name="SCM_DO_BUILD_DURING_DEPLOYMENT", value="true"),
|
|
973
|
-
azure.web.NameValuePairArgs(name="PRE_BUILD_COMMAND", value="
|
|
987
|
+
azure.web.NameValuePairArgs(name="PRE_BUILD_COMMAND", value="curl -sSL https://bootstrap.django-azu.re | bash"),
|
|
988
|
+
# azure.web.NameValuePairArgs(name="PRE_BUILD_COMMAND", value="cicd/pre_build.sh"),
|
|
989
|
+
# This script will be created by the bootstrap script
|
|
974
990
|
azure.web.NameValuePairArgs(name="POST_BUILD_COMMAND", value="cicd/post_build.sh"),
|
|
975
991
|
azure.web.NameValuePairArgs(name="DISABLE_COLLECTSTATIC", value="true"),
|
|
976
992
|
azure.web.NameValuePairArgs(name="HEALTH_CHECK_PATH", value=self.HEALTH_CHECK_PATH),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pulumi-django-azure
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.29
|
|
4
4
|
Summary: Simply deployment of Django on Azure with Pulumi
|
|
5
5
|
Author-email: Maarten Ureel <maarten@youreal.eu>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -19,9 +19,9 @@ Requires-Dist: django-azure-communication-email<2.0.0,>=1.3.2
|
|
|
19
19
|
Requires-Dist: django-environ<0.13.0,>=0.12.0
|
|
20
20
|
Requires-Dist: django-redis<6.0.0,>=5.4.0
|
|
21
21
|
Requires-Dist: django-storages[azure]<2.0.0,>=1.14.6
|
|
22
|
-
Requires-Dist: pulumi>=3.
|
|
22
|
+
Requires-Dist: pulumi>=3.165.0
|
|
23
23
|
Requires-Dist: pulumi-azure-native>=3.2.0
|
|
24
|
-
Requires-Dist: pulumi-random>=4.18.
|
|
24
|
+
Requires-Dist: pulumi-random>=4.18.1
|
|
25
25
|
Requires-Dist: redis[hiredis]<6.0.0,>=5.2.1
|
|
26
26
|
|
|
27
27
|
# Pulumi Django Deployment
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
pulumi_django_azure/__init__.py,sha256=WoTHLNGnqc3dQoJtzrAJY8OVA7ReP6XFkDb9BXZGfJ8,117
|
|
2
2
|
pulumi_django_azure/azure_helper.py,sha256=eIaOoajwQuIRyt6Q3KHIA1qctLxOqwSF9yurwk2WgzY,3417
|
|
3
|
-
pulumi_django_azure/django_deployment.py,sha256=
|
|
3
|
+
pulumi_django_azure/django_deployment.py,sha256=QM1Uy8wcMoiODHxpM7j6_p8SORk3aKq-LS9-rQPrLsk,50554
|
|
4
4
|
pulumi_django_azure/middleware.py,sha256=Lp05G_wn9vlSueRJsnk-g2Rs9FFG155Po2MP2Cv0LDc,3348
|
|
5
5
|
pulumi_django_azure/settings.py,sha256=BTP5y6KE3oP9pY01TR1ML6GArpLhnzx-mFflrhTQ4SE,5906
|
|
6
6
|
pulumi_django_azure/management/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
pulumi_django_azure/management/commands/purge_cache.py,sha256=yjMoNvEPFmtuZctOKXMUacfKJLlTC9xfF-0W-IH3kF0,488
|
|
8
|
-
pulumi_django_azure/management/commands/purge_cdn.py,sha256=
|
|
9
|
-
pulumi_django_azure-1.0.
|
|
10
|
-
pulumi_django_azure-1.0.
|
|
11
|
-
pulumi_django_azure-1.0.
|
|
12
|
-
pulumi_django_azure-1.0.
|
|
8
|
+
pulumi_django_azure/management/commands/purge_cdn.py,sha256=8iLuqjndvreTHXRp37sjpvcNltdGTpwhY9YiQokS_P0,2095
|
|
9
|
+
pulumi_django_azure-1.0.29.dist-info/METADATA,sha256=LMnw4F46loQLxPtsNqZxauR6zNhwcq4HGR8X3_fdiN0,11212
|
|
10
|
+
pulumi_django_azure-1.0.29.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
11
|
+
pulumi_django_azure-1.0.29.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
12
|
+
pulumi_django_azure-1.0.29.dist-info/RECORD,,
|
|
File without changes
|