Closed MeTimesThree closed 1 day ago
Thank you for an excellent repro, this is indeed a bug in the provider. I have narrowed it down to this spot:
The type of "configuration" is a union of possibilities and this code incorrectly selects option 1 instead of option 2.
I filed https://github.com/pulumi/pulumi-aws-native/issues/1849 for the root cause.
What happened?
We receive a strange error when trying to create a new Datazone-DataSource.
We see: ValidationException: Model validation failed (#/Configuration: #: 2 subschemas matched instead of one
In the debug-log we see a succesful Unmarshaling:
I1122 12:56:31.903150 32148 rpc.go:292] Unmarshaling property for RPC[aws-native.Create(urn:pulumi:datenkatalog::datenkatalog::aws-native:datazone:DataSource::kk_source_redshift-poc-dp).properties]: configuration={map[redshiftRunConfiguration:{map[dataAccessRole:{arn:aws:iam::381492292231:role/datazone-redshift-manage-access-role-poc-dpServRole} redshiftCredentialConfiguration:{map[secretManagerArn:{arn:aws:secretsmanager:eu-central-1:381492292231:secret:kk_redshift_credentials202411212-poc-dp-StKPm2}]} redshiftStorage:{map[redshiftClusterSource:{map[clusterName:{redshift-poc-dp}]}]} relationalFilterConfigurations:{[{map[databaseName:{dwh_poc_db} filterExpressions:{[{map[expression:{*} type:{INCLUDE}]}]} schemaName:{public}]}]}]}]}
But then a DesiredState with a seemingly empty configuration appears in the log:
{"ClientToken":"fb7c17f6-ccc3-4b39-8bb7-c2f67e920ebb","DesiredState":"{\"Configuration\":{},\"Description\":\"KK DataSource des PoC\",\"DomainIdentifier\":\"dzd_arcll8lb4xk7bf\",\"EnvironmentIdentifier\":\"boyub3bhivj4ln\",\"Name\":\"kk_source_redshift-poc-dp\",\"ProjectIdentifier\":\"4bdmaeh6uinsej\",\"PublishOnImport\":true,\"Recommendation\":{\"EnableBusinessNameGeneration\":false},\"Type\":\"REDSHIFT\"}","TypeName":"AWS::DataZone::DataSource"}
Example
This is the Pulumi-main that fails: Pulumi-Main It needs the following dependency: SftSecurityGroup
The CLI works fine with the following commands: AWS CLI Call
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).