Skip to content

Commit

Permalink
Run generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jckuester committed Mar 21, 2021
1 parent 71dfc57 commit a031977
Show file tree
Hide file tree
Showing 138 changed files with 329 additions and 637 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A list command for AWS resources.
[![Travis](https://img.shields.io/travis/jckuester/awsls/master.svg?style=for-the-badge)](https://travis-ci.org/jckuester/awsls)

awsls supports listing of [over 250 types of resources](#supported-resources)
across 93 different AWS services. The goal is to code-generate a list function for
across 95 different AWS services. The goal is to code-generate a list function for
every AWS resource that is covered by the Terraform AWS Provider (currently over 500). If you want to contribute,
[the generator is here](./gen).

Expand Down Expand Up @@ -96,7 +96,7 @@ The `--all-profiles` flag will use all profiles from `~/.aws/config`, or if `AWS

## Supported resources

Currently, all 265 resource types across 93 services in the table below can be listed with awsls. The `Tags` column shows if a resource
Currently, all 273 resource types across 95 services in the table below can be listed with awsls. The `Tags` column shows if a resource
supports displaying tags, the `Creation Time` column if a resource has a creation timestamp, and the `Owner` column if
resources are pre-filtered belonging to the account owner.

Expand Down Expand Up @@ -308,6 +308,13 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_iam_server_certificate | | |
| aws_iam_service_linked_role | | x |
| aws_iam_user | x | x |
| **imagebuilder** |
| aws_imagebuilder_component | x | |
| aws_imagebuilder_distribution_configuration | x | |
| aws_imagebuilder_image | x | |
| aws_imagebuilder_image_pipeline | x | |
| aws_imagebuilder_image_recipe | x | |
| aws_imagebuilder_infrastructure_configuration | x | |
| **iot** |
| aws_iot_certificate | | x |
| aws_iot_policy | | |
Expand All @@ -318,6 +325,8 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| **kafka** |
| aws_msk_cluster | x | x |
| aws_msk_configuration | | x |
| **kinesis** |
| aws_kinesis_stream | x | |
| **kinesisanalytics** |
| aws_kinesis_analytics_application | x | |
| **kinesisanalyticsv2** |
Expand Down Expand Up @@ -397,6 +406,7 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_sagemaker_app_image_config | | x |
| aws_sagemaker_code_repository | | x |
| aws_sagemaker_endpoint | x | x |
| aws_sagemaker_feature_group | x | x |
| aws_sagemaker_model | x | x |
| aws_sagemaker_model_package_group | x | x |
| **secretsmanager** |
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_accessanalyzer_analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListAccessanalyzerAnalyzer(ctx context.Context, client *aws.Client) ([]terr

for _, r := range resp.Analyzers {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_accessanalyzer_analyzer",
ID: *r.Name,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
5 changes: 0 additions & 5 deletions aws/aws_ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ func ListAmi(ctx context.Context, client *aws.Client) ([]terraform.Resource, err
if *r.OwnerId != client.AccountID {
continue
}
tags := map[string]string{}
for _, t := range r.Tags {
tags[*t.Key] = *t.Value
}
t, err := time.Parse("2006-01-02T15:04:05.000Z0700", *r.CreationDate)
if err != nil {
return nil, err
Expand All @@ -41,7 +37,6 @@ func ListAmi(ctx context.Context, client *aws.Client) ([]terraform.Resource, err
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
CreatedAt: &t,
})
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayApiKey(ctx context.Context, client *aws.Client) ([]terraform.

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_api_key",
ID: *r.Id,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_client_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayClientCertificate(ctx context.Context, client *aws.Client) ([

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_client_certificate",
ID: *r.ClientCertificateId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_domain_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayDomainName(ctx context.Context, client *aws.Client) ([]terraf

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_domain_name",
ID: *r.DomainName,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_rest_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayRestApi(ctx context.Context, client *aws.Client) ([]terraform

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_rest_api",
ID: *r.Id,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_usage_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayUsagePlan(ctx context.Context, client *aws.Client) ([]terrafo

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_usage_plan",
ID: *r.Id,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_api_gateway_vpc_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApiGatewayVpcLink(ctx context.Context, client *aws.Client) ([]terraform

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_api_gateway_vpc_link",
ID: *r.Id,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_apigatewayv2_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApigatewayv2Api(ctx context.Context, client *aws.Client) ([]terraform.R

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_apigatewayv2_api",
ID: *r.ApiId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_apigatewayv2_domain_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApigatewayv2DomainName(ctx context.Context, client *aws.Client) ([]terr

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_apigatewayv2_domain_name",
ID: *r.DomainName,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_apigatewayv2_vpc_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListApigatewayv2VpcLink(ctx context.Context, client *aws.Client) ([]terrafo

for _, r := range resp.Items {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_apigatewayv2_vpc_link",
ID: *r.VpcLinkId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_appsync_graphql_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListAppsyncGraphqlApi(ctx context.Context, client *aws.Client) ([]terraform

for _, r := range resp.GraphqlApis {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_appsync_graphql_api",
ID: *r.ApiId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
1 change: 0 additions & 1 deletion aws/aws_athena_workgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func ListAthenaWorkgroup(ctx context.Context, client *aws.Client) ([]terraform.R
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,

CreatedAt: &t,
})
}
Expand Down
5 changes: 0 additions & 5 deletions aws/aws_autoscaling_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ func ListAutoscalingGroup(ctx context.Context, client *aws.Client) ([]terraform.

for _, r := range resp.AutoScalingGroups {

tags := map[string]string{}
for _, t := range r.Tags {
tags[*t.Key] = *t.Value
}
t := *r.CreatedTime
result = append(result, terraform.Resource{
Type: "aws_autoscaling_group",
ID: *r.AutoScalingGroupName,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
CreatedAt: &t,
})
}
Expand Down
1 change: 0 additions & 1 deletion aws/aws_backup_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func ListBackupPlan(ctx context.Context, client *aws.Client) ([]terraform.Resour
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,

CreatedAt: &t,
})
}
Expand Down
1 change: 0 additions & 1 deletion aws/aws_backup_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func ListBackupVault(ctx context.Context, client *aws.Client) ([]terraform.Resou
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,

CreatedAt: &t,
})
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_batch_compute_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListBatchComputeEnvironment(ctx context.Context, client *aws.Client) ([]ter

for _, r := range resp.ComputeEnvironments {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_batch_compute_environment",
ID: *r.ComputeEnvironmentName,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_batch_job_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListBatchJobDefinition(ctx context.Context, client *aws.Client) ([]terrafor

for _, r := range resp.JobDefinitions {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_batch_job_definition",
ID: *r.JobDefinitionArn,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
6 changes: 0 additions & 6 deletions aws/aws_batch_job_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,12 @@ func ListBatchJobQueue(ctx context.Context, client *aws.Client) ([]terraform.Res

for _, r := range resp.JobQueues {

tags := map[string]string{}
for k, v := range r.Tags {
tags[k] = v
}

result = append(result, terraform.Resource{
Type: "aws_batch_job_queue",
ID: *r.JobQueueArn,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}
Expand Down
5 changes: 0 additions & 5 deletions aws/aws_cloudformation_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ func ListCloudformationStack(ctx context.Context, client *aws.Client) ([]terrafo

for _, r := range resp.Stacks {

tags := map[string]string{}
for _, t := range r.Tags {
tags[*t.Key] = *t.Value
}
t := *r.CreationTime
result = append(result, terraform.Resource{
Type: "aws_cloudformation_stack",
ID: *r.StackId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
CreatedAt: &t,
})
}
Expand Down
Loading

0 comments on commit a031977

Please sign in to comment.