Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

fix: Rename S3 Resources #1082

Merged
merged 5 commits into from
Jun 21, 2022
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
4 changes: 2 additions & 2 deletions resources/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ func Provider() *provider.Provider {
"route53.hosted_zones": route53.Route53HostedZones(),
"route53.reusable_delegation_sets": route53.Route53ReusableDelegationSets(),
"route53.traffic_policies": route53.Route53TrafficPolicies(),
"s3.accounts": s3.S3Accounts(),
"s3.buckets": s3.S3Buckets(),
"s3.accounts": s3.Accounts(),
"s3.buckets": s3.Buckets(),
"sagemaker.endpoint_configurations": sagemaker.SagemakerEndpointConfigurations(),
"sagemaker.models": sagemaker.SagemakerModels(),
"sagemaker.notebook_instances": sagemaker.SagemakerNotebookInstances(),
Expand Down
2 changes: 1 addition & 1 deletion resources/services/s3/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type S3AccountConfig struct {
ConfigExists bool
}

func S3Accounts() *schema.Table {
func Accounts() *schema.Table {
return &schema.Table{
Name: "aws_s3_account_config",
Description: "Account configurations for S3",
Expand Down
6 changes: 1 addition & 5 deletions resources/services/s3/buckets.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type WrappedBucket struct {
// fetchS3BucketsPoolSize describes the amount of go routines that resolve the S3 buckets
const fetchS3BucketsPoolSize = 10

func S3Buckets() *schema.Table {
func Buckets() *schema.Table {
return &schema.Table{
Name: "aws_s3_buckets",
Description: "An Amazon S3 bucket is a public cloud storage resource available in Amazon Web Services' (AWS) Simple Storage Service (S3)",
Expand Down Expand Up @@ -189,7 +189,6 @@ func S3Buckets() *schema.Table {
Name: "aws_s3_bucket_cors_rules",
Description: "Specifies a cross-origin access rule for an Amazon S3 bucket.",
Resolver: fetchS3BucketCorsRules,
IgnoreError: client.IgnoreCommonErrors,
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -235,7 +234,6 @@ func S3Buckets() *schema.Table {
Name: "aws_s3_bucket_encryption_rules",
Description: "Specifies the default server-side encryption configuration.",
Resolver: fetchS3BucketEncryptionRules,
IgnoreError: client.IgnoreCommonErrors,
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -267,7 +265,6 @@ func S3Buckets() *schema.Table {
Name: "aws_s3_bucket_replication_rules",
Description: "Specifies which Amazon S3 objects to replicate and where to store the replicas.",
Resolver: fetchS3BucketReplicationRules,
IgnoreError: client.IgnoreCommonErrors,
IgnoreInTests: true,
Columns: []schema.Column{
{
Expand Down Expand Up @@ -385,7 +382,6 @@ func S3Buckets() *schema.Table {
{
Name: "aws_s3_bucket_lifecycles",
Description: "A lifecycle rule for individual objects in an Amazon S3 bucket.",
IgnoreError: client.IgnoreCommonErrors,
Resolver: fetchS3BucketLifecycles,
IgnoreInTests: true,
Columns: []schema.Column{
Expand Down
2 changes: 1 addition & 1 deletion resources/services/s3/buckets_mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,5 @@ func buildS3Buckets(t *testing.T, ctrl *gomock.Controller) client.Services {
}

func TestS3Buckets(t *testing.T) {
client.AwsMockTestHelper(t, S3Buckets(), buildS3Buckets, client.TestOptions{})
client.AwsMockTestHelper(t, Buckets(), buildS3Buckets, client.TestOptions{})
}