Skip to content

Commit

Permalink
d/aws_emrcontainers_virtual_cluster: Reduce visibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Jul 19, 2024
1 parent a78723d commit 14021f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion internal/service/emrcontainers/service_package_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions internal/service/emrcontainers/virtual_cluster_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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)
Expand All @@ -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
}

0 comments on commit 14021f4

Please sign in to comment.