pulumi-django-azure 1.0.10__py3-none-any.whl → 1.0.11__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 +21 -3
- {pulumi_django_azure-1.0.10.dist-info → pulumi_django_azure-1.0.11.dist-info}/METADATA +1 -1
- pulumi_django_azure-1.0.11.dist-info/RECORD +7 -0
- pulumi_django_azure-1.0.10.dist-info/RECORD +0 -7
- {pulumi_django_azure-1.0.10.dist-info → pulumi_django_azure-1.0.11.dist-info}/LICENSE +0 -0
- {pulumi_django_azure-1.0.10.dist-info → pulumi_django_azure-1.0.11.dist-info}/WHEEL +0 -0
- {pulumi_django_azure-1.0.10.dist-info → pulumi_django_azure-1.0.11.dist-info}/top_level.txt +0 -0
|
@@ -95,7 +95,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
95
95
|
"""
|
|
96
96
|
|
|
97
97
|
# Put CDN in front
|
|
98
|
-
|
|
98
|
+
self._cdn_profile = azure.cdn.Profile(
|
|
99
99
|
f"cdn-{self._name}",
|
|
100
100
|
resource_group_name=self._rg,
|
|
101
101
|
location="global",
|
|
@@ -125,7 +125,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
125
125
|
],
|
|
126
126
|
is_http_allowed=False,
|
|
127
127
|
is_https_allowed=True,
|
|
128
|
-
profile_name=
|
|
128
|
+
profile_name=self._cdn_profile.name,
|
|
129
129
|
origin_host_header=endpoint_origin,
|
|
130
130
|
origins=[azure.cdn.DeepCreatedOriginArgs(name="origin-storage", host_name=endpoint_origin)],
|
|
131
131
|
query_string_caching_behavior=azure.cdn.QueryStringCachingBehavior.IGNORE_QUERY_STRING,
|
|
@@ -138,7 +138,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
138
138
|
azure.cdn.CustomDomain(
|
|
139
139
|
f"cdn-custom-domain-{self._name}",
|
|
140
140
|
resource_group_name=self._rg,
|
|
141
|
-
profile_name=
|
|
141
|
+
profile_name=self._cdn_profile.name,
|
|
142
142
|
endpoint_name=self._cdn_endpoint.name,
|
|
143
143
|
host_name=custom_host,
|
|
144
144
|
)
|
|
@@ -604,6 +604,8 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
604
604
|
azure.web.NameValuePairArgs(name="AZURE_STORAGE_CONTAINER_MEDIA", value=media_container.name),
|
|
605
605
|
# CDN
|
|
606
606
|
azure.web.NameValuePairArgs(name="CDN_HOST", value=self._cdn_host),
|
|
607
|
+
azure.web.NameValuePairArgs(name="CDN_PROFILE", value=self._cdn_profile.name),
|
|
608
|
+
azure.web.NameValuePairArgs(name="CDN_ENDPOINT", value=self._cdn_endpoint.name),
|
|
607
609
|
# Database settings
|
|
608
610
|
azure.web.NameValuePairArgs(name="DB_HOST", value=self._pgsql.fully_qualified_domain_name),
|
|
609
611
|
azure.web.NameValuePairArgs(name="DB_NAME", value=db.name),
|
|
@@ -695,6 +697,22 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
695
697
|
scope=comms.id,
|
|
696
698
|
)
|
|
697
699
|
|
|
700
|
+
# Grant the app to purge the CDN endpoint
|
|
701
|
+
cdn_role = self._cdn_endpoint.id.apply(
|
|
702
|
+
lambda scope: azure.authorization.get_role_definition(
|
|
703
|
+
role_definition_id="/426e0c7f-0c7e-4658-b36f-ff54d6c29b45",
|
|
704
|
+
scope=scope,
|
|
705
|
+
)
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
azure.authorization.RoleAssignment(
|
|
709
|
+
f"ra-{name}-cdn",
|
|
710
|
+
principal_id=principal_id,
|
|
711
|
+
principal_type=azure.authorization.PrincipalType.SERVICE_PRINCIPAL,
|
|
712
|
+
role_definition_id=cdn_role.id,
|
|
713
|
+
scope=self._cdn_endpoint.id,
|
|
714
|
+
)
|
|
715
|
+
|
|
698
716
|
# Create a CORS rules for this website
|
|
699
717
|
if website_hosts:
|
|
700
718
|
origins = [f"https://{host}" for host in website_hosts]
|
|
@@ -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=A9TfLxTDeag0cFyZEI0Lk_I32CSY-5D5qZdjxFynto4,31119
|
|
3
|
+
pulumi_django_azure-1.0.11.dist-info/LICENSE,sha256=NX2LN3U319Zaac8b7ZgfNOco_nTBbN531X_M_13niSg,1087
|
|
4
|
+
pulumi_django_azure-1.0.11.dist-info/METADATA,sha256=dYzfdMqDAcwtkHdTmBh0OFrHfVIxidJL6sZM5xCvJRM,11083
|
|
5
|
+
pulumi_django_azure-1.0.11.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
6
|
+
pulumi_django_azure-1.0.11.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
7
|
+
pulumi_django_azure-1.0.11.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=SgMLoQ2Jwm8anADzrEjVhtfJVAJrYJYFoaOL9bDZngE,30275
|
|
3
|
-
pulumi_django_azure-1.0.10.dist-info/LICENSE,sha256=NX2LN3U319Zaac8b7ZgfNOco_nTBbN531X_M_13niSg,1087
|
|
4
|
-
pulumi_django_azure-1.0.10.dist-info/METADATA,sha256=rAAqdkW9F0I0OWn7XQA2fHKIpqxmJDQWx39TmH0FEnc,11083
|
|
5
|
-
pulumi_django_azure-1.0.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
6
|
-
pulumi_django_azure-1.0.10.dist-info/top_level.txt,sha256=MNPRJhq-_G8EMCHRkjdcb_xrqzOkmKogXUGV7Ysz3g0,20
|
|
7
|
-
pulumi_django_azure-1.0.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|