From 625ea11fa4b56197fe58d9c28ad38320fce7da08 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Fri, 23 Feb 2024 17:42:38 -0700 Subject: [PATCH] feat(EC2VPCEndpointServiceConfiguration): add tags to properties (#100) --- resources/ec2-vpc-endpoint-service-configurations.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/ec2-vpc-endpoint-service-configurations.go b/resources/ec2-vpc-endpoint-service-configurations.go index 99e34774..8767791a 100644 --- a/resources/ec2-vpc-endpoint-service-configurations.go +++ b/resources/ec2-vpc-endpoint-service-configurations.go @@ -45,6 +45,7 @@ func (l *EC2VPCEndpointServiceConfigurationLister) List(_ context.Context, o int svc: svc, id: serviceConfig.ServiceId, name: serviceConfig.ServiceName, + tags: serviceConfig.Tags, }) } @@ -62,6 +63,7 @@ type EC2VPCEndpointServiceConfiguration struct { svc *ec2.EC2 id *string name *string + tags []*ec2.Tag } func (e *EC2VPCEndpointServiceConfiguration) Remove(_ context.Context) error { @@ -73,12 +75,19 @@ func (e *EC2VPCEndpointServiceConfiguration) Remove(_ context.Context) error { if err != nil { return err } + return nil } func (e *EC2VPCEndpointServiceConfiguration) Properties() types.Properties { properties := types.NewProperties() + properties.Set("ID", e.id) properties.Set("Name", e.name) + + for _, tag := range e.tags { + properties.SetTag(tag.Key, tag.Value) + } + return properties }