provider/aws: Less aggressive API rate
This commit is contained in:
parent
ab5b48278a
commit
bc64366a92
|
@ -81,10 +81,12 @@ func resource_aws_instance_create(
|
||||||
instance.InstanceId)
|
instance.InstanceId)
|
||||||
|
|
||||||
stateConf := &resource.StateChangeConf{
|
stateConf := &resource.StateChangeConf{
|
||||||
Pending: []string{"pending"},
|
Pending: []string{"pending"},
|
||||||
Target: "running",
|
Target: "running",
|
||||||
Refresh: InstanceStateRefreshFunc(ec2conn, instance.InstanceId),
|
Refresh: InstanceStateRefreshFunc(ec2conn, instance.InstanceId),
|
||||||
Timeout: 10 * time.Minute,
|
Timeout: 10 * time.Minute,
|
||||||
|
Delay: 10 * time.Second,
|
||||||
|
MinTimeout: 3 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
instanceRaw, err := stateConf.WaitForState()
|
instanceRaw, err := stateConf.WaitForState()
|
||||||
|
@ -159,10 +161,12 @@ func resource_aws_instance_destroy(
|
||||||
s.ID)
|
s.ID)
|
||||||
|
|
||||||
stateConf := &resource.StateChangeConf{
|
stateConf := &resource.StateChangeConf{
|
||||||
Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
|
Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
|
||||||
Target: "terminated",
|
Target: "terminated",
|
||||||
Refresh: InstanceStateRefreshFunc(ec2conn, s.ID),
|
Refresh: InstanceStateRefreshFunc(ec2conn, s.ID),
|
||||||
Timeout: 10 * time.Minute,
|
Timeout: 10 * time.Minute,
|
||||||
|
Delay: 10 * time.Second,
|
||||||
|
MinTimeout: 3 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := stateConf.WaitForState()
|
_, err := stateConf.WaitForState()
|
||||||
|
|
Loading…
Reference in New Issue