Merge pull request #9370 from hashicorp/b-crash-8609
provider/google: Ensure we don't assert on nil
This commit is contained in:
commit
f19990a0b3
|
@ -21,38 +21,38 @@ func resourceComputeTargetPool() *schema.Resource {
|
|||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": &schema.Schema{
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"backup_pool": &schema.Schema{
|
||||
"backup_pool": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
},
|
||||
|
||||
"description": &schema.Schema{
|
||||
"description": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"failover_ratio": &schema.Schema{
|
||||
"failover_ratio": {
|
||||
Type: schema.TypeFloat,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"health_checks": &schema.Schema{
|
||||
"health_checks": {
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
ForceNew: false,
|
||||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
|
||||
"instances": &schema.Schema{
|
||||
"instances": {
|
||||
Type: schema.TypeList,
|
||||
Optional: true,
|
||||
Computed: true,
|
||||
|
@ -60,26 +60,26 @@ func resourceComputeTargetPool() *schema.Resource {
|
|||
Elem: &schema.Schema{Type: schema.TypeString},
|
||||
},
|
||||
|
||||
"project": &schema.Schema{
|
||||
"project": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"region": &schema.Schema{
|
||||
"region": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"self_link": &schema.Schema{
|
||||
"self_link": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"session_affinity": &schema.Schema{
|
||||
"session_affinity": {
|
||||
Type: schema.TypeString,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
|
@ -91,7 +91,7 @@ func resourceComputeTargetPool() *schema.Resource {
|
|||
func convertStringArr(ifaceArr []interface{}) []string {
|
||||
arr := make([]string, len(ifaceArr))
|
||||
for i, v := range ifaceArr {
|
||||
arr[i] = v.(string)
|
||||
arr[i], _ = v.(string)
|
||||
}
|
||||
return arr
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue