-
Notifications
You must be signed in to change notification settings - Fork 158
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
TRE core should use private endpoint to access TRE management storage account #4353 #4360
TRE core should use private endpoint to access TRE management storage account #4353 #4360
Conversation
c939ed2
to
13f7c81
Compare
Unit Test Results0 tests 0 ✅ 0s ⏱️ Results for commit 7dc7822. ♻️ This comment has been updated with latest results. |
@ashis-kar91 thanks, I might be confused, but when deploy say, using IP 1.2.3.4, first time, that IP gets added to the firewall for the state storage account. Next time, the agent has 6.7.8.9, how does the agent access the terraform state store? I think the storage firewall needs to be amended using the CLI prior to the terraform commands running, similar to #4260 with the KeyVault. @jonnyry do you concur? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting request changes on, until are clear on #4360 (comment)
Sounds good to me. Working on it. |
Yes - since the storage account is holding tfstate, terraform will need data plane access during the plan phase. The first run should succeed, second and subsequent runs will fail - since the IP added on the previous run will not match the current GitHub runner's IP. If GitHub runners had nice fixed IPs that would be a different matter :-) |
a7984e6
to
7cb8dca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, will let the tests check the operation.
/test |
🤖 pr-bot 🤖
(in response to this comment from @marrobi) |
/test 1f41328 |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13367453953 (with refid (in response to this comment from @marrobi) |
@ashis-kar91 tests have failed on the new script - https://github.com/microsoft/AzureTRE/actions/runs/13367453953 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments.
Also, do any of the other core/terraform
shell scripts that access the backend tfstate container, require your add network exception script adding? E.g. migrate.sh
or outputs.sh
. I haven't had chance to look at the flows, but I'm not sure all of them are called within the standard deployment flow.
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13443111269 (with refid (in response to this comment from @marrobi) |
25e661a
to
2dbc4a4
Compare
/test-destroy-env |
Destroying PR test environment (RG: rg-tre76feaa49)... (run: https://github.com/microsoft/AzureTRE/actions/runs/13444491099) |
PR test environment destroy complete (RG: rg-tre76feaa49) |
/test 4abe2c9 |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13445711529 (with refid (in response to this comment from @marrobi) |
… and allow access from TRE core and local IP
…ing deployment. Also changed subnet for resource processor private endpoint
… devops terraform.tf
…e group and storage account names, and improve storage accessibility check logic.
- Improved IP presence check in network rules with clearer logic. - Added error handling for storage container listing. - Explicit mention of public network access for the storage account in bootstrap and main Terraform configurations.
…ion.sh for improved network exception handling
…settings in bootstrap script
…n deployment process
63133aa
to
5dc89a4
Compare
/test 5dc89a4 |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13457698967 (with refid (in response to this comment from @ashis-kar91) |
/test 1cddc7c |
🤖 pr-bot 🤖 🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/13460780708 (with refid (in response to this comment from @ashis-kar91) |
…f private endpoint for TRE management storage account
/test-force-approve Passed: https://github.com/microsoft/AzureTRE/actions/runs/13460780708 |
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit 7dc7822) (in response to this comment from @marrobi) |
Resolves #4353
What is being addressed
How is this addressed
The changes include the addition of a private endpoint for the TRE management storage account from the resource processor subnet, updates to network rules for the storage account to deny public access, and the introduction of a new script to handle adding and removing network exceptions for the management storage account during deployments.
Security Enhancements:
core/terraform/resource_processor/vmss_porter/main.tf
: Add a new resourceazurerm_private_endpoint
for the TRE management storage account to use a private endpoint. This ensures secure access to the management storage account from TRE core resource processor subnet.devops/terraform/bootstrap.sh
) [1] [2].devops/terraform/main.tf
).Deployment Script Improvements:
mgmtstorage_add_network_exception.sh
to handle adding and removing network exceptions for the management storage account (devops/scripts/mgmtstorage_add_network_exception.sh
).mgmtstorage_add_network_exception.sh
script (core/terraform/deploy.sh
,core/terraform/destroy.sh
,devops/terraform/deploy.sh
,devops/terraform/destroy.sh
) [1] [2] [3] [4].Version Updates:
core/version.txt
anddevops/version.txt
[1] [2].Changelog update:
CHANGELOG.md
).