Skip to content

Commit

Permalink
Changes from automated code review
Browse files Browse the repository at this point in the history
* Fix documentation indentation
* Fix test naming
* Include `IgnoreConfig` in tags
  • Loading branch information
wjam authored and YakDriver committed May 21, 2021
1 parent b0098e5 commit faa36ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion aws/data_source_aws_default_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ func dataSourceAwsDefaultTags() *schema.Resource {

func dataSourceAwsDefaultTagsRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).DefaultTagsConfig
if err := d.Set("tags", conn.Tags.Map()); err != nil {
ignoreTagsConfig := meta.(*AWSClient).IgnoreTagsConfig
if err := d.Set("tags", conn.Tags.IgnoreConfig(ignoreTagsConfig).Map()); err != nil {
return err
}
d.SetId(meta.(*AWSClient).partition)
Expand Down
2 changes: 1 addition & 1 deletion aws/data_source_aws_default_tags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func TestAWSDefaultTagsDataSource_basic(t *testing.T) {
func TestAccAWSDefaultTagsDataSource_basic(t *testing.T) {
var providers []*schema.Provider

dataSourceName := "data.aws_default_tags.test"
Expand Down
8 changes: 4 additions & 4 deletions website/docs/d/default_tags.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ subcategory: ""
layout: "aws"
page_title: "AWS: aws_default_tags"
description: |-
Expose the default tags configured on the provider.
Expose the default tags configured on the provider.
---

# Data Source: aws_default_Tags
Expand All @@ -20,7 +20,7 @@ provider "aws" {
default_tags {
tags = {
Environment = "Test"
Name = "Provider Tag"
Name = "Provider Tag"
}
}
}
Expand All @@ -31,8 +31,8 @@ resource "aws_autoscaling_group" "group" {
dynamic "tag" {
for_each = data.aws_default_tags.tags.tags
content {
key = tag.key
value = tag.value
key = tag.key
value = tag.value
propagate_at_launch = true
}
}
Expand Down

0 comments on commit faa36ad

Please sign in to comment.