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(terraform: azure-jenkinsinfra-controller) allow DNS to use distinct provider or to be undefined #135

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Jan 18, 2024

Related to jenkins-infra/helpdesk#3913 (edited).

Migrating the controller VM to the new subscription will need instantiating the module azure-jenkinsinfra-controller (either a new one or the current one). This module takes care of creating not only the VM, but also DNS records to reach this VM. But as our DNS zones for the jenkins.io and jenkins-ci.org domains are NOT in the secondary (sponsored) subscription, it will be an obstacle.

As a remidation, this PR adds a new feature to the terraform module azure-jenkinsinfra-controller to allow DNS records:

  • To be managed by a distinct AzureRM provider
  • To NOT be managed

So we can handle many cases during the migration of ci.jenkins.io

Tested with success:

  • Using a local terraform plan against the 3 existing controllers:
$ terraform plan --target=module.ci_jenkins_io -target=module.trusted_ci_jenkins_io -target=module.cert_ci_jenkins_io
# ...

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your
configuration and found no differences, so no changes are needed.
╷
│ Warning: Resource targeting is in effect
# ...
$ terraform plan --target=module.ci_jenkins_io -target=module.trusted_ci_jenkins_io -target=module.cert_ci_jenkins_io --target=module.ci_jenkins_io_sponsorship

# ...
Plan: 25 to add, 0 to change, 0 to destroy.
╷
│ Warning: Resource targeting is in effect

@dduportal dduportal changed the title Fix/terraform/controllers/no dns rec feat(terraform: azure-jenkinsinfra-controller) allow DNS to use distinct provider or to be undefined Jan 18, 2024
@dduportal dduportal marked this pull request as ready for review January 18, 2024 13:35
…ds when the DNS Zone name is unspecified

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal merged commit c618f89 into main Jan 18, 2024
1 check passed
@dduportal dduportal deleted the fix/terraform/controllers/no-dns-rec branch January 18, 2024 14:11
dduportal added a commit to jenkins-infra/azure that referenced this pull request Jan 18, 2024
…e azure VM controller module to support distinct AzureRM provider for DNS (#585)

Ref. jenkins-infra/helpdesk#3913

Blocked by jenkins-infra/shared-tools#135

This PR expects module to be updated as it sets up providers for the 3
existing controllers

Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants