Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into fix-asg-date
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernhaeuser authored Aug 2, 2023
2 parents 85cbbf1 + 8ecf7cc commit 05b29b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/ec2-default-security-group-rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type EC2DefaultSecurityGroupRule struct {
id *string
groupId *string
isEgress *bool
tags []*ec2.Tag
}

func init() {
Expand Down Expand Up @@ -62,6 +63,7 @@ func ListEC2SecurityGroupRules(sess *session.Session) ([]Resource, error) {
id: rule.SecurityGroupRuleId,
groupId: rule.GroupId,
isEgress: rule.IsEgress,
tags: rule.Tags,
})
}
return !lastPage
Expand Down Expand Up @@ -103,6 +105,9 @@ func (r *EC2DefaultSecurityGroupRule) Remove() error {

func (r *EC2DefaultSecurityGroupRule) Properties() types.Properties {
properties := types.NewProperties()
for _, tagValue := range r.tags {
properties.SetTag(tagValue.Key, tagValue.Value)
}
properties.Set("SecurityGroupId", r.groupId)
return properties
}
Expand Down

0 comments on commit 05b29b2

Please sign in to comment.