Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sources/apigateway/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ func resourceOutputMapper(query, scope string, awsItem *types.Resource) (*sdp.It
}
}

attributes, err := sources.ToAttributesCase(awsItem, "tags")
attributes, err := sources.ToAttributesWithExclude(awsItem, "tags")
if err != nil {
return nil, err
}

err = attributes.Set("uniqueName", fmt.Sprintf("%s/%s", restApiID, *awsItem.Id))
err = attributes.Set("UniqueName", fmt.Sprintf("%s/%s", restApiID, *awsItem.Id))
if err != nil {
return nil, err
}

item := sdp.Item{
Type: "apigateway-resource",
UniqueAttribute: "uniqueName",
UniqueAttribute: "UniqueName",
Attributes: attributes,
Scope: scope,
}
Expand Down
6 changes: 3 additions & 3 deletions sources/apigateway/rest-api.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func restApiListFunc(ctx context.Context, client *apigateway.Client, _ string) (
}

func restApiOutputMapper(scope string, awsItem *types.RestApi) (*sdp.Item, error) {
attributes, err := sources.ToAttributesCase(awsItem, "tags")
attributes, err := sources.ToAttributesWithExclude(awsItem, "tags")
if err != nil {
return nil, err
}
Expand All @@ -75,15 +75,15 @@ func restApiOutputMapper(scope string, awsItem *types.RestApi) (*sdp.Item, error
return nil, nil //nolint:nilerr
}

attributes, err = sources.ToAttributesCase(restApi, "tags")
attributes, err = sources.ToAttributesWithExclude(restApi, "tags")
if err != nil {
return nil, err
}
}

item := sdp.Item{
Type: "apigateway-rest-api",
UniqueAttribute: "id",
UniqueAttribute: "Id",
Attributes: attributes,
Scope: scope,
Tags: awsItem.Tags,
Expand Down
4 changes: 2 additions & 2 deletions sources/autoscaling/auto_scaling_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ func autoScalingGroupOutputMapper(_ context.Context, _ *autoscaling.Client, scop
var err error

for _, asg := range output.AutoScalingGroups {
attributes, err = sources.ToAttributesCase(asg)
attributes, err = sources.ToAttributesWithExclude(asg)

if err != nil {
return nil, err
}

item = sdp.Item{
Type: "autoscaling-auto-scaling-group",
UniqueAttribute: "autoScalingGroupName",
UniqueAttribute: "AutoScalingGroupName",
Scope: scope,
Attributes: attributes,
}
Expand Down
188 changes: 0 additions & 188 deletions sources/case.go

This file was deleted.

68 changes: 0 additions & 68 deletions sources/case_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions sources/cloudfront/cache_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ func NewCachePolicySource(client CloudFrontClient, accountID string) *sources.Ge
},
ListFunc: cachePolicyListFunc,
ItemMapper: func(_, scope string, awsItem *types.CachePolicy) (*sdp.Item, error) {
attributes, err := sources.ToAttributesCase(awsItem)
attributes, err := sources.ToAttributesWithExclude(awsItem)

if err != nil {
return nil, err
}

item := sdp.Item{
Type: "cloudfront-cache-policy",
UniqueAttribute: "id",
UniqueAttribute: "Id",
Attributes: attributes,
Scope: scope,
}
Expand Down
4 changes: 2 additions & 2 deletions sources/cloudfront/continuous_deployment_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
)

func continuousDeploymentPolicyItemMapper(_, scope string, awsItem *types.ContinuousDeploymentPolicy) (*sdp.Item, error) {
attributes, err := sources.ToAttributesCase(awsItem)
attributes, err := sources.ToAttributesWithExclude(awsItem)

if err != nil {
return nil, err
}

item := sdp.Item{
Type: "cloudfront-continuous-deployment-policy",
UniqueAttribute: "id",
UniqueAttribute: "Id",
Attributes: attributes,
Scope: scope,
}
Expand Down
4 changes: 2 additions & 2 deletions sources/cloudfront/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ func distributionGetFunc(ctx context.Context, client CloudFrontClient, scope str
tags = sources.HandleTagsError(ctx, err)
}

attributes, err := sources.ToAttributesCase(d)
attributes, err := sources.ToAttributesWithExclude(d)

if err != nil {
return nil, err
}

item := sdp.Item{
Type: "cloudfront-distribution",
UniqueAttribute: "id",
UniqueAttribute: "Id",
Attributes: attributes,
Scope: scope,
Tags: tags,
Expand Down
4 changes: 2 additions & 2 deletions sources/cloudfront/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import (
)

func functionItemMapper(_, scope string, awsItem *types.FunctionSummary) (*sdp.Item, error) {
attributes, err := sources.ToAttributesCase(awsItem)
attributes, err := sources.ToAttributesWithExclude(awsItem)

if err != nil {
return nil, err
}

item := sdp.Item{
Type: "cloudfront-function",
UniqueAttribute: "name",
UniqueAttribute: "Name",
Attributes: attributes,
Scope: scope,
}
Expand Down
Loading