Skip to content

(aws-apprunner-alpha): serviceName property being ignored  #26237

@roketworks

Description

@roketworks

Describe the bug

When creating an AppRunner service using the Service construct the serviceName property is ignored and a generated service name is used.

Expected Behavior

The serviceName property gets populated into the Cfn resource in the template

Current Behavior

The CloudFormation templated generated by cdk synth is missing the serviceName property.

Reproduction Steps

const repo = ecr.Repository.fromRepositoryName(this, 'repo', 'app')

new apprunner.Service(this, 'Service', {
    serviceName: 'app',
    cpu: apprunner.Cpu.QUARTER_VCPU,
    memory: apprunner.Memory.HALF_GB,
    source: apprunner.Source.fromEcr({
      repository: repo,
      imageConfiguration: { port: 80 },
    })
  })

Possible Solution

const resource = new CfnService(this, 'Resource', {

The property is not used as an input into the L1 construct

Additional Information/Context

No response

CDK CLI Version

2.86.0

Framework Version

2.86.

Node.js Version

19

OS

MacOS

Language

Typescript

Language Version

No response

Other information

#23351 (comment) - referenced in this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-apprunnerRelated to the apprunner packagebugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions