Skip to content

Commit c5b205b

Browse files
author
Manuel Valls Fernández
committed
Get rid of tagging
1 parent 3dec612 commit c5b205b

32 files changed

+24
-14314
lines changed

aws/config.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/aws/aws-sdk-go/service/s3"
1111
awsbase "github.com/hashicorp/aws-sdk-go-base"
1212
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
13-
"github.com/manvalls/terraform-provider-wasabi/aws/internal/keyvaluetags"
1413
)
1514

1615
type Config struct {
@@ -28,15 +27,13 @@ type Config struct {
2827
AssumeRolePolicy string
2928
AssumeRolePolicyARNs []string
3029
AssumeRoleSessionName string
31-
AssumeRoleTags map[string]string
3230
AssumeRoleTransitiveTagKeys []string
3331

3432
AllowedAccountIds []string
3533
ForbiddenAccountIds []string
3634

37-
Endpoints map[string]string
38-
IgnoreTagsConfig *keyvaluetags.IgnoreConfig
39-
Insecure bool
35+
Endpoints map[string]string
36+
Insecure bool
4037

4138
SkipCredsValidation bool
4239
SkipRequestingAccountId bool
@@ -50,7 +47,6 @@ type AWSClient struct {
5047
accountid string
5148
dnsSuffix string
5249
iamconn *iam.IAM
53-
IgnoreTagsConfig *keyvaluetags.IgnoreConfig
5450
partition string
5551
region string
5652
s3conn *s3.S3
@@ -83,7 +79,6 @@ func (c *Config) Client() (interface{}, error) {
8379
AssumeRolePolicy: c.AssumeRolePolicy,
8480
AssumeRolePolicyARNs: c.AssumeRolePolicyARNs,
8581
AssumeRoleSessionName: c.AssumeRoleSessionName,
86-
AssumeRoleTags: c.AssumeRoleTags,
8782
AssumeRoleTransitiveTagKeys: c.AssumeRoleTransitiveTagKeys,
8883
CallerDocumentationURL: "https://registry.terraform.io/providers/hashicorp/aws",
8984
CallerName: "Terraform AWS Provider",

aws/data_source_aws_iam_role.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import (
55
"net/url"
66
"time"
77

8-
"github.com/manvalls/terraform-provider-wasabi/aws/internal/keyvaluetags"
9-
108
"github.com/aws/aws-sdk-go/aws"
119
"github.com/aws/aws-sdk-go/service/iam"
1210
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -53,14 +51,12 @@ func dataSourceAwsIAMRole() *schema.Resource {
5351
Type: schema.TypeInt,
5452
Computed: true,
5553
},
56-
"tags": tagsSchemaComputed(),
5754
},
5855
}
5956
}
6057

6158
func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error {
6259
iamconn := meta.(*AWSClient).iamconn
63-
ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig
6460

6561
name := d.Get("name").(string)
6662

@@ -86,7 +82,6 @@ func dataSourceAwsIAMRoleRead(d *schema.ResourceData, meta interface{}) error {
8682
d.Set("permissions_boundary", output.Role.PermissionsBoundary.PermissionsBoundaryArn)
8783
}
8884
d.Set("unique_id", output.Role.RoleId)
89-
d.Set("tags", keyvaluetags.IamKeyValueTags(output.Role.Tags).IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map())
9085

9186
assumRolePolicy, err := url.QueryUnescape(aws.StringValue(output.Role.AssumeRolePolicyDocument))
9287
if err != nil {

aws/data_source_aws_s3_bucket_object.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"github.com/aws/aws-sdk-go/aws"
1212
"github.com/aws/aws-sdk-go/service/s3"
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
14-
"github.com/manvalls/terraform-provider-wasabi/aws/internal/keyvaluetags"
1514
)
1615

1716
func dataSourceAwsS3BucketObject() *schema.Resource {
@@ -113,15 +112,12 @@ func dataSourceAwsS3BucketObject() *schema.Resource {
113112
Type: schema.TypeString,
114113
Computed: true,
115114
},
116-
117-
"tags": tagsSchemaComputed(),
118115
},
119116
}
120117
}
121118

122119
func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) error {
123120
conn := meta.(*AWSClient).s3conn
124-
ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig
125121

126122
bucket := d.Get("bucket").(string)
127123
key := d.Get("key").(string)
@@ -221,16 +217,6 @@ func dataSourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) e
221217
uniqueId, contentType)
222218
}
223219

224-
tags, err := keyvaluetags.S3ObjectListTags(conn, bucket, key)
225-
226-
if err != nil {
227-
return fmt.Errorf("error listing tags for S3 Bucket (%s) Object (%s): %s", bucket, key, err)
228-
}
229-
230-
if err := d.Set("tags", tags.IgnoreAws().IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
231-
return fmt.Errorf("error setting tags: %s", err)
232-
}
233-
234220
return nil
235221
}
236222

aws/internal/keyvaluetags/README.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

aws/internal/keyvaluetags/create_tags_gen.go

Lines changed: 0 additions & 78 deletions
This file was deleted.

0 commit comments

Comments
 (0)