Skip to content

Commit

Permalink
feat(EC2VPCEndpointServiceConfiguration): add tags to properties (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen authored Feb 24, 2024
1 parent de42561 commit 625ea11
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/ec2-vpc-endpoint-service-configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func (l *EC2VPCEndpointServiceConfigurationLister) List(_ context.Context, o int
svc: svc,
id: serviceConfig.ServiceId,
name: serviceConfig.ServiceName,
tags: serviceConfig.Tags,
})
}

Expand All @@ -62,6 +63,7 @@ type EC2VPCEndpointServiceConfiguration struct {
svc *ec2.EC2
id *string
name *string
tags []*ec2.Tag
}

func (e *EC2VPCEndpointServiceConfiguration) Remove(_ context.Context) error {
Expand All @@ -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
}

Expand Down

0 comments on commit 625ea11

Please sign in to comment.