Skip to content

Commit

Permalink
Add test, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Dec 7, 2017
1 parent 61e464f commit 5089f69
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
4 changes: 2 additions & 2 deletions aws/resource_aws_service_discovery_public_dns_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ func resourceAwsServiceDiscoveryPublicDnsNamespaceRead(d *schema.ResourceData, m
return err
}

d.Set("arn", resp.Namespace.Description)
d.Set("description", resp.Namespace.Description)
d.Set("arn", resp.Namespace.Arn)
if resp.Namespace.Properties != nil {
d.Set("arn", resp.Namespace.Properties.DnsProperties.HostedZoneId)
d.Set("hosted_zone", resp.Namespace.Properties.DnsProperties.HostedZoneId)
}
return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func testAccCheckAwsServiceDiscoveryPublicDnsNamespaceExists(name string) resour
func testAccServiceDiscoveryPublicDnsNamespaceConfig(rName string) string {
return fmt.Sprintf(`
resource "aws_service_discovery_public_dns_namespace" "test" {
name = "tf-sd-%s"
name = "tf-sd-%s.terraform.com"
description = "test"
}
`, rName)
Expand Down
11 changes: 11 additions & 0 deletions website/aws.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,17 @@
</ul>
</li>

<li<%= sidebar_current("docs-aws-resource-service-discovery") %>>
<a href="#">Service Discovery Resources</a>
<ul class="nav nav-visible">

<li<%= sidebar_current("docs-aws-resource-service-discovery-public-dns-namespace") %>>
<a href="/docs/providers/aws/r/service_discovery_public_dns_namespace.html">aws_service_discovery_public_dns_namespace</a>
</li>

</ul>
</li>

<li<%= sidebar_current("docs-aws-resource-sfn") %>>
<a href="#">Step Function Resources</a>
<ul class="nav nav-visible">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
layout: "aws"
page_title: "AWS: aws_service_discovery_public_dns_namespace"
sidebar_current: "docs-aws-resource-service-discovery-public-dns-namespace"
description: |-
Provides a Service Discovery Public DNS Namespace resource.
---

# aws_service_discovery_public_dns_namespace

Provides a Service Discovery Public DNS Namespace resource.

## Example Usage

```hcl
resource "aws_service_discovery_public_dns_namespace" "example" {
name = "hoge.example.com"
description = "example"
}
```

## Argument Reference

The following arguments are supported:

* `name` - (Required) The name of the namespace.
* `description` - (Optional) The description that you specify for the namespace when you create it.

## Attributes Reference

The following attributes are exported:

* `id` - The ID of a namespace.
* `arn` - The ARN that Amazon Route 53 assigns to the namespace when you create it.
* `hosted_zone` - The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.

0 comments on commit 5089f69

Please sign in to comment.