pulumi-django-azure 1.0.15__tar.gz → 1.0.17__tar.gz
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-1.0.15 → pulumi_django_azure-1.0.17}/LICENSE +1 -1
- {pulumi_django_azure-1.0.15/src/pulumi_django_azure.egg-info → pulumi_django_azure-1.0.17}/PKG-INFO +5 -5
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/pyproject.toml +11 -11
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure/django_deployment.py +44 -38
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17/src/pulumi_django_azure.egg-info}/PKG-INFO +5 -5
- pulumi_django_azure-1.0.17/src/pulumi_django_azure.egg-info/requires.txt +3 -0
- pulumi_django_azure-1.0.15/src/pulumi_django_azure.egg-info/requires.txt +0 -3
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/README.md +0 -0
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/setup.cfg +0 -0
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure/__init__.py +0 -0
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure.egg-info/SOURCES.txt +0 -0
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure.egg-info/dependency_links.txt +0 -0
- {pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure.egg-info/top_level.txt +0 -0
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
21
|
+
SOFTWARE.
|
{pulumi_django_azure-1.0.15/src/pulumi_django_azure.egg-info → pulumi_django_azure-1.0.17}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pulumi-django-azure
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.17
|
|
4
4
|
Summary: Simply deployment of Django on Azure with Pulumi
|
|
5
5
|
Author-email: Maarten Ureel <maarten@youreal.eu>
|
|
6
6
|
License: MIT License
|
|
@@ -33,9 +33,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
33
33
|
Requires-Python: >=3.9
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
|
-
Requires-Dist: pulumi>=3.
|
|
37
|
-
Requires-Dist: pulumi-azure-native>=2.
|
|
38
|
-
Requires-Dist: pulumi-random>=4.
|
|
36
|
+
Requires-Dist: pulumi>=3.146.0
|
|
37
|
+
Requires-Dist: pulumi-azure-native>=2.82.0
|
|
38
|
+
Requires-Dist: pulumi-random>=4.17.0
|
|
39
39
|
|
|
40
40
|
# Pulumi Django Deployment
|
|
41
41
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pulumi-django-azure"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.17"
|
|
8
8
|
description = "Simply deployment of Django on Azure with Pulumi"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Maarten Ureel", email = "maarten@youreal.eu" }]
|
|
@@ -16,9 +16,9 @@ classifiers = [
|
|
|
16
16
|
]
|
|
17
17
|
keywords = ["django", "pulumi", "azure"]
|
|
18
18
|
dependencies = [
|
|
19
|
-
"pulumi >=
|
|
20
|
-
"pulumi-azure-native >=
|
|
21
|
-
"pulumi-random >=
|
|
19
|
+
"pulumi (>=3.146.0)",
|
|
20
|
+
"pulumi-azure-native (>=2.82.0)",
|
|
21
|
+
"pulumi-random (>=4.17.0)",
|
|
22
22
|
]
|
|
23
23
|
requires-python = ">=3.9"
|
|
24
24
|
|
|
@@ -27,20 +27,20 @@ Homepage = "https://gitlab.com/MaartenUreel/pulumi-django-azure"
|
|
|
27
27
|
|
|
28
28
|
[tool.poetry]
|
|
29
29
|
name = "pulumi-django-azure"
|
|
30
|
-
version = "1.0.
|
|
30
|
+
version = "1.0.17"
|
|
31
31
|
description = "Simply deployment of Django on Azure with Pulumi"
|
|
32
32
|
authors = ["Maarten Ureel <maarten@youreal.eu>"]
|
|
33
33
|
|
|
34
34
|
[tool.poetry.dependencies]
|
|
35
35
|
python = "^3.11"
|
|
36
|
-
pulumi-azure-native = "
|
|
37
|
-
pulumi = "
|
|
38
|
-
pulumi-random = "
|
|
36
|
+
pulumi-azure-native = ">=2.82.0"
|
|
37
|
+
pulumi = ">=3.146.0"
|
|
38
|
+
pulumi-random = ">=4.17.0"
|
|
39
39
|
|
|
40
40
|
[tool.poetry.group.dev.dependencies]
|
|
41
|
-
twine = "^
|
|
42
|
-
build = "^1.2.2"
|
|
43
|
-
ruff = "^0.
|
|
41
|
+
twine = "^6.0.1"
|
|
42
|
+
build = "^1.2.2.post1"
|
|
43
|
+
ruff = "^0.9.2"
|
|
44
44
|
|
|
45
45
|
[tool.ruff]
|
|
46
46
|
line-length = 140
|
|
@@ -20,6 +20,9 @@ class HostDefinition:
|
|
|
20
20
|
self.zone = zone
|
|
21
21
|
self._identifier = identifier
|
|
22
22
|
|
|
23
|
+
def __eq__(self, other):
|
|
24
|
+
return self.host == other.host and self.zone.name == other.zone.name
|
|
25
|
+
|
|
23
26
|
@property
|
|
24
27
|
def identifier(self) -> str:
|
|
25
28
|
"""
|
|
@@ -62,7 +65,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
62
65
|
vnet: azure.network.VirtualNetwork,
|
|
63
66
|
pgsql_sku: azure.dbforpostgresql.SkuArgs,
|
|
64
67
|
pgsql_ip_prefix: str,
|
|
65
|
-
|
|
68
|
+
app_service_ip_prefix: str,
|
|
66
69
|
app_service_sku: azure.web.SkuDescriptionArgs,
|
|
67
70
|
storage_account_name: str,
|
|
68
71
|
storage_allowed_origins: Optional[Sequence[str]] = None,
|
|
@@ -80,7 +83,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
80
83
|
:param vnet: The virtual network to create the subnets in.
|
|
81
84
|
:param pgsql_sku: The SKU for the PostgreSQL server.
|
|
82
85
|
:param pgsql_ip_prefix: The IP prefix for the PostgreSQL subnet.
|
|
83
|
-
:param
|
|
86
|
+
:param app_service_ip_prefix: The IP prefix for the app service subnet.
|
|
84
87
|
:param app_service_sku: The SKU for the app service plan.
|
|
85
88
|
:param storage_account_name: The name of the storage account. Should be unique across Azure.
|
|
86
89
|
:param storage_allowed_origins: The origins (hosts) to allow access through CORS policy. You can specify '*' to allow all.
|
|
@@ -110,7 +113,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
110
113
|
# Subnet for the apps
|
|
111
114
|
self._app_subnet = self._create_subnet(
|
|
112
115
|
name="app-service",
|
|
113
|
-
prefix=
|
|
116
|
+
prefix=app_service_ip_prefix,
|
|
114
117
|
delegation_service="Microsoft.Web/serverFarms",
|
|
115
118
|
service_endpoints=["Microsoft.Storage"],
|
|
116
119
|
)
|
|
@@ -547,7 +550,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
547
550
|
f"dns-comms-{suffix}-{host.identifier}-domain",
|
|
548
551
|
resource_group_name=self._rg,
|
|
549
552
|
zone_name=host.zone.name,
|
|
550
|
-
relative_record_set_name=
|
|
553
|
+
relative_record_set_name=host.host,
|
|
551
554
|
record_type="TXT",
|
|
552
555
|
ttl=3600,
|
|
553
556
|
txt_records=[
|
|
@@ -559,11 +562,16 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
559
562
|
|
|
560
563
|
# DKIM records (two CNAME records)
|
|
561
564
|
for record in ("d_kim", "d_kim2"):
|
|
565
|
+
if host.host == "@":
|
|
566
|
+
relative_record_set_name = records[record]["name"]
|
|
567
|
+
else:
|
|
568
|
+
relative_record_set_name = f"{records[record]['name']}.{host.host}"
|
|
569
|
+
|
|
562
570
|
r = azure.network.RecordSet(
|
|
563
571
|
f"dns-comms-{suffix}-{host.identifier}-{record}",
|
|
564
572
|
resource_group_name=self._rg,
|
|
565
573
|
zone_name=host.zone.name,
|
|
566
|
-
relative_record_set_name=
|
|
574
|
+
relative_record_set_name=relative_record_set_name,
|
|
567
575
|
record_type="CNAME",
|
|
568
576
|
ttl=records[record]["ttl"],
|
|
569
577
|
cname_record=azure.network.CnameRecordArgs(cname=records[record]["value"]),
|
|
@@ -743,6 +751,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
743
751
|
secrets: Optional[dict[str, str]] = None,
|
|
744
752
|
comms_data_location: Optional[str] = None,
|
|
745
753
|
comms_domains: Optional[list[HostDefinition]] = None,
|
|
754
|
+
dedicated_app_service_sku: Optional[azure.web.SkuDescriptionArgs] = None,
|
|
746
755
|
vault_administrators: Optional[list[str]] = None,
|
|
747
756
|
) -> azure.web.WebApp:
|
|
748
757
|
"""
|
|
@@ -760,6 +769,7 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
760
769
|
and the name of the secret in the Key Vault.
|
|
761
770
|
:param comms_data_location: The data location for the Communication Services (optional if you don't need it).
|
|
762
771
|
:param comms_domains: The list of custom domains for the E-mail Communication Services (optional).
|
|
772
|
+
:param dedicated_app_service_sku: The SKU for the dedicated App Service Plan (optional).
|
|
763
773
|
:param vault_administrator: The principal ID of the vault administrator (optional).
|
|
764
774
|
"""
|
|
765
775
|
|
|
@@ -822,11 +832,23 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
822
832
|
]
|
|
823
833
|
|
|
824
834
|
allowed_hosts = pulumi.Output.concat(*[pulumi.Output.concat(host.full_host, ",") for host in website_hosts])
|
|
835
|
+
|
|
836
|
+
# Create a dedicated App Service Plan if requested
|
|
837
|
+
if dedicated_app_service_sku:
|
|
838
|
+
app_service_plan = azure.web.AppServicePlan(
|
|
839
|
+
f"asp-{self._name}-{name}",
|
|
840
|
+
resource_group_name=self._rg,
|
|
841
|
+
kind="Linux",
|
|
842
|
+
reserved=True,
|
|
843
|
+
sku=dedicated_app_service_sku,
|
|
844
|
+
)
|
|
845
|
+
else:
|
|
846
|
+
app_service_plan = self._app_service_plan
|
|
825
847
|
|
|
826
848
|
app = azure.web.WebApp(
|
|
827
849
|
f"app-{name}-{self._name}",
|
|
828
850
|
resource_group_name=self._rg,
|
|
829
|
-
server_farm_id=
|
|
851
|
+
server_farm_id=app_service_plan.id,
|
|
830
852
|
virtual_network_subnet_id=self._app_subnet.id,
|
|
831
853
|
identity=azure.web.ManagedServiceIdentityArgs(
|
|
832
854
|
type=azure.web.ManagedServiceIdentityType.SYSTEM_ASSIGNED,
|
|
@@ -903,39 +925,23 @@ class DjangoDeployment(pulumi.ComponentResource):
|
|
|
903
925
|
dependencies = []
|
|
904
926
|
|
|
905
927
|
if host.zone:
|
|
906
|
-
# Create a DNS record in the zone
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
],
|
|
922
|
-
)
|
|
928
|
+
# Create a DNS record in the zone.
|
|
929
|
+
# We always use an A record instead of CNAME to avoid collisions with TXT records.
|
|
930
|
+
a = azure.network.RecordSet(
|
|
931
|
+
f"dns-a-{name}-{self._name}-{host.identifier}",
|
|
932
|
+
resource_group_name=self._rg,
|
|
933
|
+
zone_name=host.zone.name,
|
|
934
|
+
relative_record_set_name=host.host,
|
|
935
|
+
record_type="A",
|
|
936
|
+
ttl=3600,
|
|
937
|
+
a_records=[
|
|
938
|
+
azure.network.ARecordArgs(
|
|
939
|
+
ipv4_address=virtual_ip,
|
|
940
|
+
)
|
|
941
|
+
],
|
|
942
|
+
)
|
|
923
943
|
|
|
924
|
-
|
|
925
|
-
else:
|
|
926
|
-
# Create a CNAME record for the custom hostname
|
|
927
|
-
cname = azure.network.RecordSet(
|
|
928
|
-
f"dns-cname-{name}-{self._name}-{host.identifier}",
|
|
929
|
-
resource_group_name=self._rg,
|
|
930
|
-
zone_name=host.zone.name,
|
|
931
|
-
relative_record_set_name=host.host,
|
|
932
|
-
record_type="CNAME",
|
|
933
|
-
ttl=3600,
|
|
934
|
-
cname_record=azure.network.CnameRecordArgs(
|
|
935
|
-
cname=app.default_host_name,
|
|
936
|
-
),
|
|
937
|
-
)
|
|
938
|
-
dependencies.append(cname)
|
|
944
|
+
dependencies.append(a)
|
|
939
945
|
|
|
940
946
|
# For the certificate validation to work
|
|
941
947
|
relative_record_set_name = "asuid" if host.host == "@" else pulumi.Output.concat("asuid.", host.host)
|
{pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17/src/pulumi_django_azure.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pulumi-django-azure
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.17
|
|
4
4
|
Summary: Simply deployment of Django on Azure with Pulumi
|
|
5
5
|
Author-email: Maarten Ureel <maarten@youreal.eu>
|
|
6
6
|
License: MIT License
|
|
@@ -33,9 +33,9 @@ Classifier: Programming Language :: Python :: 3
|
|
|
33
33
|
Requires-Python: >=3.9
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
|
-
Requires-Dist: pulumi>=3.
|
|
37
|
-
Requires-Dist: pulumi-azure-native>=2.
|
|
38
|
-
Requires-Dist: pulumi-random>=4.
|
|
36
|
+
Requires-Dist: pulumi>=3.146.0
|
|
37
|
+
Requires-Dist: pulumi-azure-native>=2.82.0
|
|
38
|
+
Requires-Dist: pulumi-random>=4.17.0
|
|
39
39
|
|
|
40
40
|
# Pulumi Django Deployment
|
|
41
41
|
|
|
File without changes
|
|
File without changes
|
{pulumi_django_azure-1.0.15 → pulumi_django_azure-1.0.17}/src/pulumi_django_azure/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|