Skip to content

Commit

Permalink
Upgrade Terraform AWS Provider to v3.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jckuester committed Mar 6, 2021
1 parent 8943316 commit c19a9da
Show file tree
Hide file tree
Showing 19 changed files with 622 additions and 6 deletions.
20 changes: 17 additions & 3 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 91 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 261 resource types across 91 services in the table below can be listed with awsls. The `Tags` column shows if a resource
Currently, all 271 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 @@ -165,16 +165,19 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_codedeploy_deployment_config | | |
| **codepipeline** |
| aws_codepipeline_webhook | x | |
| **codestarconnections** |
| aws_codestarconnections_connection | x | |
| **codestarnotifications** |
| aws_codestarnotifications_notification_rule | x | |
| **configservice** |
| aws_config_config_rule | x | |
| aws_config_configuration_recorder | | |
| aws_config_conformance_pack | | |
| aws_config_delivery_channel | | |
| **costandusagereportservice** |
| aws_cur_report_definition | | |
| **databasemigrationservice** |
| aws_dms_certificate | | |
| aws_dms_certificate | x | |
| aws_dms_endpoint | x | |
| aws_dms_replication_subnet_group | x | |
| aws_dms_replication_task | x | |
Expand Down Expand Up @@ -208,6 +211,7 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_ec2_client_vpn_endpoint | x | x |
| aws_ec2_fleet | x | x |
| aws_ec2_local_gateway_route_table_vpc_association | x | |
| aws_ec2_managed_prefix_list | x | | x |
| aws_ec2_traffic_mirror_filter | x | |
| aws_ec2_traffic_mirror_session | x | | x |
| aws_ec2_traffic_mirror_target | x | | x |
Expand Down Expand Up @@ -247,6 +251,7 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| **eks** |
| aws_eks_cluster | x | |
| **elasticache** |
| aws_elasticache_global_replication_group | | |
| aws_elasticache_replication_group | x | |
| **elasticbeanstalk** |
| aws_elastic_beanstalk_application | x | |
Expand All @@ -265,6 +270,8 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_emr_security_configuration | | |
| **firehose** |
| aws_kinesis_firehose_delivery_stream | x | |
| **fms** |
| aws_fms_policy | | |
| **fsx** |
| aws_fsx_lustre_file_system | x | x | x |
| aws_fsx_windows_file_system | x | x | x |
Expand Down Expand Up @@ -298,6 +305,9 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| **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 |
Expand Down Expand Up @@ -400,6 +410,8 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| **sfn** |
| aws_sfn_activity | x | x |
| aws_sfn_state_machine | x | x |
| **signer** |
| aws_signer_signing_profile | x | |
| **simpledb** |
| aws_simpledb_domain | | |
| **sns** |
Expand All @@ -419,6 +431,8 @@ Note: the prefix `aws_` for resource types is now optional. This means, for exam
| aws_ssm_resource_data_sync | | |
| **storagegateway** |
| aws_storagegateway_gateway | x | |
| **synthetics** |
| aws_synthetics_canary | x | |
| **transfer** |
| aws_transfer_server | x | |
| **waf** |
Expand Down
39 changes: 39 additions & 0 deletions aws/aws_codestarconnections_connection.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/codestarconnections"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListCodestarconnectionsConnection(client *aws.Client) ([]terraform.Resource, error) {
req := client.Codestarconnectionsconn.ListConnectionsRequest(&codestarconnections.ListConnectionsInput{})

var result []terraform.Resource

p := codestarconnections.NewListConnectionsPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.Connections {

result = append(result, terraform.Resource{
Type: "aws_codestarconnections_connection",
ID: *r.ConnectionArn,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
38 changes: 38 additions & 0 deletions aws/aws_config_conformance_pack.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/configservice"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListConfigConformancePack(client *aws.Client) ([]terraform.Resource, error) {
req := client.Configserviceconn.DescribeConformancePacksRequest(&configservice.DescribeConformancePacksInput{})

var result []terraform.Resource

resp, err := req.Send(context.Background())
if err != nil {
return nil, err
}

if len(resp.ConformancePackDetails) > 0 {

for _, r := range resp.ConformancePackDetails {

result = append(result, terraform.Resource{
Type: "aws_config_conformance_pack",
ID: *r.ConformancePackName,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
})
}
}

return result, nil
}
47 changes: 47 additions & 0 deletions aws/aws_ec2_managed_prefix_list.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListEc2ManagedPrefixList(client *aws.Client) ([]terraform.Resource, error) {
req := client.Ec2conn.DescribeManagedPrefixListsRequest(&ec2.DescribeManagedPrefixListsInput{})

var result []terraform.Resource

p := ec2.NewDescribeManagedPrefixListsPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.PrefixLists {
if *r.OwnerId != client.AccountID {
continue
}
tags := map[string]string{}
for _, t := range r.Tags {
tags[*t.Key] = *t.Value
}

result = append(result, terraform.Resource{
Type: "aws_ec2_managed_prefix_list",
ID: *r.PrefixListId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
39 changes: 39 additions & 0 deletions aws/aws_elasticache_global_replication_group.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/elasticache"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListElasticacheGlobalReplicationGroup(client *aws.Client) ([]terraform.Resource, error) {
req := client.Elasticacheconn.DescribeGlobalReplicationGroupsRequest(&elasticache.DescribeGlobalReplicationGroupsInput{})

var result []terraform.Resource

p := elasticache.NewDescribeGlobalReplicationGroupsPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.GlobalReplicationGroups {

result = append(result, terraform.Resource{
Type: "aws_elasticache_global_replication_group",
ID: *r.GlobalReplicationGroupId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
39 changes: 39 additions & 0 deletions aws/aws_fms_policy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/fms"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListFmsPolicy(client *aws.Client) ([]terraform.Resource, error) {
req := client.Fmsconn.ListPoliciesRequest(&fms.ListPoliciesInput{})

var result []terraform.Resource

p := fms.NewListPoliciesPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.PolicyList {

result = append(result, terraform.Resource{
Type: "aws_fms_policy",
ID: *r.PolicyId,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
39 changes: 39 additions & 0 deletions aws/aws_imagebuilder_image.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/imagebuilder"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListImagebuilderImage(client *aws.Client) ([]terraform.Resource, error) {
req := client.Imagebuilderconn.ListImagesRequest(&imagebuilder.ListImagesInput{})

var result []terraform.Resource

p := imagebuilder.NewListImagesPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.ImageVersionList {

result = append(result, terraform.Resource{
Type: "aws_imagebuilder_image",
ID: *r.Arn,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
45 changes: 45 additions & 0 deletions aws/aws_imagebuilder_image_pipeline.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Code is generated. DO NOT EDIT.

package aws

import (
"context"

"github.com/aws/aws-sdk-go-v2/service/imagebuilder"
"github.com/jckuester/awstools-lib/aws"
"github.com/jckuester/awstools-lib/terraform"
)

func ListImagebuilderImagePipeline(client *aws.Client) ([]terraform.Resource, error) {
req := client.Imagebuilderconn.ListImagePipelinesRequest(&imagebuilder.ListImagePipelinesInput{})

var result []terraform.Resource

p := imagebuilder.NewListImagePipelinesPaginator(req)
for p.Next(context.Background()) {
resp := p.CurrentPage()

for _, r := range resp.ImagePipelineList {

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

result = append(result, terraform.Resource{
Type: "aws_imagebuilder_image_pipeline",
ID: *r.Arn,
Profile: client.Profile,
Region: client.Region,
AccountID: client.AccountID,
Tags: tags,
})
}
}

if err := p.Err(); err != nil {
return nil, err
}

return result, nil
}
Loading

0 comments on commit c19a9da

Please sign in to comment.