Skip to content

Commit a80101b

Browse files
committed
'setTagsOut' doesn't work as no 'Tags' returned!
1 parent e855e4b commit a80101b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

internal/service/verifiedpermissions/policy_store.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-v2/service/verifiedpermissions"
1111
awstypes "github.com/aws/aws-sdk-go-v2/service/verifiedpermissions/types"
1212
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
13-
"github.com/hashicorp/terraform-plugin-framework/path"
1413
"github.com/hashicorp/terraform-plugin-framework/resource"
1514
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
1615
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
@@ -33,6 +32,7 @@ import (
3332

3433
// @FrameworkResource("aws_verifiedpermissions_policy_store", name="Policy Store")
3534
// @Tags(identifierAttribute="arn")
35+
// @Testing(tagsTest=false)
3636
func newResourcePolicyStore(context.Context) (resource.ResourceWithConfigure, error) {
3737
r := &resourcePolicyStore{}
3838

@@ -45,6 +45,7 @@ const (
4545

4646
type resourcePolicyStore struct {
4747
framework.ResourceWithConfigure
48+
framework.WithImportByID
4849
}
4950

5051
func (r *resourcePolicyStore) Schema(ctx context.Context, request resource.SchemaRequest, response *resource.SchemaResponse) {
@@ -158,8 +159,6 @@ func (r *resourcePolicyStore) Read(ctx context.Context, request resource.ReadReq
158159
return
159160
}
160161

161-
setTagsOut(ctx, output.Tags)
162-
163162
response.Diagnostics.Append(response.State.Set(ctx, &data)...)
164163
}
165164

@@ -228,10 +227,6 @@ func (r *resourcePolicyStore) Delete(ctx context.Context, request resource.Delet
228227
}
229228
}
230229

231-
func (r *resourcePolicyStore) ImportState(ctx context.Context, request resource.ImportStateRequest, response *resource.ImportStateResponse) {
232-
resource.ImportStatePassthroughID(ctx, path.Root(names.AttrID), request, response)
233-
}
234-
235230
type resourcePolicyStoreData struct {
236231
ARN types.String `tfsdk:"arn"`
237232
Description types.String `tfsdk:"description"`

internal/service/verifiedpermissions/policy_store_data_source.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ func (d *dataSourcePolicyStore) Read(ctx context.Context, request datasource.Rea
8484
return
8585
}
8686

87-
setTagsOut(ctx, output.Tags)
88-
8987
response.Diagnostics.Append(response.State.Set(ctx, &data)...)
9088
}
9189

0 commit comments

Comments
 (0)