本文整理匯總了Golang中github.com/hashicorp/terraform/helper/resource.ComposeAggregateTestCheckFunc函數的典型用法代碼示例。如果您正苦於以下問題:Golang ComposeAggregateTestCheckFunc函數的具體用法?Golang ComposeAggregateTestCheckFunc怎麽用?Golang ComposeAggregateTestCheckFunc使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ComposeAggregateTestCheckFunc函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: TestAccAWSALB_tags
func TestAccAWSALB_tags(t *testing.T) {
var conf elbv2.LoadBalancer
albName := fmt.Sprintf("testaccawsalb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb.alb_test",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBConfig_basic(albName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &conf),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.TestName", "TestAccAWSALB_basic"),
),
},
{
Config: testAccAWSALBConfig_updatedTags(albName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &conf),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.%", "2"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.Type", "Sample Type Tag"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.Environment", "Production"),
),
},
},
})
}
示例2: TestAccAWSALB_updatedSecurityGroups
func TestAccAWSALB_updatedSecurityGroups(t *testing.T) {
var pre, post elbv2.LoadBalancer
albName := fmt.Sprintf("testaccawsalb-basic-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb.alb_test",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBConfig_basic(albName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &pre),
resource.TestCheckResourceAttr("aws_alb.alb_test", "security_groups.#", "1"),
),
},
{
Config: testAccAWSALBConfig_updateSecurityGroups(albName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &post),
resource.TestCheckResourceAttr("aws_alb.alb_test", "security_groups.#", "2"),
testAccCheckAWSAlbARNs(&pre, &post),
),
},
},
})
}
示例3: TestAccAWSALBTargetGroup_tags
func TestAccAWSALBTargetGroup_tags(t *testing.T) {
var conf elbv2.TargetGroup
targetGroupName := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb_target_group.test",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBTargetGroupDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBTargetGroupConfig_basic(targetGroupName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &conf),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "tags.TestName", "TestAccAWSALBTargetGroup_basic"),
),
},
{
Config: testAccAWSALBTargetGroupConfig_updateTags(targetGroupName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &conf),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "tags.%", "2"),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "tags.Environment", "Production"),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "tags.Type", "ALB Target Group"),
),
},
},
})
}
示例4: TestAccAWSALBTargetGroup_changeNameForceNew
func TestAccAWSALBTargetGroup_changeNameForceNew(t *testing.T) {
var before, after elbv2.TargetGroup
targetGroupNameBefore := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
targetGroupNameAfter := fmt.Sprintf("test-target-group-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb_target_group.test",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBTargetGroupDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBTargetGroupConfig_basic(targetGroupNameBefore),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &before),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "name", targetGroupNameBefore),
),
},
{
Config: testAccAWSALBTargetGroupConfig_basic(targetGroupNameAfter),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBTargetGroupExists("aws_alb_target_group.test", &after),
resource.TestCheckResourceAttr("aws_alb_target_group.test", "name", targetGroupNameAfter),
),
},
},
})
}
示例5: TestAccAWSALB_accesslogs
func TestAccAWSALB_accesslogs(t *testing.T) {
var conf elbv2.LoadBalancer
bucketName := fmt.Sprintf("testaccawsalbaccesslogs-%s", acctest.RandStringFromCharSet(6, acctest.CharSetAlphaNum))
albName := fmt.Sprintf("testaccawsalbaccesslog-%s", acctest.RandStringFromCharSet(4, acctest.CharSetAlpha))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb.alb_test",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBConfig_basic(albName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &conf),
resource.TestCheckResourceAttr("aws_alb.alb_test", "name", albName),
resource.TestCheckResourceAttr("aws_alb.alb_test", "internal", "false"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "subnets.#", "2"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "security_groups.#", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.TestName", "TestAccAWSALB_basic"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "enable_deletion_protection", "false"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "idle_timeout", "30"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "vpc_id"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "zone_id"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "dns_name"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "arn"),
),
},
{
Config: testAccAWSALBConfig_accessLogs(albName, bucketName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBExists("aws_alb.alb_test", &conf),
resource.TestCheckResourceAttr("aws_alb.alb_test", "name", albName),
resource.TestCheckResourceAttr("aws_alb.alb_test", "internal", "false"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "subnets.#", "2"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "security_groups.#", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "tags.TestName", "TestAccAWSALB_basic"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "enable_deletion_protection", "false"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "idle_timeout", "50"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "vpc_id"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "zone_id"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "dns_name"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "access_logs.#", "1"),
resource.TestCheckResourceAttr("aws_alb.alb_test", "access_logs.0.bucket", bucketName),
resource.TestCheckResourceAttr("aws_alb.alb_test", "access_logs.0.prefix", "testAccAWSALBConfig_accessLogs"),
resource.TestCheckResourceAttrSet("aws_alb.alb_test", "arn"),
),
},
},
})
}
示例6: TestAccAWSSpotFleetRequest_diversifiedAllocation
func TestAccAWSSpotFleetRequest_diversifiedAllocation(t *testing.T) {
var sfr ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigDiversifiedAllocation(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &sfr),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "3"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "allocation_strategy", "diversified"),
),
},
},
})
}
示例7: TestAccAWSSpotFleetRequest_overriddingSpotPrice
func TestAccAWSSpotFleetRequest_overriddingSpotPrice(t *testing.T) {
var sfr ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigOverridingSpotPrice(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &sfr),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_price", "0.005"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "2"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.522395050.spot_price", "0.01"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.522395050.instance_type", "m3.large"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.1590006269.spot_price", ""), //there will not be a value here since it's not overriding
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.1590006269.instance_type", "m1.small"),
),
},
},
})
}
示例8: TestAccAWSALBListener_basic
func TestAccAWSALBListener_basic(t *testing.T) {
var conf elbv2.Listener
albName := fmt.Sprintf("testlistener-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum))
targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb_listener.front_end",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBListenerDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBListenerConfig_basic(albName, targetGroupName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBListenerExists("aws_alb_listener.front_end", &conf),
resource.TestCheckResourceAttrSet("aws_alb_listener.front_end", "load_balancer_arn"),
resource.TestCheckResourceAttrSet("aws_alb_listener.front_end", "arn"),
resource.TestCheckResourceAttr("aws_alb_listener.front_end", "protocol", "HTTP"),
resource.TestCheckResourceAttr("aws_alb_listener.front_end", "port", "80"),
resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.#", "1"),
resource.TestCheckResourceAttr("aws_alb_listener.front_end", "default_action.0.type", "forward"),
resource.TestCheckResourceAttrSet("aws_alb_listener.front_end", "default_action.0.target_group_arn"),
),
},
},
})
}
示例9: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz
func TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz(t *testing.T) {
var sfr ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigMultipleInstanceTypesinSameAz(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &sfr),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "2"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.1590006269.instance_type", "m1.small"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.1590006269.availability_zone", "us-west-2a"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.3079734941.instance_type", "m3.large"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.3079734941.availability_zone", "us-west-2a"),
),
},
},
})
}
示例10: TestAccDataSourceAWSALBListener_https
func TestAccDataSourceAWSALBListener_https(t *testing.T) {
albName := fmt.Sprintf("testlistener-https-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum))
targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccDataSourceAWSALBListenerConfigHTTPS(albName, targetGroupName),
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrSet("data.aws_alb_listener.front_end", "load_balancer_arn"),
resource.TestCheckResourceAttrSet("data.aws_alb_listener.front_end", "arn"),
resource.TestCheckResourceAttr("data.aws_alb_listener.front_end", "protocol", "HTTPS"),
resource.TestCheckResourceAttr("data.aws_alb_listener.front_end", "port", "443"),
resource.TestCheckResourceAttr("data.aws_alb_listener.front_end", "default_action.#", "1"),
resource.TestCheckResourceAttr("data.aws_alb_listener.front_end", "default_action.0.type", "forward"),
resource.TestCheckResourceAttrSet("data.aws_alb_listener.front_end", "default_action.0.target_group_arn"),
resource.TestCheckResourceAttrSet("data.aws_alb_listener.front_end", "certificate_arn"),
resource.TestCheckResourceAttr("data.aws_alb_listener.front_end", "ssl_policy", "ELBSecurityPolicy-2015-05"),
),
},
},
})
}
示例11: TestAccAWSLightsailDomain_disappears
func TestAccAWSLightsailDomain_disappears(t *testing.T) {
var domain lightsail.Domain
lightsailDomainName := fmt.Sprintf("tf-test-lightsail-%s.com", acctest.RandString(5))
domainDestroy := func(*terraform.State) error {
conn := testAccProvider.Meta().(*AWSClient).lightsailconn
_, err := conn.DeleteDomain(&lightsail.DeleteDomainInput{
DomainName: aws.String(lightsailDomainName),
})
if err != nil {
return fmt.Errorf("Error deleting Lightsail Domain in disapear test")
}
return nil
}
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSLightsailDomainDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSLightsailDomainConfig_basic(lightsailDomainName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSLightsailDomainExists("aws_lightsail_domain.domain_test", &domain),
domainDestroy,
),
ExpectNonEmptyPlan: true,
},
},
})
}
示例12: TestAccAWSALBListenerRule_basic
func TestAccAWSALBListenerRule_basic(t *testing.T) {
var conf elbv2.Rule
albName := fmt.Sprintf("testrule-basic-%s", acctest.RandStringFromCharSet(13, acctest.CharSetAlphaNum))
targetGroupName := fmt.Sprintf("testtargetgroup-%s", acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
IDRefreshName: "aws_alb_listener_rule.static",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSALBListenerRuleDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSALBListenerRuleConfig_basic(albName, targetGroupName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSALBListenerRuleExists("aws_alb_listener_rule.static", &conf),
resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "arn"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "priority", "100"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.#", "1"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "action.0.type", "forward"),
resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "action.0.target_group_arn"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.#", "1"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.0.field", "path-pattern"),
resource.TestCheckResourceAttr("aws_alb_listener_rule.static", "condition.0.values.#", "1"),
resource.TestCheckResourceAttrSet("aws_alb_listener_rule.static", "condition.0.values.0"),
),
},
},
})
}
示例13: TestAccAWSSpotFleetRequest_withWeightedCapacity
func TestAccAWSSpotFleetRequest_withWeightedCapacity(t *testing.T) {
var sfr ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigWithWeightedCapacity(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &sfr),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "2"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.2325690000.weighted_capacity", "3"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.2325690000.instance_type", "r3.large"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.3079734941.weighted_capacity", "6"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.3079734941.instance_type", "m3.large"),
),
},
},
})
}
示例14: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList
func TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList(t *testing.T) {
var sfr ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigWithAzs(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &sfr),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "2"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.1590006269.availability_zone", "us-west-2a"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.3809475891.availability_zone", "us-west-2b"),
),
},
},
})
}
示例15: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest
func TestAccAWSSpotFleetRequest_changePriceForcesNewRequest(t *testing.T) {
var before, after ec2.SpotFleetRequestConfig
rName := acctest.RandString(10)
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSpotFleetRequestDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfig(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &before),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_price", "0.005"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "1"),
),
},
resource.TestStep{
Config: testAccAWSSpotFleetRequestConfigChangeSpotBidPrice(rName),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSSpotFleetRequestExists(
"aws_spot_fleet_request.foo", &after),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_request_state", "active"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "launch_specification.#", "1"),
resource.TestCheckResourceAttr(
"aws_spot_fleet_request.foo", "spot_price", "0.01"),
testAccCheckAWSSpotFleetRequestConfigRecreated(t, &before, &after),
),
},
},
})
}