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

INTMDB-481: Add support for identity provider display name import #924

Merged
merged 4 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/Federated-Settings/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ resource "mongodbatlas_federated_settings_org_config" "org_connections_import" {
identity_provider_id = var.identity_provider_id
domain_restriction_enabled = false
domain_allow_list = ["yourdomain.com"]
post_auth_role_grants = ["ORG_MEMBER"]
}

resource "mongodbatlas_federated_settings_identity_provider" "identity_provider" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ func resourceMongoDBAtlasFederatedSettingsIdentityProviderImportState(ctx contex
return nil, fmt.Errorf("error setting Identity Provider in Federation settings (%s): %s", d.Id(), err)
}

if err := d.Set("name", federatedSettingsIdentityProvider.DisplayName); err != nil {
return nil, fmt.Errorf("error setting name (%s): %s", d.Id(), err)
}

if err := d.Set("sso_debug_enabled", federatedSettingsIdentityProvider.SsoDebugEnabled); err != nil {
return nil, fmt.Errorf("error setting sso debug enabled (%s): %s", d.Id(), err)
}
Expand Down
3 changes: 2 additions & 1 deletion website/docs/d/federated_settings_org_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resource "mongodbatlas_federated_settings_org_config" "org_connections" {
org_id = "627a9683ea7ff7f74de306f14"
domain_restriction_enabled = false
domain_allow_list = ["mydomain.com"]
post_auth_role_grants = ["ORG_MEMBER"]
}

data "mongodbatlas_federated_settings_org_config" "org_configs_ds" {
Expand All @@ -41,7 +42,7 @@ In addition to all arguments above, the following attributes are exported:
* `domain_allow_list` - List that contains the approved domains from which organization users can log in. Note: If the organization uses an identity provider, `domain_allow_list` includes: any SSO domains associated with organization's identity provider and any custom domains associated with the specific organization.
* `domain_restriction_enabled` - Flag that indicates whether domain restriction is enabled for the connected organization. User Conflicts returns null when `domain_restriction_enabled` is false.
* `identity_provider_id` - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
* `post_auth_role_grants` - List that contains the default [roles](https://www.mongodb.com/docs/atlas/reference/user-roles/#std-label-organization-roles) granted to users who authenticate through the IdP in a connected organization. If you provide a postAuthRoleGrants field in the request, the array that you provide replaces the current postAuthRoleGrants.
* `post_auth_role_grants` - List that contains the default [roles](https://www.mongodb.com/docs/atlas/reference/user-roles/#std-label-organization-roles) granted to users who authenticate through the IdP in a connected organization.

### Role_mappings
* `external_group_name` - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
Expand Down
3 changes: 2 additions & 1 deletion website/docs/d/federated_settings_org_configs.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ resource "mongodbatlas_federated_settings_org_config" "org_connections" {
org_id = "627a9683ea7ff7f74de306f14"
domain_restriction_enabled = false
domain_allow_list = ["mydomain.com"]
post_auth_role_grants = ["ORG_MEMBER"]
}

data "mongodbatlas_federated_settings_org_configs" "org_configs_ds" {
Expand All @@ -45,7 +46,7 @@ In addition to all arguments above, the following attributes are exported:
* `domain_restriction_enabled` - Flag that indicates whether domain restriction is enabled for the connected organization.
* `identity_provider_id` - Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
* `org_id` - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
* `post_auth_role_grants` - List that contains the default roles granted to users who authenticate through the IdP in a connected organization. If you provide a postAuthRoleGrants field in the request, the array that you provide replaces the current postAuthRoleGrants.
* `post_auth_role_grants` - List that contains the default roles granted to users who authenticate through the IdP in a connected organization.

### Role_mappings
* `external_group_name` - Unique human-readable label that identifies the identity provider group to which this role mapping applies.
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/federated_settings_org_config.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ resource "mongodbatlas_federated_settings_org_config" "org_connection" {
org_id = "627a9683ea7ff7f74de306f14"
domain_restriction_enabled = false
domain_allow_list = ["mydomain.com"]
post_auth_role_grants = ["ORG_MEMBER"]
identity_provider_id = "0oad4fas87jL7f75Xnk1297"
}

Expand All @@ -34,6 +35,8 @@ data "mongodbatlas_federated_settings_org_configs" "org_configs_ds" {
* `federation_settings_id` - (Required) Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
* `org_id` - (Required) Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
* `domain_allow_list` - List that contains the approved domains from which organization users can log in.
* `post_auth_role_grants` - (Optional) List that contains the default [roles](https://www.mongodb.com/docs/atlas/reference/user-roles/#std-label-organization-roles) granted to users who authenticate through the IdP in a connected organization.

* `domain_restriction_enabled` - (Required) Flag that indicates whether domain restriction is enabled for the connected organization.
* `identity_provider_id` - (Required) Unique 24-hexadecimal digit string that identifies the federated authentication configuration.

Expand Down