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

Commit

Permalink
Expose ARN as properties for ELBs and TargetGroups for further usage (#…
Browse files Browse the repository at this point in the history
…947)

For these types of resources, the ID is the ARN, so this allows further
operations on the resource.
  • Loading branch information
andreadecorte authored Mar 17, 2023
1 parent c18155b commit e26efee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/elbv2-alb.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ func (e *ELBv2LoadBalancer) DisableProtection() error {

func (e *ELBv2LoadBalancer) Properties() types.Properties {
properties := types.NewProperties().
Set("CreatedTime", e.elb.CreatedTime.Format(time.RFC3339))

Set("CreatedTime", e.elb.CreatedTime.Format(time.RFC3339)).
Set("ARN", e.elb.LoadBalancerArn)
for _, tagValue := range e.tags {
properties.SetTag(tagValue.Key, tagValue.Value)
}
Expand Down
3 changes: 2 additions & 1 deletion resources/elbv2-targetgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func (e *ELBv2TargetGroup) Remove() error {
}

func (e *ELBv2TargetGroup) Properties() types.Properties {
properties := types.NewProperties()
properties := types.NewProperties().
Set("ARN", e.tg.TargetGroupArn)
for _, tagValue := range e.tags {
properties.SetTag(tagValue.Key, tagValue.Value)
}
Expand Down

0 comments on commit e26efee

Please sign in to comment.