From 14021f4c8196e827ed561e0b0475c1a33f6b2cf6 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Fri, 19 Jul 2024 11:08:07 -0400 Subject: [PATCH] d/aws_emrcontainers_virtual_cluster: Reduce visibility. --- internal/service/emrcontainers/service_package_gen.go | 4 +++- .../emrcontainers/virtual_cluster_data_source.go | 11 ++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/service/emrcontainers/service_package_gen.go b/internal/service/emrcontainers/service_package_gen.go index 7ed7dcfc290..87ce0530473 100644 --- a/internal/service/emrcontainers/service_package_gen.go +++ b/internal/service/emrcontainers/service_package_gen.go @@ -25,8 +25,10 @@ func (p *servicePackage) FrameworkResources(ctx context.Context) []*types.Servic func (p *servicePackage) SDKDataSources(ctx context.Context) []*types.ServicePackageSDKDataSource { return []*types.ServicePackageSDKDataSource{ { - Factory: DataSourceVirtualCluster, + Factory: dataSourceVirtualCluster, TypeName: "aws_emrcontainers_virtual_cluster", + Name: "Virtual Cluster", + Tags: &types.ServicePackageResourceTags{}, }, } } diff --git a/internal/service/emrcontainers/virtual_cluster_data_source.go b/internal/service/emrcontainers/virtual_cluster_data_source.go index 92925e6deea..58b51966847 100644 --- a/internal/service/emrcontainers/virtual_cluster_data_source.go +++ b/internal/service/emrcontainers/virtual_cluster_data_source.go @@ -15,8 +15,9 @@ import ( "github.com/hashicorp/terraform-provider-aws/names" ) -// @SDKDataSource("aws_emrcontainers_virtual_cluster") -func DataSourceVirtualCluster() *schema.Resource { +// @SDKDataSource("aws_emrcontainers_virtual_cluster", name="Virtual Cluster") +// @Tags +func dataSourceVirtualCluster() *schema.Resource { return &schema.Resource{ ReadWithoutTimeout: dataSourceVirtualClusterRead, @@ -84,9 +85,7 @@ func DataSourceVirtualCluster() *schema.Resource { func dataSourceVirtualClusterRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { var diags diag.Diagnostics - conn := meta.(*conns.AWSClient).EMRContainersClient(ctx) - ignoreTagsConfig := meta.(*conns.AWSClient).IgnoreTagsConfig id := d.Get("virtual_cluster_id").(string) vc, err := findVirtualClusterByID(ctx, conn, id) @@ -109,9 +108,7 @@ func dataSourceVirtualClusterRead(ctx context.Context, d *schema.ResourceData, m d.Set(names.AttrState, vc.State) d.Set("virtual_cluster_id", vc.Id) - if err := d.Set(names.AttrTags, KeyValueTags(ctx, vc.Tags).IgnoreAWS().IgnoreConfig(ignoreTagsConfig).Map()); err != nil { - return sdkdiag.AppendErrorf(diags, "setting tags: %s", err) - } + setTagsOut(ctx, vc.Tags) return diags }