Skip to content

Disable storage account cross tenant replication#4116

Merged
tim-p-allen merged 15 commits into
microsoft:mainfrom
nwsde:jr/upstream-main/70-disable-cross-tenant-replication
Nov 25, 2024
Merged

Disable storage account cross tenant replication#4116
tim-p-allen merged 15 commits into
microsoft:mainfrom
nwsde:jr/upstream-main/70-disable-cross-tenant-replication

Conversation

@jonnyry

@jonnyry jonnyry commented Oct 31, 2024

Copy link
Copy Markdown
Collaborator

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
@github-actions

github-actions Bot commented Nov 4, 2024

Copy link
Copy Markdown

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

jonnyry commented Nov 4, 2024

Copy link
Copy Markdown
Collaborator Author

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

jonnyry commented Nov 4, 2024

Copy link
Copy Markdown
Collaborator Author

Ah this would be the reason...

        uses: github/super-linter/slim@v5.0.0
        env:
          VALIDATE_ALL_CODEBASE: false

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

@jonnyry

jonnyry commented Nov 5, 2024

Copy link
Copy Markdown
Collaborator Author

Not fixing the linting issue above as per:

#4117

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

Copy link
Copy Markdown

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

jonnyry commented Nov 25, 2024

Copy link
Copy Markdown
Collaborator Author

@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
Copy Markdown

/test

@github-actions

Copy link
Copy Markdown

🤖 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
Copy Markdown

/test c0a474b

@github-actions

Copy link
Copy Markdown

🤖 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
@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