aws / aws-ssm-data-protection-provider-for-aspnet

An extension library to assist with ASP.NET data protection in AWS Lambda.
Apache License 2.0
58 stars 21 forks source link

Add support for tagging parameters #45

Closed martincostello closed 1 year ago

martincostello commented 1 year ago

Describe the feature

Add the ability to configure tag(s) to apply to parameters that are created in the parameter store.

Use Case

To make it easier to track resources in the Parameter Store which are created by applications using the NuGet package.

Proposed Solution

Extend PersistOptions with an IDictionary<string, string> (or similar) which is used to apply any user-specified tags to created parameters.

namespace Amazon.AspNetCore.DataProtection.SSM;

 public class PersistOptions
 {
     public string KMSKeyId { get; set; }
     public TierStorageMode TierStorageMode { get; set; } = TierStorageMode.StandardOnly;
+    public IDictionary<string, string> Tags { get; set; } = new Dictionary<string, string>();
 }

Other Information

No response

Acknowledgements

AWS .NET SDK and/or Package version used

Amazon.AspNetCore.DataProtection.SSM 3.0.0.

Targeted .NET Platform

.NET 7

Operating System and version

Linux 5.4.172-90.336.amzn2.x86_64 #1 SMP Wed Jan 19 23:08:01 UTC 2022

ashishdhingra commented 1 year ago

@martincostello Thanks for opening feature request. Please confirm if you are referring to Tagging Systems Manager parameters and adding support to the library.

martincostello commented 1 year ago

Yes, that's correct. I saw that the library created new parameters for the keys at runtime, but when viewing them in the AWS Console they had no tags.

saviour123 commented 1 year ago

Can the tagging feature be made optional like the .ApplicaitonName()

normj commented 1 year ago

@martincostello I think this sounds like a great feature idea. If you are interested in doing a PR for it that is more likely to make it get done and released sooner. Otherwise we can add it to our queue. If you do make a PR feel free to tag me.

@saviour123 I'm not sure what you mean by optional. If the Tags collection is empty then no tags would be applied to the parameter.

martincostello commented 1 year ago

Thanks Norm - I’ll see if I can make a start on something next week.

martincostello commented 1 year ago

@normj Opened #48 to implement this.

github-actions[bot] commented 1 year ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

normj commented 1 year ago

Feature is released as part of version 3.1.0