diff --git a/packages/cli/templates/infra-local/cognito-local/db/local_2G7noHgW.json b/packages/cli/templates/infra-local/cognito-local/db/local_2G7noHgW.json index 20ad2ce..6f60848 100644 --- a/packages/cli/templates/infra-local/cognito-local/db/local_2G7noHgW.json +++ b/packages/cli/templates/infra-local/cognito-local/db/local_2G7noHgW.json @@ -10,6 +10,18 @@ "Name": "email", "Value": "admin@test.com" }, + { + "Name": "custom:tenant_code", + "Value": "mbc" + }, + { + "Name": "custom:company_code", + "Value": "00000" + }, + { + "Name": "custom:member_id", + "Value": "MEMBER#mbc#00000#99999" + }, { "Name": "custom:roles", "Value": "[{\"role\":\"system_admin\"}]" @@ -248,6 +260,39 @@ "MinValue": "0" } }, + { + "Name": "custom:tenant_code", + "AttributeDataType": "String", + "DeveloperOnlyAttribute": false, + "Mutable": true, + "Required": false, + "StringAttributeConstraints": { + "MinLength": "0", + "MaxLength": "50" + } + }, + { + "Name": "custom:company_code", + "AttributeDataType": "String", + "DeveloperOnlyAttribute": false, + "Mutable": true, + "Required": false, + "StringAttributeConstraints": { + "MinLength": "0", + "MaxLength": "50" + } + }, + { + "Name": "custom:member_id", + "AttributeDataType": "String", + "DeveloperOnlyAttribute": false, + "Mutable": true, + "Required": false, + "StringAttributeConstraints": { + "MinLength": "0", + "MaxLength": "2048" + } + }, { "Name": "custom:roles", "AttributeDataType": "String", @@ -255,8 +300,8 @@ "Mutable": true, "Required": false, "StringAttributeConstraints": { - "MinLength": "1", - "MaxLength": "10" + "MinLength": "0", + "MaxLength": "2048" } } ], diff --git a/packages/cli/templates/infra/libs/infra-stack.ts b/packages/cli/templates/infra/libs/infra-stack.ts index fe117e6..5199136 100644 --- a/packages/cli/templates/infra/libs/infra-stack.ts +++ b/packages/cli/templates/infra/libs/infra-stack.ts @@ -72,9 +72,9 @@ export class InfraStack extends cdk.Stack { mfa: cdk.aws_cognito.Mfa.OFF, accountRecovery: cdk.aws_cognito.AccountRecovery.NONE, customAttributes: { - cci_code: new cdk.aws_cognito.StringAttribute({ + tenant_code: new cdk.aws_cognito.StringAttribute({ mutable: true, - maxLen: 20, + maxLen: 50, }), company_code: new cdk.aws_cognito.StringAttribute({ mutable: true, @@ -84,10 +84,7 @@ export class InfraStack extends cdk.Stack { mutable: true, maxLen: 2024, }), - user_type: new cdk.aws_cognito.StringAttribute({ - mutable: true, - maxLen: 20, - }), + roles: new cdk.aws_cognito.StringAttribute({ mutable: true }), }, email: cdk.aws_cognito.UserPoolEmail.withCognito(), deletionProtection: true,