summaryrefslogtreecommitdiff
path: root/libvirt/resource_libvirt_network.go
diff options
context:
space:
mode:
Diffstat (limited to 'libvirt/resource_libvirt_network.go')
-rw-r--r--libvirt/resource_libvirt_network.go34
1 files changed, 14 insertions, 20 deletions
diff --git a/libvirt/resource_libvirt_network.go b/libvirt/resource_libvirt_network.go
index 4cf6baee..4f984e72 100644
--- a/libvirt/resource_libvirt_network.go
+++ b/libvirt/resource_libvirt_network.go
@@ -68,7 +68,6 @@ func resourceLibvirtNetwork() *schema.Resource {
"addresses": {
Type: schema.TypeList,
Optional: true,
- Required: false,
ForceNew: true,
Elem: &schema.Schema{
Type: schema.TypeString,
@@ -82,33 +81,28 @@ func resourceLibvirtNetwork() *schema.Resource {
"dns_forwarder": {
Type: schema.TypeList,
Optional: true,
- Required: false,
ForceNew: true,
Elem: &schema.Resource{
- Schema: dnsForwarderSchema(),
+ Schema: map[string]*schema.Schema{
+ "address": {
+ Type: schema.TypeString,
+ Optional: true,
+ Required: false,
+ ForceNew: true,
+ },
+ "domain": {
+ Type: schema.TypeString,
+ Optional: true,
+ Required: false,
+ ForceNew: true,
+ },
+ },
},
},
},
}
}
-func dnsForwarderSchema() map[string]*schema.Schema {
- return map[string]*schema.Schema{
- "address": {
- Type: schema.TypeString,
- Optional: true,
- Required: false,
- ForceNew: true,
- },
- "domain": {
- Type: schema.TypeString,
- Optional: true,
- Required: false,
- ForceNew: true,
- },
- }
-}
-
func resourceLibvirtNetworkExists(d *schema.ResourceData, meta interface{}) (bool, error) {
virConn := meta.(*Client).libvirt
if virConn == nil {