Skip to main content

Update an External ID

For security purposes, you can update the external ID provided on your DW service unit console. This section guides you on using Terraform to complete this operation.


Use a Terraform script to update an external ID

To use the script, ensure you have obtained the API key that allows you to call Relyt Open API operations.

tip

To obtain an API key, sign in to your Relyt console, choose API Keys from the top navigation bar, and click + API key to create one.

  1. Download the latest Terraform script from:

    https://github.com/relytcloud/terraform-provider-relyt/tree/main/docs/demo/terraform/modules/relyt

    Following is a code snippet example from the module for updating external IDs. You can adjust the parameters according to your needs.

    terraform {
    required_providers {
    relyt = {
    source = "relytcloud/relyt"
    }
    }
    }

    provider "relyt" {
    role = "SYSTEMADMIN"
    }

    resource "relyt_dwsu_integration_info" "integration_info" {
    dwsu_id = "<dwsu_id>"
    integration_info = {
    external_id = "<external_id>"
    }
    }

    Parameter description:

    ParameterDescription
    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 DW service unit.
    external_idThe current external ID.

  2. 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.

  3. Run the following command to initialize the Terraform working directory.

    terraform init
  4. Run the following command to apply the module. For details about how to obtain the API key, view the instructions provided at the start of this section.

    terraform apply --target=module.integration_info
  5. Enter yes to confirm the operation.

After the external ID is updated, you can obtain the new external ID by performing the following operations:

  1. Sign in to the DW service unit console.

  2. Choose Access Control > Output Location or Access Control > Lake Formation.

  3. Expand the Configure Cross-Account IAM Role section and copy the value of the External ID field.