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: add serviceAccountUserId even if service accounts are disabled #162

Merged
merged 2 commits into from
Oct 14, 2019
Merged

feat: add serviceAccountUserId even if service accounts are disabled #162

merged 2 commits into from
Oct 14, 2019

Conversation

trois-six
Copy link
Contributor

Hi,

I have a module for open_id clients, and I need to set an output with the service_account_user_id to use it after to set a service_account_role on this open_id client. The service_account_user_id attribute only exists when the service_accounts_enabled attribute is set to "true".

In Terraform 0.11, we can't verify if an attribute exists, and in an output like

output "service_account_user_id" {
  value = "${keycloak_openid_client.openid_client.service_accounts_enabled == "true" ? keycloak_openid_client.openid_client.service_account_user_id : ""}"
}

the variables are evaluated before the conditional. I had to patch your provider to always get the attribute, even if service_accounts_enabled is set to "false"...

Regards,

Pierre

Copy link
Owner

@mrparkers mrparkers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reasonable change, thanks for the contribution!

@mrparkers mrparkers merged commit 873c243 into mrparkers:master Oct 14, 2019
@trois-six trois-six deleted the feat/serviceAccountUserId branch December 8, 2019 15:06
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