|
|
|
|
@ -35,6 +35,11 @@ func resourceAwsRoute53Zone() *schema.Resource {
|
|
|
|
|
ForceNew: true,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"comment": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
"vpc_region": &schema.Schema{
|
|
|
|
|
Type: schema.TypeString,
|
|
|
|
|
Optional: true,
|
|
|
|
|
@ -61,10 +66,13 @@ func resourceAwsRoute53Zone() *schema.Resource {
|
|
|
|
|
func resourceAwsRoute53ZoneCreate(d *schema.ResourceData, meta interface{}) error {
|
|
|
|
|
r53 := meta.(*AWSClient).r53conn
|
|
|
|
|
|
|
|
|
|
comment := &route53.HostedZoneConfig{Comment: aws.String("Managed by Terraform")}
|
|
|
|
|
comment := "Managed by Terraform"
|
|
|
|
|
if c := d.Get("comment"); c != "" {
|
|
|
|
|
comment = c.(string)
|
|
|
|
|
}
|
|
|
|
|
req := &route53.CreateHostedZoneInput{
|
|
|
|
|
Name: aws.String(d.Get("name").(string)),
|
|
|
|
|
HostedZoneConfig: comment,
|
|
|
|
|
HostedZoneConfig: &route53.HostedZoneConfig{Comment: aws.String(comment)},
|
|
|
|
|
CallerReference: aws.String(time.Now().Format(time.RFC3339Nano)),
|
|
|
|
|
}
|
|
|
|
|
if v := d.Get("vpc_id"); v != "" {
|
|
|
|
|
|