Fix crash when group_list has content in network data
This commit is contained in:
parent
8c17f720c8
commit
a4a1bc5f1f
|
@ -8,18 +8,17 @@ import (
|
|||
rapi "burntworld.ca/go-rapi-client"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
|
||||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
|
||||
|
||||
)
|
||||
|
||||
func dataSourceNetworks() *schema.Resource {
|
||||
return &schema.Resource {
|
||||
return &schema.Resource{
|
||||
ReadContext: dataSourceNetworksRead,
|
||||
Schema: map[string]*schema.Schema {
|
||||
Schema: map[string]*schema.Schema{
|
||||
"networks": &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Resource{
|
||||
Schema: map[string]*schema.Schema {
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
|
@ -47,14 +46,17 @@ func dataSourceNetworks() *schema.Resource {
|
|||
"group_list": &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema {
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Elemb: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
},
|
||||
"inst_list": &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema {
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
|
@ -89,7 +91,7 @@ func dataSourceNetworks() *schema.Resource {
|
|||
"tags": &schema.Schema{
|
||||
Type: schema.TypeList,
|
||||
Computed: true,
|
||||
Elem: &schema.Schema {
|
||||
Elem: &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue