|
| 1 | +--- |
| 2 | +page_title: "morpheus_saml_identity_source Resource - terraform-provider-morpheus" |
| 3 | +subcategory: "" |
| 4 | +description: |- |
| 5 | + Provides a saml identity source resource |
| 6 | +--- |
| 7 | + |
| 8 | +# morpheus_saml_identity_source |
| 9 | + |
| 10 | +Provides a saml identity source resource |
| 11 | + |
| 12 | +## Example Usage |
| 13 | + |
| 14 | +```terraform |
| 15 | +data "morpheus_tenant" "demo_tenant" { |
| 16 | + name = "Demo" |
| 17 | +} |
| 18 | +
|
| 19 | +resource "morpheus_saml_identity_source" "addemo" { |
| 20 | + tenant_id = morpheus_tenant.demo_tenant.id |
| 21 | + name = "samldemo" |
| 22 | + description = "TF example SAML identity source" |
| 23 | + login_redirect_url = "https://tfexamplesaml.test.local:8443/realms/master/protocol/saml" |
| 24 | + logout_redirect_url = "https://tfexamplesaml.test.local:8443/realms/master/protocol/saml" |
| 25 | + include_saml_request_parameter = true |
| 26 | + saml_request = "SelfSigned" |
| 27 | + validate_assertion_signature = false |
| 28 | + given_name_attribute = "givenName" |
| 29 | + surname_attribute = "surname" |
| 30 | + email_attribute = "email" |
| 31 | + default_account_role_id = 4 |
| 32 | + role_attribute_name = "memberOf" |
| 33 | + required_role_attribute_value = "test" |
| 34 | + role_mapping { |
| 35 | + role_id = 4 |
| 36 | + role_name = "Demo" |
| 37 | + assertion_attribute = "developers" |
| 38 | + } |
| 39 | +
|
| 40 | + role_mapping { |
| 41 | + role_id = 5 |
| 42 | + role_name = "tf-example-user-role" |
| 43 | + assertion_attribute = "developers" |
| 44 | + } |
| 45 | + enable_role_mapping_permission = false |
| 46 | +} |
| 47 | +``` |
| 48 | + |
| 49 | +<!-- schema generated by tfplugindocs --> |
| 50 | +## Schema |
| 51 | + |
| 52 | +### Required |
| 53 | + |
| 54 | +- `default_account_role_id` (Number) The id of the default role a user is assigned when they are in the required group or if no specific group mapping applies to the user |
| 55 | +- `name` (String) The name of the SAML identity source |
| 56 | +- `tenant_id` (Number) The ID of the Morpheus tenant to associate the identity source with |
| 57 | + |
| 58 | +### Optional |
| 59 | + |
| 60 | +- `description` (String) The description of the SAML identity source |
| 61 | +- `email_attribute` (String) SAML SP field value to map to Morpheus user email address |
| 62 | +- `enable_role_mapping_permission` (Boolean) When enabled, Tenant users with appropriate rights to view and edit Roles will have the ability to set role mapping for the Identity Source integration |
| 63 | +- `given_name_attribute` (String) SAML SP field value to map to Morpheus user First Name |
| 64 | +- `include_saml_request_parameter` (Boolean) Whether to include the SAML request as a parameter |
| 65 | +- `login_redirect_url` (String) This is the SAML endpoint Morpheus will redirect to when a user signs into Morpheus via SAML |
| 66 | +- `logout_redirect_url` (String) The URL Morpheus will POST to when a SAML user logs out of Morpheus |
| 67 | +- `required_role_attribute_value` (String) The name of the attribute/assertion field that maps to the required role |
| 68 | +- `role_attribute_name` (String) The name of the attribute/assertion field that will map to Morpheus roles, such a MemberOf |
| 69 | +- `role_mapping` (Block Set) The SAML to Morpheus Role mapping (see [below for nested schema](#nestedblock--role_mapping)) |
| 70 | +- `saml_request` (String) The SAML request configuration (NoSignature, SelfSigned, CustomSignature) |
| 71 | +- `surname_attribute` (String) SAML SP field value to map to Morpheus user Last Name |
| 72 | +- `validate_assertion_signature` (Boolean) Whether to validate the assertion signature (SAML RESPONSE field in the UI) |
| 73 | + |
| 74 | +### Read-Only |
| 75 | + |
| 76 | +- `id` (String) The ID of the SAML identity source |
| 77 | + |
| 78 | +<a id="nestedblock--role_mapping"></a> |
| 79 | +### Nested Schema for `role_mapping` |
| 80 | + |
| 81 | +Optional: |
| 82 | + |
| 83 | +- `assertion_attribute` (String) The assertion attribute to map the role to |
| 84 | +- `role_id` (Number) The id of the Morpheus role to map to |
| 85 | +- `role_name` (String) The name or authority of the Morpheus role to map to |
| 86 | + |
| 87 | +## Import |
| 88 | + |
| 89 | +Import is supported using the following syntax: |
| 90 | + |
| 91 | +```shell |
| 92 | +terraform import morpheus_saml_identity_source.tf_example_saml_identity_source 1 |
| 93 | +``` |
0 commit comments