Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Azure Firewall and route tables to core configuration #4342

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

marrobi
Copy link
Member

@marrobi marrobi commented Feb 7, 2025

Move Azure Firewall Deployment to Core

Why:

Had to modify GitHub workflow for linting. Can someone verify this is correct?

Tested upgrade a few times, more wouldn't hurt.

Copy link

github-actions bot commented Feb 7, 2025

Unit Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit c61ee60.

♻️ This comment has been updated with latest results.

@martinpeck
Copy link
Member

@marrobi please update with main and then publish for review

@martinpeck martinpeck added the triage Being triaged before any action taken. label Mar 20, 2025
@marrobi marrobi force-pushed the marrobi/firewall-to-core branch from af6ed73 to ff24de2 Compare March 21, 2025 12:06
@marrobi marrobi requested a review from Copilot March 21, 2025 13:21
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the Azure Firewall deployment and associated route table configurations to the core configuration. Key changes include:

  • Upgrading the version in the porter.yaml template.
  • Removing firewall-related parameters and the tre_resource_id from the shared services deployment template.
  • Updating the CHANGELOG with the new migration entry.

Reviewed Changes

Copilot reviewed 6 out of 24 changed files in this pull request and generated no comments.

File Description
templates/shared_services/firewall/porter.yaml Updated version and removed firewall-related parameters and IDs.
CHANGELOG.md Added a changelog entry for the migration of Azure Firewall configurations.
Files not reviewed (18)
  • Makefile: Language not supported
  • core/terraform/.terraform.lock.hcl: Language not supported
  • core/terraform/firewall/firewall.tf: Language not supported
  • core/terraform/firewall/import_state.sh: Language not supported
  • core/terraform/firewall/locals.tf: Language not supported
  • core/terraform/firewall/main.tf: Language not supported
  • core/terraform/firewall/outputs.tf: Language not supported
  • core/terraform/firewall/remove_state.sh: Language not supported
  • core/terraform/firewall/rules.tf: Language not supported
  • core/terraform/firewall/variables.tf: Language not supported
  • core/terraform/main.tf: Language not supported
  • core/terraform/network/outputs.tf: Language not supported
  • core/terraform/routetable.tf: Language not supported
  • core/terraform/variables.tf: Language not supported
  • core/version.txt: Language not supported
  • templates/shared_services/firewall/template_schema.json: Language not supported
  • templates/shared_services/firewall/terraform/data.tf: Language not supported
  • templates/shared_services/firewall/terraform/import_state.sh: Language not supported
Comments suppressed due to low confidence (3)

templates/shared_services/firewall/porter.yaml:45

  • The removal of firewall-related parameters is intended by the PR; however, please verify that all consumers of this template have been updated to use the new core configuration and no references to these parameters remain.
-  - name: firewall_sku

templates/shared_services/firewall/porter.yaml:59

  • Removing the tre_resource_id from the install/upgrade/uninstall sections requires confirmation that resource identification is now handled elsewhere; please ensure the new configuration covers this need.
-        tre_resource_id: ${ bundle.parameters.id }

CHANGELOG.md:9

  • [nitpick] Consider aligning the changelog entry with the PR title by using 'core configuration' instead of 'Core Terraform' for consistency.
+* Migrate Azure Firewall and Route Tables to Core Terraform ([#4342](https://github.com/microsoft/AzureTRE/pull/4342))

@marrobi marrobi marked this pull request as ready for review March 21, 2025 14:09
@marrobi
Copy link
Member Author

marrobi commented Mar 31, 2025

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you import the state here if we usually do it in the migration script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I moved the file over from the firewall bundle, from when we went the other way. I can move this to the migrate script.

Comment on lines +112 to +114
depends_on = [
module.network,
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is redundant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the FW really needs to be a module?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason was to leave the option to have it conditional in the future. If we don't want to deploy it for a dev environment for example.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. I think it should be move to the migration script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will revisit.

@@ -1,7 +1,7 @@
---
schemaVersion: 1.0.0
name: tre-shared-service-firewall
version: 1.3.3
version: 1.4.0
description: "An Azure TRE Firewall shared service"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand we can't change the name, but we can consider changing the description, template schema and docs to reflect the fact this is now just about managing the workspace level firewall policy rules.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, primarily wanted to see if thought this works as a change in principal. If agreed, will go through and fix up.

tre_shared_service_tags = {
tre_id = var.tre_id
tre_shared_service_id = var.tre_resource_id
}

api_driven_application_rule_collection = jsondecode(base64decode(var.api_driven_rule_collections_b64))
api_driven_network_rule_collection = jsondecode(base64decode(var.api_driven_network_rule_collections_b64))

firewall_policy_name = "fw-policy-${var.tre_id}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is now quite easy to provide this at run time as since it is set in the core it should be provided from there as a bundle variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what you mean? The policy name?

name = rule.value.name
# description = rule.value.description
name = rule.value.name
description = rule.value.description
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it confirmed that network rules now support a description?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check. It deploys and works... can't remember why changed this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Being triaged before any action taken.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants