Skip to content

aws-ec2: Instance.applyCloudFormationInit is private #30863

@Irame

Description

@Irame

Describe the bug

  1. Can not attach CloudFormationInit to an Instance after I created it because Instance.applyCloudFormationInit is not public.

Expected Behavior

I expected to be able to call applyCloudFormationInit to attach my CloudFormationInit to a EC2 Instance, because the documentation said it would be possible.

Current Behavior

I can not call Instance.applyCloudFormationInit beacuse it it private.

Reproduction Steps

Create a ec2.Instance and try to call applyCloudFormationInit on it.

Possible Solution

Make ec2.Instance.applyCloudFormationInit public.

Additional Information/Context

Code location:

private applyCloudFormationInit(init: CloudFormationInit, options: ApplyCloudFormationInitOptions = {}) {

Documentation: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CloudFormationInit.html#:~:text=As%20an%20app%20builder%2C%20use%20instance.applyCloudFormationInit()

CDK CLI Version

2.149.0

Framework Version

No response

Node.js Version

v20.11.0

OS

Windows

Language

TypeScript

Language Version

5.5.2

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions