mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 09:36:44 +00:00
48 lines
995 B
Go
48 lines
995 B
Go
![]() |
package google
|
||
|
|
||
|
import "github.com/hashicorp/terraform/helper/schema"
|
||
|
|
||
|
func dataSourceDnsManagedZone() *schema.Resource {
|
||
|
return &schema.Resource{
|
||
|
Read: dataSourceDnsManagedZoneRead,
|
||
|
|
||
|
Schema: map[string]*schema.Schema{
|
||
|
"dns_name": &schema.Schema{
|
||
|
Type: schema.TypeString,
|
||
|
Computed: true,
|
||
|
},
|
||
|
|
||
|
"name": &schema.Schema{
|
||
|
Type: schema.TypeString,
|
||
|
Required: true,
|
||
|
},
|
||
|
|
||
|
"description": &schema.Schema{
|
||
|
Type: schema.TypeString,
|
||
|
Computed: true,
|
||
|
},
|
||
|
|
||
|
"name_servers": &schema.Schema{
|
||
|
Type: schema.TypeSet,
|
||
|
Computed: true,
|
||
|
Elem: &schema.Schema{
|
||
|
Type: schema.TypeString,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
// Google Cloud DNS ManagedZone resources do not have a SelfLink attribute.
|
||
|
|
||
|
"project": &schema.Schema{
|
||
|
Type: schema.TypeString,
|
||
|
Optional: true,
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func dataSourceDnsManagedZoneRead(d *schema.ResourceData, meta interface{}) error {
|
||
|
d.SetId(d.Get("name").(string))
|
||
|
|
||
|
return resourceDnsManagedZoneRead(d, meta)
|
||
|
}
|