Describe the bug
The example provided in VpcIngressConnection does not work as the service method accepts software.amazon.awscdk.services.apprunner.alpha.IService. the service created in line 7 is of type software.amazon.awscdk.services.apprunner.alpha.Service which does not inherit from IService leading to a compilation error in the second last line when using VpcIngressConnection#service(IService)
InterfaceVpcEndpoint interfaceVpcEndpoint = InterfaceVpcEndpoint.Builder.create(this, "MyVpcEndpoint")
.vpc(vpc)
.service(InterfaceVpcEndpointAwsService.APP_RUNNER_REQUESTS)
.privateDnsEnabled(false)
.build();
Service service = Service.Builder.create(this, "Service")
.source(Source.fromEcrPublic(EcrPublicProps.builder()
.imageConfiguration(ImageConfiguration.builder()
.port(8000)
.build())
.imageIdentifier("public.ecr.aws/aws-containers/hello-app-runner:latest")
.build()))
.isPubliclyAccessible(false)
.build();
VpcIngressConnection.Builder.create(this, "VpcIngressConnection")
.vpc(vpc)
.interfaceVpcEndpoint(interfaceVpcEndpoint)
.service(service). // incompatible types
.build();
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
VpcIngressConnection#service(Service) should not throw a compilation error when passing a service.
Current Behavior
A compilation error in the second last line when using VpcIngressConnection#service(IService) with the service created by Service.Builder#create()
Reproduction Steps
Just use the provided example in the documentation
Possible Solution
Either
- Make
Service inherit IService or
- Change
VpcIngressConnection#service(IService) to VpcIngressConnection#service(Service)
Additional Information/Context
No response
CDK CLI Version
2.174.0
Framework Version
No response
Node.js Version
v23.5.0
OS
Mac
Language
Java
Language Version
21
Other information
No response
Describe the bug
The example provided in
VpcIngressConnectiondoes not work as the service method acceptssoftware.amazon.awscdk.services.apprunner.alpha.IService. the service created in line 7 is of typesoftware.amazon.awscdk.services.apprunner.alpha.Servicewhich does not inherit fromIServiceleading to a compilation error in the second last line when usingVpcIngressConnection#service(IService)Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
VpcIngressConnection#service(Service)should not throw a compilation error when passing a service.Current Behavior
A compilation error in the second last line when using
VpcIngressConnection#service(IService)with the service created byService.Builder#create()Reproduction Steps
Just use the provided example in the documentation
Possible Solution
Either
ServiceinheritIServiceorVpcIngressConnection#service(IService)toVpcIngressConnection#service(Service)Additional Information/Context
No response
CDK CLI Version
2.174.0
Framework Version
No response
Node.js Version
v23.5.0
OS
Mac
Language
Java
Language Version
21
Other information
No response