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

feat: add stats.jenkins.io storage account and file share #729

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions stats.jenkins.io.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
resource "azurerm_resource_group" "stats_jenkins_io" {
name = "stats-jenkins-io"
location = var.location
tags = local.default_tags
}

resource "azurerm_storage_account" "stats_jenkins_io" {
name = "statsjenkinsio"
resource_group_name = azurerm_resource_group.stats_jenkins_io.name
location = azurerm_resource_group.stats_jenkins_io.location
account_tier = "Standard"
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: if you use a Standard storage account, you'll have to check the cost due to amount of transactions. It usually are the write which are costly: what would be the statistic's update frequency?

I believe we can for it but you have to watch the costs of this resource group in the upcoming (4-6) weeks

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.publick8s_tier.id,
data.azurerm_subnet.privatek8s_tier.id, # required for management from infra.ci (terraform)
data.azurerm_subnet.infra_ci_jenkins_io_sponsorship_ephemeral_agents.id, # infra.ci Azure VM agents
]
bypass = ["AzureServices"]
}

tags = local.default_tags
}

resource "azurerm_storage_share" "stats_jenkins_io" {
name = "stats-jenkins-io"
storage_account_name = azurerm_storage_account.stats_jenkins_io.name
quota = 5
}