Skip to content

Commit

Permalink
chore(terraform) fix deprecation with provider 3.x
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Sep 29, 2024
1 parent 75e0811 commit 25d3613
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion cert.ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module "cert_ci_jenkins_io" {
}

controller_service_principal_ids = [
data.azuread_service_principal.terraform_production.id,
data.azuread_service_principal.terraform_production.object_id,
]
controller_service_principal_end_date = "2024-11-06T00:00:00Z"
controller_packer_rg_ids = [
Expand Down
2 changes: 1 addition & 1 deletion ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module "ci_jenkins_io_sponsorship" {
privatevpn_subnet = data.azurerm_subnet.private_vnet_data_tier.address_prefixes
}
controller_service_principal_ids = [
data.azuread_service_principal.terraform_production.id,
data.azuread_service_principal.terraform_production.object_id,
]
controller_service_principal_end_date = "2024-10-19T00:00:00Z"
controller_packer_rg_ids = [
Expand Down
12 changes: 6 additions & 6 deletions infra.ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ resource "azurerm_storage_account" "infra_ci_jenkins_io_agents" {
resource "azuread_application" "infra_ci_jenkins_io" {
display_name = "infra.ci.jenkins.io"
owners = [
data.azuread_service_principal.terraform_production.id,
data.azuread_service_principal.terraform_production.object_id,
]
tags = [for key, value in local.default_tags : "${key}:${value}"]
required_resource_access {
Expand All @@ -38,7 +38,7 @@ resource "azuread_service_principal" "infra_ci_jenkins_io" {
client_id = azuread_application.infra_ci_jenkins_io.client_id
app_role_assignment_required = false
owners = [
data.azuread_service_principal.terraform_production.id,
data.azuread_service_principal.terraform_production.object_id,
]
}
resource "azuread_application_password" "infra_ci_jenkins_io" {
Expand Down Expand Up @@ -73,7 +73,7 @@ module "infraci_contributorsjenkinsio_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_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = local.end_dates.infra_ci_jenkins_io.infraci_contributorsjenkinsio_fileshare_serviceprincipal_writer.end_date
file_share_resource_manager_id = azurerm_storage_share.contributors_jenkins_io.resource_manager_id
Expand All @@ -93,7 +93,7 @@ module "infraci_docsjenkinsio_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_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = local.end_dates.infra_ci_jenkins_io.infraci_docsjenkinsio_fileshare_serviceprincipal_writer.end_date
file_share_resource_manager_id = azurerm_storage_share.docs_jenkins_io.resource_manager_id
Expand All @@ -113,7 +113,7 @@ module "infraci_statsjenkinsio_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_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = local.end_dates.infra_ci_jenkins_io.infraci_statsjenkinsio_fileshare_serviceprincipal_writer.end_date
file_share_resource_manager_id = azurerm_storage_share.stats_jenkins_io.resource_manager_id
Expand Down Expand Up @@ -233,7 +233,7 @@ module "infraci_pluginsjenkinsio_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "infraci-pluginsjenkinsio-fileshare_serviceprincipal_writer"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = local.end_dates.infra_ci_jenkins_io.infraci_pluginsjenkinsio_fileshare_serviceprincipal_writer.end_date
file_share_resource_manager_id = azurerm_storage_share.plugins_jenkins_io.resource_manager_id
Expand Down
4 changes: 2 additions & 2 deletions packer-resources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
resource "azuread_application" "packer" {
display_name = "packer"
owners = [
data.azuread_service_principal.terraform_production.id, # terraform-production Service Principal, used by the CI system
data.azuread_service_principal.terraform_production.object_id, # terraform-production Service Principal, used by the CI system
]
tags = [for key, value in local.default_tags : "${key}:${value}"]
required_resource_access {
Expand All @@ -24,7 +24,7 @@ resource "azuread_service_principal" "packer" {
client_id = azuread_application.packer.client_id
app_role_assignment_required = false
owners = [
data.azuread_service_principal.terraform_production.id, # terraform-production Service Principal, used by the CI system
data.azuread_service_principal.terraform_production.object_id, # terraform-production Service Principal, used by the CI system
]
}

Expand Down
2 changes: 1 addition & 1 deletion publick8s.tf
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ module "cronjob_geoip_data_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "${azurerm_resource_group.publick8s.name}-fileshare_serviceprincipal_writer-redirects"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-12-23T00:00:00Z"
file_share_resource_manager_id = azurerm_storage_share.geoip_data.resource_manager_id
Expand Down
4 changes: 2 additions & 2 deletions test.ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ data "azurerm_subnet" "test_azurevm_agents_agents_sponsorship" {
####################################################################################
resource "azuread_application" "test_azurevm_agents_sponsorship" {
display_name = "test.jay.onboarding"
owners = [data.azuread_service_principal.terraform_production.id]
owners = [data.azuread_service_principal.terraform_production.object_id]
tags = [for key, value in local.default_tags : "${key}:${value}"]
required_resource_access {
resource_app_id = "00000003-0000-0000-c000-000000000000" # Microsoft Graph
Expand All @@ -48,7 +48,7 @@ resource "azuread_application" "test_azurevm_agents_sponsorship" {
resource "azuread_service_principal" "test_azurevm_agents_sponsorship" {
client_id = azuread_application.test_azurevm_agents_sponsorship.client_id
app_role_assignment_required = false
owners = [data.azuread_service_principal.terraform_production.id]
owners = [data.azuread_service_principal.terraform_production.object_id]
}
resource "azuread_application_password" "test_azurevm_agents_sponsorship" {
application_id = azuread_application.test_azurevm_agents_sponsorship.id
Expand Down
10 changes: 5 additions & 5 deletions trusted.ci.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module "trusted_ci_jenkins_io" {
}

controller_service_principal_ids = [
data.azuread_service_principal.terraform_production.id,
data.azuread_service_principal.terraform_production.object_id,
]
controller_service_principal_end_date = "2024-11-20T00:00:00Z"
controller_packer_rg_ids = [
Expand Down Expand Up @@ -78,7 +78,7 @@ module "trustedci_updatesjenkinsio_content_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "${module.trusted_ci_jenkins_io.service_fqdn}-fileshare_serviceprincipal_writer"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-12-18T00:00:00Z"
file_share_resource_manager_id = azurerm_storage_share.updates_jenkins_io_content.resource_manager_id
Expand All @@ -90,7 +90,7 @@ module "trustedci_updatesjenkinsio_redirects_fileshare_serviceprincipal_writer"
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "${module.trusted_ci_jenkins_io.service_fqdn}-fileshare_serviceprincipal_writer-redirects"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-12-18T00:00:00Z"
file_share_resource_manager_id = azurerm_storage_share.updates_jenkins_io_redirects.resource_manager_id
Expand All @@ -103,7 +103,7 @@ module "trustedci_jenkinsio_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "trustedci-jenkinsio-fileshare_serviceprincipal_writer"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-10-16T00:00:00Z"
file_share_resource_manager_id = azurerm_storage_share.jenkins_io.resource_manager_id
Expand All @@ -116,7 +116,7 @@ module "trustedci_javadocjenkinsio_fileshare_serviceprincipal_writer" {
source = "./.shared-tools/terraform/modules/azure-jenkinsinfra-fileshare-serviceprincipal-writer"

service_fqdn = "trustedci-javadocjenkinsio-fileshare_serviceprincipal_writer"
active_directory_owners = [data.azuread_service_principal.terraform_production.id]
active_directory_owners = [data.azuread_service_principal.terraform_production.object_id]
active_directory_url = "https://github.com/jenkins-infra/azure"
service_principal_end_date = "2024-10-16T00:00:00Z"
file_share_resource_manager_id = azurerm_storage_share.javadoc_jenkins_io.resource_manager_id
Expand Down

0 comments on commit 25d3613

Please sign in to comment.