Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated comments in documentation and examples to follow Terraform style #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions docs/data-sources/infoblox_a_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "infoblox_a_record" "vip_host" {
ip_addr = "10.3.1.65"
comment = "special host"
dns_view = "nondefault_dnsview2"
ttl = 120 // 120s
ttl = 120 # 120s
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
Expand All @@ -71,21 +71,21 @@ data "infoblox_a_record" "a_rec_temp" {
view = "nondefault_dnsview2"
}

// This is just to ensure that the record has been be created
// using 'infoblox_a_record' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_a_record' resource block before the data source will be queried.
depends_on = [infoblox_a_record.vip_host]
}

output "a_rec_res" {
value = data.infoblox_a_record.a_rec_temp
}

// accessing individual field in results
# Accessing individual field in results
output "a_rec_name" {
value = data.infoblox_a_record.a_rec_temp.results.0.fqdn //zero represents index of json object from results list
value = data.infoblox_a_record.a_rec_temp.results.0.fqdn # zero represents index of json object from results list
}

// accessing A-Record through EA's
# Accessing A-Record through EA's
data "infoblox_a_record" "a_rec_ea" {
filters = {
"*Site" = "some test site"
Expand All @@ -97,4 +97,3 @@ output "a_rec_out" {
value = data.infoblox_a_record.a_rec_ea
}
```

12 changes: 6 additions & 6 deletions docs/data-sources/infoblox_aaaa_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "infoblox_aaaa_record" "vip_host" {
fqdn = "very-interesting-host.example.com"
ipv6_addr = "2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
comment = "some comment"
ttl = 120 // 120s
ttl = 120 # 120s
ext_attrs = jsonencode({
"Location" = "65.8665701230204, -37.00791763398113"
})
Expand All @@ -69,21 +69,21 @@ data "infoblox_aaaa_record" "qa_rec_temp" {
ipv6addr ="2a05:d014:275:cb00:ec0d:12e2:df27:aa60"
}

// This is just to ensure that the record has been be created
// using 'infoblox_aaaa_record' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_aaaa_record' resource block before the data source will be queried.
depends_on = [infoblox_aaaa_record.vip_host]
}

output "qa_rec_res" {
value = data.infoblox_aaaa_record.qa_rec_temp
}

// accessing ip addr field in results
# Accessing ip addr field in results
output "qa_rec_addr" {
value = data.infoblox_aaaa_record.qa_rec_temp.results.0.ip_addr //zero represents index of json object from results list
value = data.infoblox_aaaa_record.qa_rec_temp.results.0.ip_addr # zero represents index of json object from results list
}

// accessing AAAA-Record through EA's
# Accessing AAAA-Record through EA's
data "infoblox_aaaa_record" "qa_rec_ea" {
filters = {
"*Site" = "sample test site"
Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/infoblox_cname_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ resource "infoblox_cname_record" "foo" {
canonical = "strange-place.somewhere.in.the.net"
alias = "foo.test.com"
comment = "we need to keep an eye on this strange host"
ttl = 0 // disable caching
ttl = 0 # disable caching
ext_attrs = jsonencode({
Site = "unknown"
Location = "TBD"
Expand All @@ -71,8 +71,8 @@ data "infoblox_cname_record" "cname_rec"{
view = "default.nondefault_netview"
}

// This is just to ensure that the record has been be created
// using 'infoblox_cname_record' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_cname_record' resource block before the data source will be queried.
depends_on = [infoblox_cname_record.foo]
}

Expand All @@ -82,17 +82,17 @@ output "cname_rec_out" {

// accessing individual field in results
output "cname_rec_alias" {
value = data.infoblox_cname_record.cname_rec.results.0.alias //zero represents index of json object from results list
value = data.infoblox_cname_record.cname_rec.results.0.alias # zero represents index of json object from results list
}

// accessing CNAME-Record through EA's
# Accessing CNAME-Record through EA's
data "infoblox_cname_record" "cname_rec_ea" {
filters = {
"*Location" = "Cali"
}
}

// throws matching CNAME records with EA, if any
# Throws matching CNAME records with EA, if any
output "cname_rec_res" {
value = data.infoblox_cname_record.cname_rec_ea
}
Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/infoblox_dns_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ data "infoblox_dns_view" "dsview" {
network_view = "nondefault_netview"
}

// This is just to ensure that the record has been be created
// using 'infoblox_dns_view' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_dns_view' resource block before the data source will be queried.
depends_on = [infoblox_dns_view.view1]
}

output "dsview_res" {
value = data.infoblox_dns_view.dsview
}

// accessing individual field in results
# Accessing individual field in results
output "dsview_name" {
value = data.infoblox_dns_view.dsview_res.results.0.name //zero represents index of json object from results list
value = data.infoblox_dns_view.dsview_res.results.0.name # zero represents index of json object from results list
}

// accessing DNS Views through EA's
# Accessing DNS Views through EA's
data "infoblox_dns_view" "dsview_ea" {
filters = {
"*TestEA" = "SampleEA"
Expand All @@ -77,4 +77,4 @@ data "infoblox_dns_view" "dsview_ea" {
output "dsview_out" {
value = data.infoblox_dns_view.dsview_ea
}
```
```
11 changes: 5 additions & 6 deletions docs/data-sources/infoblox_host_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ This example defines a data source of type `infoblox_host_record` and the name "
You can reference this resource and retrieve information about it.

```hcl
// This is just to ensure that the record has been be created
# This is just to ensure that the record has been be created
resource "infoblox_zone_auth" "zone1" {
fqdn = "example.org"
view = "default"
Expand Down Expand Up @@ -80,17 +80,17 @@ data "infoblox_host_record" "host_rec_temp" {
filters = {
name = "host1.example.org"
}
// This is just to ensure that the record has been be created
// using 'infoblox_host_record' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_host_record' resource block before the data source will be queried.
depends_on = [infoblox_ip_association.association1]
}

// accessing Host-record through name
# Accessing Host-record through name
output "host_rec_res" {
value = data.infoblox_host_record.host_rec_temp
}

// fetching Host-Records through EAs
# Fetching Host-Records through EAs
data "infoblox_host_record" "host_rec_ea" {
filters = {
"*Location" = "USA"
Expand All @@ -101,4 +101,3 @@ output "host_ea_out" {
value = data.infoblox_host_record.host_rec_ea
}
```

12 changes: 6 additions & 6 deletions docs/data-sources/infoblox_ipv4_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,28 @@ data "infoblox_ipv4_network" "nearby_network" {
network = "192.168.128.0/20"
network_view = "nondefault_netview"
}
// This is just to ensure that the network has been be created
// using 'infoblox_ipv4_network' resource block before the data source will be queried.
# This is just to ensure that the network has been be created
# using 'infoblox_ipv4_network' resource block before the data source will be queried.
depends_on = [infoblox_ipv4_network.net2]
}

output "ipv4_net1" {
value = data.infoblox_ipv4_network.nearby_network
}

// accessing individual field in results
# Accessing individual field in results
output "ipv4_net2" {
value = data.infoblox_ipv4_network.nearby_network.results.0.cidr //zero represents index of json object from results list
value = data.infoblox_ipv4_network.nearby_network.results.0.cidr # zero represents index of json object from results list
}

// accessing IPv4 network through EA's
# Accessing IPv4 network through EA's
data "infoblox_ipv4_network" "ipv4_net_ea" {
filters = {
"*Site" = "Custom network site"
}
}

// throws matching IPv4 networks with EA, if any
# Throws matching IPv4 networks with EA, if any
output "net_ea_out" {
value = data.infoblox_ipv4_network.ipv4_net_ea
}
Expand Down
12 changes: 6 additions & 6 deletions docs/data-sources/infoblox_ipv4_network_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,28 @@ data "infoblox_ipv4_network_container" "nearby_nc" {
network = "192.168.128.0/17"
}

// This is just to ensure that the network container has been be created
// using 'infoblox_ipv4_network_container' resource block before the data source will be queried.
# This is just to ensure that the network container has been be created
# using 'infoblox_ipv4_network_container' resource block before the data source will be queried.
depends_on = [infoblox_ipv4_network_container.nearby_org]
}

output "nc_res" {
value = data.infoblox_ipv4_network_container.nearby_nc
}

// accessing individual field in results
# Accessing individual field in results
output "nc_cidr_out" {
value = data.infoblox_ipv4_network_container.nearby_nc.results.0.cidr //zero represents index of json object from results list
value = data.infoblox_ipv4_network_container.nearby_nc.results.0.cidr # zero represents index of json object from results list
}

// accessing IPv4 Network Container through EA's
# Accessing IPv4 Network Container through EA's
data "infoblox_ipv4_network_container" "nc_ea" {
filters = {
"*Site" = "GMC Site"
}
}

// throws matching IPv4 Network Containers with EA, if any
# Throws matching IPv4 Network Containers with EA, if any
output "nc_ea_out" {
value = data.infoblox_ipv4_network_container.nc_ea
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data-sources/infoblox_ipv6_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ data "infoblox_ipv6_network" "readNet1" {
### Example of a Network Data Source Block

```hcl
// This is just to ensure that the network has been be created
# This is just to ensure that the network has been be created
resource "infoblox_ipv6_network" "ipv6net1" {
cidr = "2002:1f93:0:4::/96"
reserve_ipv6 = 10
Expand All @@ -54,24 +54,24 @@ data "infoblox_ipv6_network" "readNet1" {
filters = {
network = "2002:1f93:0:4::/96"
}
// using 'infoblox_ipv6_network' resource block before the data source will be queried.
# Using 'infoblox_ipv6_network' resource block before the data source will be queried.
depends_on = [infoblox_ipv6_network.ipv6net1]
}

// accessing IPv6 network through EA's
# Accessing IPv6 network through EA's
data "infoblox_ipv6_network" "readnet2" {
filters = {
"*Site" = "Antarctica"
}
depends_on = [infoblox_ipv6_network.ipv6net1]
}

// throws matching IPv6 network.
# Throws matching IPv6 network.
output "ipv6net_res" {
value = data.infoblox_ipv6_network.readNet1
}

// throws matching IPv4 networks with EA, if any
# Throws matching IPv4 networks with EA, if any
output "ipv6net_res1" {
value = data.infoblox_ipv6_network.readnet2
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data-sources/infoblox_ipv6_network_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following table describes the parameters you can define in an `infoblox_ipv6
### Example of an IPv4 Network Container Data Source Block

```hcl
// This is just to ensure that the network container has been be created
# This is just to ensure that the network container has been be created
resource "infoblox_ipv6_network_container" "nc1" {
cidr = "2002:1f93:0:2::/96"
comment = "new generation network segment"
Expand All @@ -48,24 +48,24 @@ data "infoblox_ipv6_network_container" "nc2" {
filters = {
network = "2002:1f93:0:2::/96"
}
// using 'infoblox_ipv6_network_container' resource block before the data source will be queried.
# Using 'infoblox_ipv6_network_container' resource block before the data source will be queried.
depends_on = [infoblox_ipv6_network_container.nc1]
}

data "infoblox_ipv6_network_container" "nc_ea_search" {
filters = {
"*Site" = "space station"
}
// using 'infoblox_ipv6_network_container' resource block before the data source will be queried.
# Using 'infoblox_ipv6_network_container' resource block before the data source will be queried.
depends_on = [infoblox_ipv6_network_container.nc1]
}

// accessing IPv6 network container through network block
# Accessing IPv6 network container through network block
output "nc1_output" {
value = data.infoblox_ipv6_network_container.nc2
}

// accessing IPv6 network container through EA's
# Accessing IPv6 network container through EA's
output "nc1_comment" {
value = data.infoblox_ipv6_network_container.nc_ea_search
}
Expand Down
10 changes: 5 additions & 5 deletions docs/data-sources/infoblox_mx_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,29 @@ data "infoblox_mx_record" "ds2" {
mail_exchanger = "sample.test.com"
}

// This is just to ensure that the record has been be created
// using 'infoblox_mx_record' resource block before the data source will be queried.
# This is just to ensure that the record has been be created
# using 'infoblox_mx_record' resource block before the data source will be queried.
depends_on = [infoblox_mx_record.rec2]
}

output "mx_rec_res" {
value = data.infoblox_mx_record.ds2
}

// accessing individual field in results
# Accessing individual field in results
output "mx_rec_name" {
value = data.infoblox_mx_record.ds2.results.0.fqdn //zero represents index of json object from results list
}

// accessing MX-Record through EA's
# Accessing MX-Record through EA's
data "infoblox_mx_record" "mx_rec_ea" {
filters = {
"*Location" = "California"
"*TestEA" = "automate"
}
}

// throws matching MX-Records with EA, if any
# Throws matching MX-Records with EA, if any
output "mx_rec_out" {
value = data.infoblox_mx_record.mx_rec_ea
}
Expand Down
Loading