Skip to content

Commit

Permalink
comment out external subnet while testing
Browse files Browse the repository at this point in the history
  • Loading branch information
craddm committed Aug 2, 2024
1 parent da2b231 commit cb242ac
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions data_safe_haven/infrastructure/programs/sre/user_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(
subnet_containers_support: Input[network.GetSubnetResult],
subnet_containers: Input[network.GetSubnetResult],
subnet_databases: Input[network.GetSubnetResult],
# subnet_external_git_mirror: Input[network.GetSubnetResult],
subnet_software_repositories: Input[network.GetSubnetResult],
) -> None:
self.database_service_admin_password = database_service_admin_password
Expand Down Expand Up @@ -75,6 +76,9 @@ def __init__(
self.subnet_databases_id = Output.from_input(subnet_databases).apply(
get_id_from_subnet
)
# self.subnet_external_git_mirror_id = Output.from_input(
# subnet_external_git_mirror
# ).apply(get_id_from_subnet)
self.subnet_software_repositories_id = Output.from_input(
subnet_software_repositories
).apply(get_id_from_subnet)
Expand All @@ -96,15 +100,19 @@ def __init__(
child_tags = {"component": "user services"} | (tags if tags else {})

# Deploy the Gitea servers
gitea_servers = (
["external", "internal"] if props.external_git_mirror else ["internal"]
)
if props.external_git_mirror:
gitea_servers = ["external", "internal"]
subnet = [props.subnet_containers_id, props.subnet_containers_id]
else:
gitea_servers = ["internal"]
subnet = [props.subnet_containers_id]

for gitea_server in gitea_servers:
SREGiteaServerComponent(
f"sre_{gitea_server}_gitea_server",
stack_name,
SREGiteaServerProps(
containers_subnet_id=props.subnet_containers_id,
containers_subnet_id=subnet[0],
database_subnet_id=props.subnet_containers_support_id,
database_password=props.gitea_database_password,
dns_server_ip=props.dns_server_ip,
Expand Down

0 comments on commit cb242ac

Please sign in to comment.