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

Added okta_user_admin_roles resources #518

Merged
merged 5 commits into from
Jul 13, 2021
Merged

Added okta_user_admin_roles resources #518

merged 5 commits into from
Jul 13, 2021

Conversation

gavinbunney
Copy link
Contributor

Allow for user admin roles to be managed outside the user schema.

Needed to allow directory based users to not have to have an explicit user schema created, and rather just manage the admin_roles in Terraform.

Validation

Tested via acceptance tests

Description: "ID of a Okta User",
ForceNew: true,
},
"admin_roles": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please add a validator here?

"admin_roles": {
	Type:        schema.TypeSet,
	Optional:    true,
	Description: "User Okta admin roles - ie. ['APP_ADMIN', 'USER_ADMIN']",
	Elem: &schema.Schema{
		Type:             schema.TypeString,
		ValidateDiagFunc: elemInSlice(validAdminRoles),
	},
},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@bogdanprodan-okta
Copy link
Contributor

You could also go ahead and deprecate admin_roles in okta_user.

@gavinbunney
Copy link
Contributor Author

You could also go ahead and deprecate admin_roles in okta_user.

@bogdanprodan-okta Great idea. Deprecated & added note to the docs

@bogdanprodan-okta bogdanprodan-okta merged commit b6d8dcf into okta:master Jul 13, 2021
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