File tree 1 file changed +9
-4
lines changed
packages/pulumi-aws/src/apps/core/cognitoIdentityProviders 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,15 @@ export const configureAdminCognitoFederation = (
74
74
for ( const idp of config . identityProviders ) {
75
75
const config = getIdpConfig ( idp . type , userPool . output . id , idp ) ;
76
76
77
- app . addResource ( aws . cognito . IdentityProvider , {
78
- name : config . providerName . toString ( ) ,
79
- config
80
- } ) ;
77
+ // The idea to lowercase the provider name emerged while working on backwards compatibility issue.
78
+ // Basically, in cases where a user used the OIDC provider and did not specify a name, instead of
79
+ // using `OIDC` as the name, we wanted to ensure `oidc` is used. But, what I soon realized is that
80
+ // by simply lowercasing the name, we can avoid the need to check for the provider type and name.
81
+ // And although this will now happen for all providers, it's not a problem since Pulumi requires
82
+ // names to be all lowercase anyway.
83
+ const name = config . providerName . toString ( ) . toLowerCase ( ) ;
84
+
85
+ app . addResource ( aws . cognito . IdentityProvider , { name, config } ) ;
81
86
82
87
idpConfigs . push ( config ) ;
83
88
}
You can’t perform that action at this time.
0 commit comments