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: create a service principal to interact with stats-jenkins-io File Share #733

Merged
Changes from all commits
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
30 changes: 30 additions & 0 deletions infra.ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,36 @@ output "infraci_docs_jenkins_io_fileshare_serviceprincipal_writer_sp_password" {
value = module.infraci_docs_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_sp_password
}

# Required to allow azcopy sync of stats.jenkins.io File Share
module "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "infra-ci-jenkins-io-fileshare_serviceprincipal_writer"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-09-19T23:00:00Z"
lemeurherve marked this conversation as resolved.
Show resolved Hide resolved
file_share_resource_manager_id = azurerm_storage_share.stats_jenkins_io.resource_manager_id
storage_account_id = azurerm_storage_account.stats_jenkins_io.id
default_tags = local.default_tags
}
output "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer_id" {
value = module.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_id
}
output "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer_password" {
sensitive = true
value = module.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_password
}
output "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer_application_client_id" {
value = module.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_application_client_id
}
output "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer_sp_id" {
value = module.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_sp_id
}
output "infraci_stats_jenkins_io_fileshare_serviceprincipal_writer_sp_password" {
sensitive = true
value = module.infraci_stats_jenkins_io_fileshare_serviceprincipal_writer.fileshare_serviceprincipal_writer_sp_password
}

locals {
infra_ci_jenkins_io_fqdn = "infra.ci.jenkins.io"
infra_ci_jenkins_io_service_short_name = trimprefix(trimprefix(local.infra_ci_jenkins_io_fqdn, "jenkins.io"), ".")
Expand Down