Hi all, We receive a strange error when using pyt...
# aws
d
Hi all, We receive a strange error when using python and aws-native to create a new Datazone-DataSource. The CLI works fine with the following:
Copy code
echo '{
    "configuration": {
        "redshiftRunConfiguration": {
            "dataAccessRole": "arn:aws:iam::<account>:role/datazone-redshift-manage-access-role-poc-dpServRole",
            "redshiftCredentialConfiguration": {
                "secretManagerArn": "arn:aws:secretsmanager:eu-central-1:<account>:secret:kk_redshift_credentials202411212-poc-dp-StKPm2"
            },
            "redshiftStorage": {
                "redshiftClusterSource": {
                    "clusterName": "redshift-poc-dp"
                }
            },
            "relationalFilterConfigurations": [
                {
                    "databaseName": "dwh_poc_db",
                    "filterExpressions": [
                        {
                            "expression": "*",
                            "type": "INCLUDE"
                        }
                    ],
                    "schemaName": "public"
                }
            ]
        }
    },
    "description": "Testdescr",
    "domainIdentifier": "<domain>",
    "enableSetting": "ENABLED",
    "environmentIdentifier": "boyub3bhivj4ln",
    "name": "CLISKELETTEST",
    "projectIdentifier": "<project>",
    "publishOnImport": false,
    "recommendation": {
        "enableBusinessNameGeneration": true
    },
    "type": "REDSHIFT"
}
' > req2.json
aws datazone create-data-source --cli-input-json <file://req2.json>
Pulumi generates the following:
Copy code
configuration        : {
    redshiftRunConfiguration: {
        dataAccessRole                 : "arn:aws:iam::<account>:role/datazone-redshift-manage-access-role-poc-dpServRole"
        redshiftCredentialConfiguration: {
            secretManagerArn: "arn:aws:secretsmanager:eu-central-1:<account>:secret:kk_redshift_credentials202411212-poc-dp-StKPm2"
        }
        redshiftStorage                : {
            redshiftClusterSource: {
                clusterName: "redshift-poc-dp"
            }
        }
        relationalFilterConfigurations : [
            [0]: {
                databaseName     : "dwh_poc_db"
                filterExpressions: [
                    [0]: {
                        expression: "*"
                        type      : "INCLUDE"
                    }
                ]
                schemaName       : "public"
            }
        ]
    }
}
description          : "KK DataSource des PoC"
domainIdentifier     : "<domain>"
environmentIdentifier: "boyub3bhivj4ln"
name                 : "kk_source_redshift-poc-dp"
projectIdentifier    : "<project>"
publishOnImport      : true
recommendation       : {
    enableBusinessNameGeneration: false
}
type                 : "REDSHIFT"
This seems identical to our working CLI-reference, but we receive the following error: ValidationException: Model validation failed (#/Configuration: #: 2 subschemas matched instead of one Would anybody have any tips on how to debug this?
q
Hey, aws-native integrates with AWS CloudControl to interact with all the different AWS services. There could be an issue with the requests Pulumi sends to CloudControl, or how CloudControl interacts with the DataZone service. Could you please open an issue here including an example that reproduces this issue so we can dig into it?
d
I will happily create a ticket.
The ticket can be found here: Issue 1846