-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws_iam: CfnOIDCProviderProps property thumbprintList
should be optional, instead required
#31050
Comments
The referenced iam.generated defines the export interface CfnOIDCProviderProps {
/**
* A list of client IDs (also known as audiences) that are associated with the specified IAM OIDC provider resource object.
*
* For more information, see [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-clientidlist
*/
readonly clientIdList?: Array<string>;
/**
* A list of tags that are attached to the specified IAM OIDC provider.
*
* The returned list of tags is sorted by tag key. For more information about tagging, see [Tagging IAM resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html) in the *IAM User Guide* .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-tags
*/
readonly tags?: Array<cdk.CfnTag>;
/**
* A list of certificate thumbprints that are associated with the specified IAM OIDC provider resource object.
*
* For more information, see [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-thumbprintlist
*/
readonly thumbprintList: Array<string>;
/**
* The URL that the IAM OIDC provider resource object is associated with.
*
* For more information, see [CreateOpenIDConnectProvider](https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateOpenIDConnectProvider.html) .
*
* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-oidcprovider.html#cfn-iam-oidcprovider-url
*/
readonly url?: string;
} Notice that the {
"typeName" : "AWS::IAM::OIDCProvider",
"description" : "Resource Type definition for AWS::IAM::OIDCProvider",
"additionalProperties" : false,
"properties" : {
"ClientIdList" : {
"type" : "array",
"insertionOrder" : false,
"items" : {
"minLength" : 1,
"maxLength" : 255,
"type" : "string"
}
},
...
"ThumbprintList" : {
"type" : "array",
"insertionOrder" : false,
"items" : {
"minLength" : 40,
"maxLength" : 40,
"pattern" : "[0-9A-Fa-f]{40}",
"type" : "string"
},
"maxItems" : 5
},
...
}, Unsure why @williwlwilliwll Thanks for reporting the issue. Are you able to workaround this issue by setting new iam.CfnOIDCProvider(this, 'TestOIDCCfn', {
url: 'http://localhost.com', // set the URL
thumbprintList: []
}); Also curious on why you are not using L2 construct new iam.OpenIdConnectProvider(this, 'TestOidc', {
url: 'http://localhost.com'
}); Thanks, |
Thanks for your reply. If you give
I will try using the L2 constuct and let you know :). Regarding why I was using the L1 construct - I have found that I prefer them because they are not opinionated so I have greater control over them. Best, |
Hello 👋🏼 The same issue here; while the CloudFormation documentation states that the attribute is optional, CDK throws an error. In my case, I'm defining the OIDC provider in a CloudFormation template (YAML) and deploying it with the help of the |
Internal ticket for CloudFormation team: P147139122 |
any update here? |
Describe the bug
When trying to create a
CfnOIDCProvider
theCfnOIDCProviderProps
interface is insisting that the object have athumbprintList
property despite it being described as optional in the documentation and the source code comments.Expected Behavior
The
thumbprintList
property should either be optional or the documentation should be changedCurrent Behavior
If you attempt to not include the property then you get the following error:
If you add the property and assign an empty array as its value then you get the following error during stack deployment:
Reproduction Steps
Possible Solution
Change the CfnOIDCProviderProps interface as follows:
Additional Information/Context
No response
CDK CLI Version
2.151
Framework Version
No response
Node.js Version
22.5.1
OS
MacOS Sonoma 14.6
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: