Skip to content

Commit

Permalink
feat: iam support for redshift source (#1619)
Browse files Browse the repository at this point in the history
Co-authored-by: Vikas26021999 <[email protected]>
  • Loading branch information
vyeshwanth and Vikas26021999 authored Aug 16, 2024
1 parent d52ed7c commit c5195cb
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 1 deletion.
55 changes: 54 additions & 1 deletion src/configurations/sources/redshift/schema.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
{
"configSchema": null
"configSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [],
"type": "object",
"properties": {},
"allOf": [
{
"if": {
"properties": {
"authenticationType": {
"const": "password"
}
},
"required": ["authenticationType"]
},
"then": {
"properties": {
"password": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*"
}
},
"required": ["password"]
}
},
{
"if": {
"properties": {
"authenticationType": {
"const": "iam"
}
},
"required": ["authenticationType"]
},
"then": {
"properties": {
"iamRoleArn": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*"
},
"clusterIdentifier": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*"
},
"region": {
"type": "string",
"pattern": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|.*"
}
},
"required": ["iamRoleArn", "clusterIdentifier", "region"]
}
}
]
}
}
45 changes: 45 additions & 0 deletions src/configurations/sources/redshift/ui-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,56 @@
"required": true,
"trim": true
},
{
"type": "singleSelect",
"label": "Authentication Type",
"value": "authenticationType",
"options": [
{
"name": "IAM",
"value": "iam"
},
{
"name": "Username Password Authentication",
"value": "password"
}
],
"defaultOption": {
"value": "iam"
}
},
{
"type": "textInput",
"required": true,
"preRequisiteField": { "name": "authenticationType", "selectedValue": "iam" },
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"label": "IAM Role ARN",
"placeholder": "E.g: arn:aws:iam::123456789012:role/MyRedshiftRole",
"value": "roleARN"
},
{
"type": "textInput",
"label": "Cluster Identifier",
"value": "clusterIdentifier",
"required": true,
"placeholder": "e.g: warehouse-cluster",
"preRequisiteField": { "name": "authenticationType", "selectedValue": "iam" }
},
{
"type": "textInput",
"label": "Cluster Region",
"value": "region",
"required": true,
"placeholder": "e.g: us-east-1",
"regex": "(^\\{\\{.*\\|\\|(.*)\\}\\}$)|(^env[.].+)|^(.{0,100})$",
"preRequisiteField": { "name": "authenticationType", "selectedValue": "iam" }
},
{
"type": "textInput",
"label": "Password",
"value": "password",
"inputFieldType": "password",
"preRequisiteField": { "name": "authenticationType", "selectedValue": "password" },
"regex": ".*",
"required": true,
"secret": true
Expand Down

0 comments on commit c5195cb

Please sign in to comment.