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

Disable storage account cross tenant replication #4116

Conversation

jonnyry
Copy link
Collaborator

@jonnyry jonnyry commented Oct 31, 2024

What is being addressed

Disable storage account cross tenant replication.

The Azure TRE does not use cross tenant replication and it the feature is typically flagged in security posture guidance to disable if not being used, e.g. https://www.trendmicro.com/cloudoneconformity/knowledge-base/azure/StorageAccounts/disable-cross-tenant-replication.html

@github-actions github-actions bot added the external PR from an external contributor label Oct 31, 2024
@jonnyry jonnyry marked this pull request as ready for review October 31, 2024 11:27
Copy link

github-actions bot commented Nov 4, 2024

Unit Test Results

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

Results for commit c0a474b.

♻️ This comment has been updated with latest results.

@jonnyry
Copy link
Collaborator Author

jonnyry commented Nov 4, 2024

Not sure why tflint is failing now for my change. I have changed this file (by adding cross_tenant_replication_enabled = false) but not changed the tags.

Happy to fix the tag issue if necessary? Presume it just needs the tre_id wiring through as a TF variable.

2024-11-04 08:54:14 [INFO]   File:[/github/workspace/devops/terraform/main.tf]
2024-11-04 08:54:14 [ERROR]   Found errors in [tflint] linter!
2024-11-04 08:54:14 [ERROR]   Error code: 2. Command output:
------
WARNING: "tflint FILE/DIR" is deprecated and will error in a future version. Use --chdir or --filter instead.
4 issue(s) found:

Notice: The resource is missing the following tags: "tre_id". (azurerm_resource_missing_tags)

  on main.tf line 10:
  10:   tags = {
  11:     project = "Azure Trusted Research Environment"
  12:     source  = "https://github.com/microsoft/AzureTRE/"
  13:   }

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.22.0/docs/rules/azurerm_resource_missing_tags.md

Notice: The resource is missing the following tags: "tre_id". (azurerm_resource_missing_tags)

  on main.tf line 19:
  19: resource "azurerm_storage_account" "state_storage" {

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.22.0/docs/rules/azurerm_resource_missing_tags.md

Notice: The resource is missing the following tags: "tre_id". (azurerm_resource_missing_tags)

  on main.tf line 33:
  33: resource "azurerm_container_registry" "shared_acr" {

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.22.0/docs/rules/azurerm_resource_missing_tags.md

Notice: The resource is missing the following tags: "tre_id". (azurerm_resource_missing_tags)

  on main.tf line 45:
  45: resource "azurerm_container_registry_task" "tredev_purge" {

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.22.0/docs/rules/azurerm_resource_missing_tags.md

@jonnyry
Copy link
Collaborator Author

jonnyry commented Nov 4, 2024

Ah this would be the reason...

        uses: github/super-linter/[email protected]
        env:
          VALIDATE_ALL_CODEBASE: false

...didn't realise the linter only processed files changed.

@jonnyry
Copy link
Collaborator Author

jonnyry commented Nov 5, 2024

Not fixing the linting issue above as per:

#4117

Copy link
Collaborator

@tim-p-allen tim-p-allen left a comment

Choose a reason for hiding this comment

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

LGTM

@tim-p-allen tim-p-allen requested a review from marrobi November 11, 2024 09:41
@jonnyry
Copy link
Collaborator Author

jonnyry commented Nov 25, 2024

@tim-allen-ck ok to get this one merged?

@tim-p-allen tim-p-allen enabled auto-merge (squash) November 25, 2024 12:57
@tim-p-allen
Copy link
Collaborator

/test

Copy link

🤖 pr-bot 🤖

⚠️ When using /test on external PRs, the SHA of the checked commit must be specified

(in response to this comment from @tim-allen-ck)

@tim-p-allen
Copy link
Collaborator

/test c0a474b

Copy link

🤖 pr-bot 🤖

🏃 Running tests: https://github.com/microsoft/AzureTRE/actions/runs/12018091544 (with refid cc787b47)

(in response to this comment from @tim-allen-ck)

@tim-p-allen tim-p-allen merged commit f40dee6 into microsoft:main Nov 25, 2024
12 checks passed
@jonnyry jonnyry deleted the jr/upstream-main/70-disable-cross-tenant-replication branch November 26, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external PR from an external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants