Skip to content

Commit

Permalink
chore(contributors.jenkins.io): recreate Storage Account and File Sha…
Browse files Browse the repository at this point in the history
…re (#528)

This PR recreates the storage account and the file share for
contributors.jenkins.io

The network rules deleted in a hotfix commit were still present when
looking at the storage account in Azure Portal.
I've deleted the (empty) storage account to recreate it with this PR.

Other changes:
- ZRS: no need for GRS, ZRS is sufficient
- Type StorageV2: default value from the terraform provider, "Storage"
(v1) is the legacy one, no cost change between them.
- Add back network rules, allowing our IPs and the ones from publick8s
and privatek8s vnets.

Follow-up of:
- #523
- #524

Ref:
-
jenkins-infra/helpdesk#3809 (comment)
  • Loading branch information
lemeurherve committed Nov 27, 2023
1 parent 3b5136f commit a4224fc
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions contributors.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ resource "azurerm_storage_account" "contributors_jenkins_io" {
resource_group_name = azurerm_resource_group.contributors_jenkins_io.name
location = azurerm_resource_group.contributors_jenkins_io.location
account_tier = "Standard"
account_replication_type = "GRS"
account_kind = "Storage"
account_replication_type = "ZRS"
account_kind = "StorageV2"
enable_https_traffic_only = true
min_tls_version = "TLS1_2"

network_rules {
default_action = "Deny"
ip_rules = flatten(concat(
[for key, value in module.jenkins_infra_shared_data.admin_public_ips : value]
))
virtual_network_subnet_ids = [data.azurerm_subnet.privatek8s_tier.id, data.azurerm_subnet.publick8s_tier.id]
bypass = ["AzureServices"]
}

tags = local.default_tags
}

Expand Down

0 comments on commit a4224fc

Please sign in to comment.