provider tests: Update to match new tags map in state
This commit is contained in:
parent
19eb0079db
commit
fad26ec59e
|
@ -45,7 +45,7 @@ func TestAccAWSAmiDataSource_natInstance(t *testing.T) {
|
|||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state", "available"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state_reason.code", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "state_reason.message", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "tags.#", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "tags.%", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.nat_ami", "virtualization_type", "hvm"),
|
||||
),
|
||||
},
|
||||
|
@ -82,7 +82,7 @@ func TestAccAWSAmiDataSource_windowsInstance(t *testing.T) {
|
|||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state", "available"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state_reason.code", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "state_reason.message", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "tags.#", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "tags.%", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.windows_ami", "virtualization_type", "hvm"),
|
||||
),
|
||||
},
|
||||
|
@ -116,7 +116,7 @@ func TestAccAWSAmiDataSource_instanceStore(t *testing.T) {
|
|||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state", "available"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state_reason.code", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "state_reason.message", "UNSET"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "tags.#", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "tags.%", "0"),
|
||||
resource.TestCheckResourceAttr("data.aws_ami.instance_store_ami", "virtualization_type", "hvm"),
|
||||
),
|
||||
},
|
||||
|
|
|
@ -69,7 +69,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) {
|
|||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.VpcCIDR", "10.0.0.0/16"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "policy_body", expectedPolicyBody),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.#", "2"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.First", "Mickey"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.Second", "Mouse"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "timeout_in_minutes", "10"),
|
||||
|
@ -87,7 +87,7 @@ func TestAccAWSCloudFormation_allAttributes(t *testing.T) {
|
|||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.#", "1"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "parameters.VpcCIDR", "10.0.0.0/16"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "policy_body", expectedPolicyBody),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.#", "2"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.First", "Mickey"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "tags.Second", "Mouse"),
|
||||
resource.TestCheckResourceAttr("aws_cloudformation_stack.full", "timeout_in_minutes", "10"),
|
||||
|
|
|
@ -176,7 +176,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
|
|||
Config: testAccAWSCloudTrailConfig_tags(cloudTrailRandInt),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "2"),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "2"),
|
||||
testAccCheckCloudTrailLoadTags(&trail, &trailTags),
|
||||
testAccCheckCloudTrailCheckTags(&trailTags, map[string]string{"Foo": "moo", "Pooh": "hi"}),
|
||||
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),
|
||||
|
@ -187,7 +187,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
|
|||
Config: testAccAWSCloudTrailConfig_tagsModified(cloudTrailRandInt),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "3"),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "3"),
|
||||
testAccCheckCloudTrailLoadTags(&trail, &trailTagsModified),
|
||||
testAccCheckCloudTrailCheckTags(&trailTagsModified, map[string]string{"Foo": "moo", "Moo": "boom", "Pooh": "hi"}),
|
||||
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),
|
||||
|
@ -198,7 +198,7 @@ func TestAccAWSCloudTrail_tags(t *testing.T) {
|
|||
Config: testAccAWSCloudTrailConfig_tagsModifiedAgain(cloudTrailRandInt),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckCloudTrailExists("aws_cloudtrail.foobar", &trail),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.#", "0"),
|
||||
resource.TestCheckResourceAttr("aws_cloudtrail.foobar", "tags.%", "0"),
|
||||
testAccCheckCloudTrailLoadTags(&trail, &trailTagsModified),
|
||||
testAccCheckCloudTrailCheckTags(&trailTagsModified, map[string]string{}),
|
||||
testAccCheckCloudTrailLogValidationEnabled("aws_cloudtrail.foobar", false, &trail),
|
||||
|
|
|
@ -48,7 +48,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
|
|||
resource.TestCheckResourceAttr(
|
||||
"aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_db_parameter_group.bar", "tags.#", "1"),
|
||||
"aws_db_parameter_group.bar", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
|
@ -83,7 +83,7 @@ func TestAccAWSDBParameterGroup_basic(t *testing.T) {
|
|||
resource.TestCheckResourceAttr(
|
||||
"aws_db_parameter_group.bar", "parameter.2478663599.value", "utf8"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_db_parameter_group.bar", "tags.#", "2"),
|
||||
"aws_db_parameter_group.bar", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -33,7 +33,7 @@ func TestAccAWSDBSecurityGroup_basic(t *testing.T) {
|
|||
resource.TestCheckResourceAttr(
|
||||
"aws_db_security_group.bar", "ingress.#", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_db_security_group.bar", "tags.#", "1"),
|
||||
"aws_db_security_group.bar", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) {
|
|||
resource.TestCheckResourceAttr(
|
||||
"aws_rds_cluster_parameter_group.bar", "parameter.2478663599.value", "utf8"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_rds_cluster_parameter_group.bar", "tags.#", "1"),
|
||||
"aws_rds_cluster_parameter_group.bar", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
|
@ -79,7 +79,7 @@ func TestAccAWSDBClusterParameterGroup_basic(t *testing.T) {
|
|||
resource.TestCheckResourceAttr(
|
||||
"aws_rds_cluster_parameter_group.bar", "parameter.2478663599.value", "utf8"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_rds_cluster_parameter_group.bar", "tags.#", "2"),
|
||||
"aws_rds_cluster_parameter_group.bar", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -154,7 +154,7 @@ func TestAccAWSRedshiftCluster_tags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_redshift_cluster.default", "tags.#", "3"),
|
||||
"aws_redshift_cluster.default", "tags.%", "3"),
|
||||
resource.TestCheckResourceAttr("aws_redshift_cluster.default", "tags.environment", "Production"),
|
||||
),
|
||||
},
|
||||
|
@ -164,7 +164,7 @@ func TestAccAWSRedshiftCluster_tags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testAccCheckAWSRedshiftClusterExists("aws_redshift_cluster.default", &v),
|
||||
resource.TestCheckResourceAttr(
|
||||
"aws_redshift_cluster.default", "tags.#", "1"),
|
||||
"aws_redshift_cluster.default", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr("aws_redshift_cluster.default", "tags.environment", "Production"),
|
||||
),
|
||||
},
|
||||
|
|
|
@ -50,7 +50,7 @@ func TestAccAzureRMAvailabilitySet_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMAvailabilitySetExists("azurerm_availability_set.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_availability_set.test", "tags.#", "2"),
|
||||
"azurerm_availability_set.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_availability_set.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -63,7 +63,7 @@ func TestAccAzureRMAvailabilitySet_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMAvailabilitySetExists("azurerm_availability_set.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_availability_set.test", "tags.#", "1"),
|
||||
"azurerm_availability_set.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_availability_set.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestAccAzureRMCdnEndpoint_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMCdnEndpointExists("azurerm_cdn_endpoint.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_endpoint.test", "tags.#", "2"),
|
||||
"azurerm_cdn_endpoint.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_endpoint.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -57,7 +57,7 @@ func TestAccAzureRMCdnEndpoint_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMCdnEndpointExists("azurerm_cdn_endpoint.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_endpoint.test", "tags.#", "1"),
|
||||
"azurerm_cdn_endpoint.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_endpoint.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -82,7 +82,7 @@ func TestAccAzureRMCdnProfile_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMCdnProfileExists("azurerm_cdn_profile.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_profile.test", "tags.#", "2"),
|
||||
"azurerm_cdn_profile.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_profile.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -95,7 +95,7 @@ func TestAccAzureRMCdnProfile_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMCdnProfileExists("azurerm_cdn_profile.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_profile.test", "tags.#", "1"),
|
||||
"azurerm_cdn_profile.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_cdn_profile.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsARecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsARecordExists("azurerm_dns_a_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_a_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_a_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsARecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsARecordExists("azurerm_dns_a_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_a_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_a_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsAAAARecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsAAAARecordExists("azurerm_dns_aaaa_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_aaaa_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_aaaa_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsAAAARecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsAAAARecordExists("azurerm_dns_aaaa_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_aaaa_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_aaaa_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -71,7 +71,7 @@ func TestAccAzureRMDnsCNameRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsCNameRecordExists("azurerm_dns_cname_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_cname_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_cname_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -80,7 +80,7 @@ func TestAccAzureRMDnsCNameRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsCNameRecordExists("azurerm_dns_cname_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_cname_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_cname_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsMxRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsMxRecordExists("azurerm_dns_mx_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_mx_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_mx_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsMxRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsMxRecordExists("azurerm_dns_mx_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_mx_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_mx_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsNsRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsNsRecordExists("azurerm_dns_ns_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_ns_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_ns_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsNsRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsNsRecordExists("azurerm_dns_ns_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_ns_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_ns_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsSrvRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsSrvRecordExists("azurerm_dns_srv_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_srv_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_srv_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsSrvRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsSrvRecordExists("azurerm_dns_srv_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_srv_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_srv_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -75,7 +75,7 @@ func TestAccAzureRMDnsTxtRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsTxtRecordExists("azurerm_dns_txt_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_txt_record.test", "tags.#", "2"),
|
||||
"azurerm_dns_txt_record.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -84,7 +84,7 @@ func TestAccAzureRMDnsTxtRecord_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMDnsTxtRecordExists("azurerm_dns_txt_record.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_dns_txt_record.test", "tags.#", "1"),
|
||||
"azurerm_dns_txt_record.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -54,7 +54,7 @@ func TestAccAzureRMNetworkInterface_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMNetworkInterfaceExists("azurerm_network_interface.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_interface.test", "tags.#", "2"),
|
||||
"azurerm_network_interface.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_interface.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -66,7 +66,7 @@ func TestAccAzureRMNetworkInterface_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMNetworkInterfaceExists("azurerm_network_interface.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_interface.test", "tags.#", "1"),
|
||||
"azurerm_network_interface.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_interface.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -36,7 +36,7 @@ func TestAccAzureRMNetworkSecurityGroup_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMNetworkSecurityGroupExists("azurerm_network_security_group.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_security_group.test", "tags.#", "2"),
|
||||
"azurerm_network_security_group.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_security_group.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -49,7 +49,7 @@ func TestAccAzureRMNetworkSecurityGroup_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMNetworkSecurityGroupExists("azurerm_network_security_group.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_security_group.test", "tags.#", "1"),
|
||||
"azurerm_network_security_group.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_network_security_group.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -114,7 +114,7 @@ func TestAccAzureRMPublicIpStatic_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMPublicIpExists("azurerm_public_ip.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_public_ip.test", "tags.#", "2"),
|
||||
"azurerm_public_ip.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_public_ip.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -127,7 +127,7 @@ func TestAccAzureRMPublicIpStatic_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMPublicIpExists("azurerm_public_ip.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_public_ip.test", "tags.#", "1"),
|
||||
"azurerm_public_ip.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_public_ip.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestAccAzureRMResourceGroup_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMResourceGroupExists("azurerm_resource_group.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_resource_group.test", "tags.#", "2"),
|
||||
"azurerm_resource_group.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_resource_group.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -57,7 +57,7 @@ func TestAccAzureRMResourceGroup_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMResourceGroupExists("azurerm_resource_group.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_resource_group.test", "tags.#", "1"),
|
||||
"azurerm_resource_group.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_resource_group.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -94,7 +94,7 @@ func TestAccAzureRMRouteTable_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMRouteTableExists("azurerm_route_table.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_route_table.test", "tags.#", "2"),
|
||||
"azurerm_route_table.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_route_table.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -107,7 +107,7 @@ func TestAccAzureRMRouteTable_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMRouteTableExists("azurerm_route_table.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_route_table.test", "tags.#", "1"),
|
||||
"azurerm_route_table.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_route_table.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
|
@ -24,7 +24,7 @@ func TestAccAzureRMSearchService_basic(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_search_service.test", "tags.#", "2"),
|
||||
"azurerm_search_service.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
@ -46,7 +46,7 @@ func TestAccAzureRMSearchService_updateReplicaCountAndTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_search_service.test", "tags.#", "2"),
|
||||
"azurerm_search_service.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_search_service.test", "replica_count", "1"),
|
||||
),
|
||||
|
@ -57,7 +57,7 @@ func TestAccAzureRMSearchService_updateReplicaCountAndTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSearchServiceExists("azurerm_search_service.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_search_service.test", "tags.#", "1"),
|
||||
"azurerm_search_service.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_search_service.test", "replica_count", "2"),
|
||||
),
|
||||
|
|
|
@ -76,7 +76,7 @@ func TestAccAzureRMSqlDatabase_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSqlDatabaseExists("azurerm_sql_database.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_sql_database.test", "tags.#", "2"),
|
||||
"azurerm_sql_database.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -85,7 +85,7 @@ func TestAccAzureRMSqlDatabase_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSqlDatabaseExists("azurerm_sql_database.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_sql_database.test", "tags.#", "1"),
|
||||
"azurerm_sql_database.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestAccAzureRMSqlServer_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_sql_server.test", "tags.#", "2"),
|
||||
"azurerm_sql_server.test", "tags.%", "2"),
|
||||
),
|
||||
},
|
||||
|
||||
|
@ -53,7 +53,7 @@ func TestAccAzureRMSqlServer_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMSqlServerExists("azurerm_sql_server.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_sql_server.test", "tags.#", "1"),
|
||||
"azurerm_sql_server.test", "tags.%", "1"),
|
||||
),
|
||||
},
|
||||
},
|
||||
|
|
|
@ -60,7 +60,7 @@ func TestAccAzureRMStorageAccount_basic(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMStorageAccountExists("azurerm_storage_account.testsa"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "account_type", "Standard_LRS"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.#", "1"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.environment", "production"),
|
||||
),
|
||||
},
|
||||
|
@ -70,7 +70,7 @@ func TestAccAzureRMStorageAccount_basic(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMStorageAccountExists("azurerm_storage_account.testsa"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "account_type", "Standard_GRS"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.#", "1"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr("azurerm_storage_account.testsa", "tags.environment", "staging"),
|
||||
),
|
||||
},
|
||||
|
|
|
@ -42,7 +42,7 @@ func TestAccAzureRMVirtualMachine_tags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMVirtualMachineExists("azurerm_virtual_machine.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_machine.test", "tags.#", "2"),
|
||||
"azurerm_virtual_machine.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_machine.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -55,7 +55,7 @@ func TestAccAzureRMVirtualMachine_tags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMVirtualMachineExists("azurerm_virtual_machine.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_machine.test", "tags.#", "1"),
|
||||
"azurerm_virtual_machine.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_machine.test", "tags.environment", "Production"),
|
||||
),
|
||||
|
|
|
@ -46,7 +46,7 @@ func TestAccAzureRMVirtualNetwork_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMVirtualNetworkExists("azurerm_virtual_network.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_network.test", "tags.#", "2"),
|
||||
"azurerm_virtual_network.test", "tags.%", "2"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_network.test", "tags.environment", "Production"),
|
||||
resource.TestCheckResourceAttr(
|
||||
|
@ -59,7 +59,7 @@ func TestAccAzureRMVirtualNetwork_withTags(t *testing.T) {
|
|||
Check: resource.ComposeTestCheckFunc(
|
||||
testCheckAzureRMVirtualNetworkExists("azurerm_virtual_network.test"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_network.test", "tags.#", "1"),
|
||||
"azurerm_virtual_network.test", "tags.%", "1"),
|
||||
resource.TestCheckResourceAttr(
|
||||
"azurerm_virtual_network.test", "tags.environment", "staging"),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue