Enable MFA for DW Users
You can enable Multi-Factor Authentication (MFA) for DW users in the DW service units you own by using Terraform scripts.
For more details about MFA, see Multi-Factor Authentication.
Prerequisites
Ensure that you are the owner of the target DW service unit. For details about how to create a DW service unit, see Create a DW Service Unit.
Ensure you have obtained the following information:
-
An API key
How to obtain: Sign in to your Relyt console, choose API Keys from the top navigation bar, and click + API Key to create one.
-
The endpoint for accessing the DW service unit
For details about how to check endpoints, see Query Endpoints.
Procedure
This section describes how to run a Terraform script to enable MFA for DW users in a DW service unit.
-
Download the latest Terraform script and configure the needed parameters based on your actual situations.
terraform {
required_providers {
relyt = {
source = "relytcloud/relyt"
}
}
}
provider "relyt" {
role = "SYSTEMADMIN"
}
resource "relyt_dwsu_user_policy" "security_constraints" {
dwsu_id = <dwsu_id>
mfa = "MANDATORY"
reset_init_password = true
}Field description:
Field Description sourceThe name of the Relyt plugin. It is fixed to relytcloud/relyt.roleThe system role of your Relyt cloud account. It is fixed to SYSTEMADMIN.dwsu_idThe ID of the target DW service unit. mfaWhether to enable MFA for DW users in the target DW service unit. Possible values are MANDATORYandOPTIONAL.MANDATORYenforces MFA, whileOPTIONALallows it but does not require it.reset_init_passwordWhether to force DW users to reset their initial password upon login. truefor yes andfalsefor no.
-
Run the following command to export the auth key.
export RELYT_AUTH_KEY="<api_key>"Replace
<api_key>with the API key you have obtained. -
Run the following command to initialize the Terraform working directory.
terraform initThe operation is successful when similar information appears as shown in the following picture.

-
Run the following command to apply the module.
terraform apply --target=module.relyt_dwsu_user_policy -
When information similar to the following is displayed, enter
yes.