mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
fix(acm): retain certificate tags during reimport (#8119)
Keep the current tags when replacing an imported certificate under its existing ARN. Certificate.setTags already copies the map and normalizes null, so use that boundary for initial imports and reimports alike. Cover tag retention and replacement material through the AWS SDK in commercial and GovCloud regions, including later tag additions/removals and an untagged certificate. Signed-off-by: Andre Kurait <akurait@amazon.com> Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com> Co-authored-by: Andre Kurait <akurait@amazon.com>
This commit is contained in:
1 parent
654473f754
commit
c0a087a597
4 files changed
+118
-1
No files matched your search
@@ -478,7 +478,7 @@ public class AcmService implements ResourceProvider {
|
||||
cert.setCertificateBody(certificatePem);
|
||||
cert.setPrivateKey(privateKeyPem);
|
||||
cert.setCertificateChain(chainPem);
|
||||
cert.setTags(tags != null ? new HashMap<>(tags) : new HashMap<>());
|
||||
cert.setTags(existing != null ? existing.getTags() : tags);
|
||||
|
||||
String storageKey = regionKey(region, certId);
|
||||
if (existing != null && existing.getInUseBy() != null) {
|
||||
|
||||
Reference in new issue
Block a user