From 59226f893403965f13c496b456e29c9f63f35ad3 Mon Sep 17 00:00:00 2001 From: bill-rich Date: Fri, 8 Jan 2021 12:20:49 -0800 Subject: [PATCH] Fix formatting --- aws/resource_aws_fms_policy_test.go | 78 ++++++++++++------------- website/docs/r/fms_policy.html.markdown | 1 - 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/aws/resource_aws_fms_policy_test.go b/aws/resource_aws_fms_policy_test.go index db625adcf00..802aab68931 100644 --- a/aws/resource_aws_fms_policy_test.go +++ b/aws/resource_aws_fms_policy_test.go @@ -171,25 +171,25 @@ func testAccFmsPolicyConfig(name string, group string) string { return fmt.Sprintf(` resource "aws_fms_policy" "test" { exclude_resource_tags = false - name = %[1]q + name = "%[1]s" remediation_enabled = false resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer"] - exclude_map { - account = [ data.aws_organizations_organization.example.accounts[0].id ] - } + exclude_map { + account = [data.aws_organizations_organization.example.accounts[0].id] + } security_service_policy_data { - type = "WAF" - managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" - } + type = "WAF" + managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" + } } data "aws_organizations_organization" "example" {} resource "aws_wafregional_rule_group" "test" { metric_name = "MyTest" - name = %[2]q + name = "%[2]s" } `, name, group) } @@ -198,34 +198,34 @@ func testAccFmsPolicyConfig_updated(name string, group string) string { return fmt.Sprintf(` resource "aws_fms_policy" "test" { exclude_resource_tags = false - name = %[1]q + name = "%[1]s" remediation_enabled = true resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer"] - exclude_map { - account = [ data.aws_organizations_organization.example.accounts[0].id ] - } + exclude_map { + account = [data.aws_organizations_organization.example.accounts[0].id] + } security_service_policy_data { - type = "WAF" - managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"ALLOW\"}, \"overrideCustomerWebACLAssociation\": false}" - } + type = "WAF" + managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"ALLOW\"}, \"overrideCustomerWebACLAssociation\": false}" + } - lifecycle { - create_before_destroy = false - } + lifecycle { + create_before_destroy = false + } } data "aws_organizations_organization" "example" {} resource "aws_wafregional_rule_group" "test" { metric_name = "MyTest" - name = %[2]q + name = "%[2]s" } resource "aws_wafregional_rule_group" "test2" { metric_name = "MyTest2" - name = %[2]q + name = "%[2]s" } `, name, group) } @@ -234,25 +234,25 @@ func testAccFmsPolicyConfig_include(name string, group string) string { return fmt.Sprintf(` resource "aws_fms_policy" "test" { exclude_resource_tags = false - name = %[1]q + name = "%[1]s" remediation_enabled = false resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer"] - include_map { - account = [ data.aws_organizations_organization.example.accounts[0].id ] - } + include_map { + account = [data.aws_organizations_organization.example.accounts[0].id] + } security_service_policy_data { - type = "WAF" - managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" - } + type = "WAF" + managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" + } } data "aws_organizations_organization" "example" {} resource "aws_wafregional_rule_group" "test" { metric_name = "MyTest" - name = %[2]q + name = "%[2]s" } `, name, group) } @@ -261,25 +261,25 @@ func testAccFmsPolicyConfig_tags(name string, group string) string { return fmt.Sprintf(` resource "aws_fms_policy" "test" { exclude_resource_tags = false - name = %[1]q + name = "%[1]s" remediation_enabled = false resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer"] security_service_policy_data { - type = "WAF" - managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" - } + type = "WAF" + managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" + } resource_tags = { Environment = "Testing" - Usage= "original" + Usage = "original" } } resource "aws_wafregional_rule_group" "test" { metric_name = "MyTest" - name = %[2]q + name = "%[2]s" } `, name, group) } @@ -288,14 +288,14 @@ func testAccFmsPolicyConfig_tagsChanged(name string, group string) string { return fmt.Sprintf(` resource "aws_fms_policy" "test" { exclude_resource_tags = false - name = %[1]q + name = "%[1]s" remediation_enabled = false resource_type_list = ["AWS::ElasticLoadBalancingV2::LoadBalancer"] security_service_policy_data { - type = "WAF" - managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" - } + type = "WAF" + managed_service_data = "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\":\"${aws_wafregional_rule_group.test.id}\", \"overrideAction\" : {\"type\": \"COUNT\"}}],\"defaultAction\": {\"type\": \"BLOCK\"}, \"overrideCustomerWebACLAssociation\": false}" + } resource_tags = { Usage = "changed" @@ -305,7 +305,7 @@ resource "aws_fms_policy" "test" { resource "aws_wafregional_rule_group" "test" { metric_name = "MyTest" - name = %[2]q + name = "%[2]s" } `, name, group) } diff --git a/website/docs/r/fms_policy.html.markdown b/website/docs/r/fms_policy.html.markdown index c65e1730483..8a9d55ed9a8 100644 --- a/website/docs/r/fms_policy.html.markdown +++ b/website/docs/r/fms_policy.html.markdown @@ -1,7 +1,6 @@ --- layout: "aws" page_title: "AWS: aws_fms_policy" -sidebar_current: "docs-aws-resource-fms-policy" description: |- Provides a resource to create an AWS Firewall Manager policy ---