Provides a Cognito User Pool UI Customization resource.
resource "aws_cognito_user_pool" "example" {
name = "example"
}
resource "aws_cognito_user_pool_domain" "example" {
domain = "example"
user_pool_id = aws_cognito_user_pool.example.id
}
resource "aws_cognito_user_pool_client" "example" {
name = "example"
user_pool_id = aws_cognito_user_pool.example.id
}
resource "aws_cognito_user_pool_ui_customization" "example" {
client_id = aws_cognito_user_pool_client.example.id
css = ".label-customizable {font-weight: 400;}"
image_file = filebase64("logo.png")
# Refer to the aws_cognito_user_pool_domain resource's
# user_pool_id attribute to ensure it is in an 'Active' state
user_pool_id = aws_cognito_user_pool_domain.example.user_pool_id
}
resource "aws_cognito_user_pool" "example" {
name = "example"
}
resource "aws_cognito_user_pool_domain" "example" {
domain = "example"
user_pool_id = aws_cognito_user_pool.example.id
}
resource "aws_cognito_user_pool_ui_customization" "example" {
css = ".label-customizable {font-weight: 400;}"
image_file = filebase64("logo.png")
# Refer to the aws_cognito_user_pool_domain resource's
# user_pool_id attribute to ensure it is in an 'Active' state
user_pool_id = aws_cognito_user_pool_domain.example.user_pool_id
}
This resource supports the following arguments:
client_id
(Optional) The client ID for the client app. Defaults to ALL
. If ALL
is specified, the css
and/or image_file
settings will be used for every client that has no UI customization set previously.css
(Optional) - The CSS values in the UI customization, provided as a String. At least one of css
or image_file
is required.image_file
(Optional) - The uploaded logo image for the UI customization, provided as a base64-encoded String. Drift detection is not possible for this argument. At least one of css
or image_file
is required.user_pool_id
(Required) - The user pool ID for the user pool.This resource exports the following attributes in addition to the arguments above:
creation_date
- The creation date in RFC3339 format for the UI customization.css_version
- The CSS version number.image_url
- The logo image URL for the UI customization.last_modified_date
- The last-modified date in RFC3339 format for the UI customization.In Terraform v1.5.0 and later, use an import
block to import Cognito User Pool UI Customizations using the user_pool_id
and client_id
separated by ,
. For example:
import {
to = aws_cognito_user_pool_ui_customization.example
id = "us-west-2_ZCTarbt5C,12bu4fuk3mlgqa2rtrujgp6egq"
}
Using terraform import
, import Cognito User Pool UI Customizations using the user_pool_id
and client_id
separated by ,
. For example:
% terraform import aws_cognito_user_pool_ui_customization.example us-west-2_ZCTarbt5C,12bu4fuk3mlgqa2rtrujgp6egq