fix: scope LDAP domain terraform applies to LDAP resources#877
Merged
Conversation
The LDAP add/update/remove-domain steps re-apply the entire OpenStack Terraform plan. Since Terraform owns the charm config of every application in the plan, any config set out-of-band with juju config (e.g. Traefik TLS certificates) was reverted as drift whenever an LDAP domain was managed. Pass -target flags for the three LDAP domain resources so these steps only reconcile what they own. Targeted applies still destroy orphaned for_each instances, so remove-domain continues to remove the keystone-ldap-<domain> application. Closes-Bug: #2159042 Signed-off-by: Myles Penner <myles.penner@canonical.com>
Author
|
Will propose backport to 2024.1/stable |
gboutry
approved these changes
Jul 9, 2026
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LDAP add/update/remove-domain steps re-apply the entire OpenStack
Terraform plan. Since Terraform owns the charm config of every application in
the plan, any config set out-of-band with
juju config(e.g. Traefik TLScertificates) was reverted as drift whenever an LDAP domain was managed.
Pass
-targetflags for the three LDAP domain resources(
juju_application.ldap-apps,juju_integration.ldap-apps-to-logging,juju_integration.ldap-to-keystone) so these steps only reconcile what theyown — the same pattern already used in
steps/mysql.py,steps/hypervisor.pyand
steps/vault.py. Targeted applies still destroy orphanedfor_eachinstances, so remove-domain continues to remove the
keystone-ldap-<domain>application.
Closes-bug: #2159042
QA steps
On a deployment with the LDAP feature enabled:
Set TLS config on traefik-public out-of-band (a self-signed cert is fine):
Run each LDAP domain operation (the LDAP server does not need to exist;
keystone-ldap-k8s is a config-only charm):
After each operation, verify the TLS config survived (without this fix,
add-domain clears it):
Verify remove-domain still deletes the domain application:
Verified end-to-end on a single-node 2024.1 deployment (repro on stock rev
1060, fix confirmed with a patched snap); transcript and logs attached to the
LP bug.
Links
Jira card: OPEN-4637