Replies: 2 comments 1 reply
|
Hi @Tan-Sc , We're investigating the root cause and will include a fix in one of the upcoming releases. We'll make sure to notify you once it's available. 🚀 |
0 replies
|
Hi @Tan-Sc , |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe
Yes. I am currently using Portainer with Azure AD (OAuth) SSO for authentication.
When users log in via Azure SSO, their accounts are automatically provisioned in Portainer. Since these users are created dynamically by the OAuth flow (and not by Terraform resources), my Terraform state is unaware of their existence.
Currently, the Terraform provider lacks Data Sources for Users and Teams. This creates a blocking issue for automating User Access Management:
This forces me to manually look up IDs in the GUI and hardcode them, which breaks the automation workflow for new employee onboarding.
Describe the solution you'd like
I would like to request the implementation of Data Sources to look up existing entities.
Example Usage:
1. Look up the user auto-provisioned by Azure OAuth
data "portainer_user" "azure_user" {
username = "employee@mycompany.onmicrosoft.com"
}
2. Look up the target team
data "portainer_team" "developers" {
name = "Developers"
}
3. Assign the Azure user to the team automatically
resource "portainer_team_membership" "assign_dev" {
team_id = data.portainer_team.developers.id
user_id = data.portainer_user.azure_user.id
role = "member"
}
Describe alternatives you've considered
Hardcoding IDs: Copy-pasting User IDs from the Portainer UI into Terraform variables. This is brittle and unsustainable for managing multiple users.
External Scripts: Using local-exec with curl to hit the Portainer API (/api/users), filtering by username to get the ID, and passing it to Terraform. This adds unnecessary complexity.
Manual Assignment: Manually assigning users to teams in the Portainer UI after they sign in, which defeats the purpose of using IaC.
Additional context
No response
All reactions