diff --git a/CHANGELOG.md b/CHANGELOG.md index db1e578..f8e6532 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ Dropping a requirement of a major version of a dependency is a new contract. ## [Unreleased] [Unreleased]: https://github.com/atlassian-labs/aws-resources/compare/release-1.18.0...master +### Fixed +- Fix binary incompatibility of `Investment.copy` with the previous minor version. + ## [1.18.0] - 2024-11-29 [1.18.0]: https://github.com/atlassian-labs/aws-resources/compare/release-1.17.0...release-1.18.0 diff --git a/src/main/kotlin/com/atlassian/performance/tools/aws/api/Investment.kt b/src/main/kotlin/com/atlassian/performance/tools/aws/api/Investment.kt index c7b4cc3..2c0f2ac 100644 --- a/src/main/kotlin/com/atlassian/performance/tools/aws/api/Investment.kt +++ b/src/main/kotlin/com/atlassian/performance/tools/aws/api/Investment.kt @@ -50,6 +50,24 @@ private constructor( */ fun tag(): List = tagAtlassianAwsAccountability() + tagLifecycle() + tagInitiator() + /** + * Added for backwards compatibility. + * TODO: To be removed in the next major version. + */ + fun copy( + useCase: String = this.useCase, + lifespan: Duration = this.lifespan, + disposable: Boolean = this.disposable, + reuseKey: () -> String = this.reuseKey + ): Investment { + return Investment( + useCase = useCase, + lifespan = lifespan, + disposable = disposable, + reuseKey = reuseKey + ) + } + /** * @return tags required by all Atlassian AWS accounts */