-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Terraform AWS Provider to v3.31.0
- Loading branch information
Showing
19 changed files
with
622 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.