fix: scope LDAP domain terraform applies to LDAP resources#881
Merged
MylesJP merged 1 commit intoJul 10, 2026
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> (cherry picked from commit bf67f54)
gboutry
approved these changes
Jul 10, 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.
Clean cherry-pick of bf67f54 (#877) to stable/2025.1.
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
(juju_application.ldap-apps, juju_integration.ldap-apps-to-logging,
juju_integration.ldap-to-keystone) so these steps only reconcile what they
own — the same pattern already used in steps/mysql.py, steps/hypervisor.py
and steps/vault.py. Targeted applies still destroy orphaned for_each
instances, so remove-domain continues to remove the keystone-ldap-
application.
Closes-bug: #2159042
QA steps
On a deployment with the LDAP feature enabled:
Run each LDAP domain operation (the LDAP server does not need to exist;
keystone-ldap-k8s is a config-only charm):
add-domain clears it):
juju config -m openstack traefik-public tls-certjuju status -m openstack | grep keystone-ldap # expect no outputVerified 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
Bug: https://bugs.launchpad.net/snap-openstack/+bug/2159042
Jira card: OPEN-4637