Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ec2): exposed userDataCausesReplacement in BastionHostLinuxProps (#…
…31416) ### Issue # (if applicable) Closes #31348. ### Reason for this change When creating a Bastion host, customer is using instance's userData to write approved public keys to `.ssh/authorized_keys`. However, when changing the list of authorized keys, it does not trigger the instance to be replaced, so the modification has no effect. ### Description of changes Exposed `userDataCausesReplacement` in `BastionHostLinuxProps`. The value is passed down to downstream `AWS::EC2::Instance` resource. ### Description of how you validated changes Added unit and integration tests. **NOTE:** Re-invoking `Template.fromStack(stack)` doesn't change the resource Id, so unit test uses 2 stacks. May be invoking `Template.fromStack(stack)` caches the results and doesn't refresh it. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information