(Amazon.CDK.AWS.EKS.CfnCluster): Documentation sample does not work as shown
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### link to reference doc page
https://docs.aws.amazon.com/cdk/api/v1/dotnet/api/Amazon.CDK.AWS.EKS.CfnCluster.html
### Describe your issue?
.csproj
```
Exe
netcoreapp5
Major
```
EksCdkStack.cs
```
... boilerplate
CfnCluster cfnCluster = new CfnCluster(this, Constants.CLUSTER_PREFIX, new CfnClusterProps
{
ResourcesVpcConfig = new ResourcesVpcConfigProperty
{
SubnetIds = new[] { combinedSubnets },
EndpointPrivateAccess = isClusterPublic ? false : true,
EndpointPublicAccess = isClusterPublic ? true : false,
},
RoleArn = clusterAdmin.RoleArn,
Name = clusterName.ValueAsString,
Version = clusterVersion.ValueAsString
});
... boilerplate
```
Documentation clearly states that we can use 'ResourcesVpcConfig = new ResourcesVpcConfigProperty', but:
- not using ResourcesVpcConfigProperty, I receive the error (cool, as expected):
```
Unhandled exception. Amazon.JSII.Runtime.JsiiException: Missing required properties for aws-cdk-lib.aws_eks.CfnClusterProps: resourcesVpcConfig
```
- using ResourcesVpcConfigProperty, it shows me:
```
The type or namespace name 'ResourcesVpcConfigProperty' could not be found (are you missing a using directive or an assembly reference?
```
- using ResourcesVpcConfig, it shows me:
```
The type or namespace name 'ResourcesVpcConfig' could not be found (are you missing a using directive or an assembly reference?
```
Contributor guide
Research direction
Start with the linked CfnCluster reference page and the shown .csproj and EksCdkStack.cs files, then reproduce the missing-type errors with Amazon.CDK.Lib 2.17.0. Compare the documented C# sample with the API exposed by that package; done means the sample uses an available type and compiles as documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, csharp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100