Skip to content

Commit 057fd5d

Browse files
authored
Documentation before release (#198)
* preparing for the release * altering GitHub actions configration * documentation updates
1 parent b2b4d96 commit 057fd5d

25 files changed

+954
-484
lines changed

.github/workflows/pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macOS-latest, windows-latest]
19-
go: [1.13.x]
19+
go: [1.15.x]
2020
steps:
2121

2222
- uses: actions/setup-go@v1

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Set up Go
2929
uses: actions/setup-go@v2
3030
with:
31-
go-version: 1.14
31+
go-version: 1.15
3232
-
3333
name: Import GPG key
3434
id: import_gpg
Lines changed: 47 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,47 @@
1-
# A-record
2-
3-
This data source allows to retrieve the following information
4-
(attributes) for an A-record which is managed by NIOS server:
5-
6-
| Attribute | Description | Example |
7-
| --- | --- | --- |
8-
| zone | The zone which contains the record in the given DNS view. | test.com |
9-
| ttl | TTL of the record, in seconds. | 3600 |
10-
| comment | A text describing the record, a regular comment. | Temporary A-record |
11-
| ext_attrs | A set of extensible attributes of the record, if any. The content is in JSON map format. | {"Owner": "State Library", "Expires": "never"} |
12-
13-
To get information about an A-record, you have to specify a selector
14-
which uniquely identifies it: a combination of DNS view ('dns_view'
15-
field), IPv4 address, which the record points to ('ip_addr' field), and
16-
FQDN which corresponds to the IP address. All the fields are required to
17-
get information about an A-record.
18-
19-
## Example
20-
21-
data "infoblox_a_record" "vip_host" {
22-
dns_view="default"
23-
fqdn="very-interesting-host.example.com"
24-
ip_addr="10.3.1.65"
25-
}
26-
27-
output "id" {
28-
value = data.infoblox_a_record.vip_host
29-
}
30-
31-
output "zone" {
32-
value = data.infoblox_a_record.vip_host.zone
33-
}
34-
35-
output "ttl" {
36-
value = data.infoblox_a_record.vip_host.ttl
37-
}
38-
39-
output "comment" {
40-
value = data.infoblox_a_record.vip_host.comment
41-
}
42-
43-
output "ext_attrs" {
44-
value = data.infoblox_a_record.vip_host.ext_attrs
45-
}
46-
47-
This defines a data source of type 'infoblox_a_record' with the name
48-
'vip_host' in a Terraform file. Further you can reference this resource
49-
and retrieve some information about it. For example,
50-
**data.infoblox_a_record.vip_host.comment** gives a text which is a
51-
comment for the A-record.
1+
# A-record Datasource
2+
3+
Use the `infoblox_a_record` data source to retrieve the following information for an A-record, which is managed by a NIOS server:
4+
5+
* `zone`: the zone that contains the record in the specified DNS view. Example: `test.com`.
6+
* `ttl`: the time to live value of the record, in seconds. Example: `1800`.
7+
* `comment`: the description of the record. This is a regular comment. Example: `Temporary A-record`.
8+
* `ext_attrs`: the set of extensible attributes of the record, if any. The content is formatted as a JSON map. Example: `{“Owner”: “State Library”, “Expires”: “never”}`.
9+
10+
To get information about an A-record, specify a combination of the DNS view, IPv4 address that the record points to and the FQDN that corresponds to the IP address.
11+
12+
The following list describes the parameters you must define in an `infoblox_a_record` data source block:
13+
14+
* `dns_view`: the DNS view in which the zone exists. If a value is not specified, the default DNS view is considered.
15+
* `ip_addr`: the IPv4 address associated with the A-record.
16+
* `fqdn`: the fully qualified domain name to which the IP address is assigned.
17+
18+
### Example of the A-record Datasource Block
19+
20+
This example defines a data source of type `infoblox_a_record` and the name "vip_host", which is configured in a Terraform file. You can reference this resource and retrieve information about it. For example, `data.infoblox_a_record.vip_host.comment` returns a text as is a comment for the A-record.
21+
22+
```hcl
23+
data "infoblox_a_record" "vip_host" {
24+
dns_view="default"
25+
fqdn="very-interesting-host.example.com"
26+
ip_addr="10.3.1.65"
27+
}
28+
29+
output "id" {
30+
value = data.infoblox_a_record.vip_host
31+
}
32+
33+
34+
output "zone" {
35+
value = data.infoblox_a_record.vip_host.zone
36+
}
37+
38+
39+
output "ttl" {
40+
value = data.infoblox_a_record.vip_host.ttl
41+
}
42+
43+
44+
output "comment" {
45+
value = data.infoblox_a_record.vip_host.comment
46+
}
47+
```
Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
# CNAME-record
1+
# CNAME-record Datasource
22

3-
Similarly, there is a data source for CNAME-records. The attributes are
4-
literally the same as for A-record data source. To get information about
5-
a CNAME-record, you have to specify a selector which uniquely identifies
6-
it: a combination of DNS view ('dns_view' field), canonical name
7-
('canonical' field) and an alias ('alias' field) which the record points
8-
to. All the fields are required.
3+
Use the `infoblox_cname_record` data resource for the CNAME object to retrieve the following information for CNAME records:
94

10-
## Example
5+
* `zone`: the zone that contains the record in the specified DNS view. Example: `test.com`.
6+
* `ttl`: the time to live value of the record, in seconds. Example: `3600`.
7+
* `comment`: the text describing the record. This is a regular comment. Example: `Temporary A-record`.
8+
* `ext_attrs`: the set of extensible attributes of the record, if any. The content is formatted as a JSON map. Example: `{“Owner”: “State Library”, “Expires”: “never”}`
119

12-
data "infoblox_cname_record" "foo"{
13-
dns_view="default"
14-
alias="foo.test.com"
15-
canonical="main.test.com"
16-
}
10+
To get information about a CNAME-record, specify a combination of the DNS view, canonical name, and an alias that the record points to.
11+
12+
The following list describes the parameters you must define in an `infoblox_cname_record` data source block:
13+
14+
* `dns_view`: the DNS view in which the zone exists. If a value is not specified, the default DNS view defined in NIOS is considered.
15+
* `canonical`: the canonical name of the record in the FQDN format.
16+
* `alias`: the alias name of the record in the FQDN format.
17+
18+
### Example of the CNAME-record Datasource Block
19+
20+
```hcl
21+
data "infoblox_cname_record" "foo"{
22+
dns_view="default"
23+
alias="foo.test.com"
24+
canonical="main.test.com"
25+
}
26+
```
Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
# IPv4 network
1+
# IPv4 Network Datasource
22

3-
For a network resource appropriate data source allows to get the
4-
following attributes:
3+
The data source `infoblox_ipv4_network` for the network object allows you to get the following parameters for an IPv4 network resource:
54

6-
| Attribute | Description | Example |
7-
| --- | --- | --- |
8-
| comment | A text describing the network, a regular comment. | Untrusted network |
9-
| ext_attrs | A set of extensible attributes of the record, if any. The content is in JSON map format. | {"Owner": "public internet caffe", "Administrator": "unknown"} |
5+
* `comment`: a description of the network. This is a regular comment. Example: `Untrusted network`.
6+
* `ext_attrs`: a set of extensible attributes, if any. The content is formatted as a JSON map. Example: `{"Owner": "public internet caffe", "Administrator": "unknown"}`.
107

11-
To get information about a network, you have to specify a selector which
12-
uniquely identifies it: a combination of network view ('network_view'
13-
field) and a network's address, in CIDR format ('cidr' field). All the
14-
fields are required. Currently, only IPv4 networks are supported, not
15-
IPv6.
8+
To get information about a network, you must specify a combination of the network view and network address in the CIDR format. The following list describes the parameters you must define in an `infoblox_ipv4_network` data source block:
169

17-
## Example
10+
* `network_view`: the network view in which the network is to be created. The default value is `default`. If a value is not specified, the default network view defined in NIOS is considered.
11+
* `cidr`: the network block in the CIDR notation that is used for the network. Do not use the IPv4 CIDR for an IPv6 network or the IPv6 CIDR for an IPv4 network.
1812

19-
data "infoblox_ipv4_network" "nearby_network" {
20-
network_view = "default"
21-
cidr = "192.168.128.0/20"
22-
}
13+
### Example of a Network Data Source Block
14+
15+
```hcl
16+
data "infoblox_ipv4_network" "nearby_network" {
17+
network_view = "default"
18+
cidr = "192.168.128.0/20"
19+
}
20+
```

docs/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ There are resources for the following objects, supported by the plugin:
1616
Network container and network resources have two versions: IPv4 and IPv6. In
1717
addition, there are two operations which are implemented as resources:
1818
IP address allocation and IP address association with a network host
19-
(ex. VM in a cloud environment); they have two versions as well: IPv4
20-
and IPv6.
19+
(ex. VM in a cloud environment); they have three versions: IPv4
20+
and IPv6 separately, and IPv4/IPv6 combined.
21+
22+
The recommendation is to avoid using separate IPv4 and IPv6 versions of
23+
IP allocation and IP association resources.
24+
This recommendation does not relate to network container and network-related resources.
2125

2226
To work with DNS records a user must ensure that appropriate DNS zones
2327
exist on the NIOS side, because currently the plugin does not support

docs/resources/infoblox_a_record.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/resources/infoblox_a_record.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# A-record Resource
2+
3+
The `infoblox_a_record` resource associates a domain name with an IPv4 address.
4+
5+
The following list describes the parameters you can define in the resource block of the record:
6+
7+
* `fqdn`: required, specifies the fully qualified domain name for which you want to assign the IP address to. Example: `host43.zone12.org`
8+
* `network_view`: optional, specifies the Network view to use when **allocating** an IP address from a network dynamically. For static allocation, do not use this field. Example: `networkview1`
9+
* `dns_view`: optional, specifies the DNS view in which the zone exists. If a value is not specified, the default DNS view is considered. Example: `dns_view_1`
10+
* `ttl`: optional, specifies the time to live value for the record. There is no default value for this parameter. If you do not specify a value, the TTL value is inherited from Grid DNS properties. A TTL value of 0 (zero) means caching should be disabled for this record. Example: `600`
11+
* `comment`: optional, describes the record. Example: `static record #1`
12+
* `ext_attrs`: optional, a set of NIOS extensible attributes that are attached to the record. Example: `jsonencode({})`
13+
* `ip_addr`: required only for static allocation, specifies the IPv4 address to associate with the A-record. Example: `91.84.20.6`.
14+
* For allocating a static IP address, specify a valid IP address.
15+
* For allocating a dynamic IP address, do not use this field. Instead, define the `cidr` field. Optionally, set the `network_view` if you do not want to allocate in the default network view.
16+
* `cidr`: required only for dynamic allocation, specifies the network from which to allocate an IP address when the `ip_addr` field is empty. The address is in CIDR format. For static allocation, use `ip_addr` instead of this field. Example: `192.168.10.4/30`.
17+
18+
-> All parameters except `fqdn` are optional. If you do not specify the `ip_addr` parameter, you must use the `cidr` parameter for dynamic address allocation. `cidr` and `ip_addr` are mutually exclusive. Specify a custom network view with `cidr` if you do not want to use the default network view.
19+
20+
### Examples of the A-record Block
21+
22+
```hcl
23+
resource "infoblox_a_record" "a_record_static1"{
24+
# the zone 'example.com' MUST exist in the DNS view ('default')
25+
fqdn = "static1.example.com"
26+
27+
ip_addr = "192.168.31.31"
28+
ttl = 10
29+
comment = "static A-record #1"
30+
ext_attrs = jsonencode({
31+
"Tenant ID" = "tf-plugin"
32+
"Cloud API Owned" = "True"
33+
"CMP Type"= "VMware"
34+
"Location" = "New York"
35+
"Site" = "HQ"
36+
})
37+
}
38+
39+
resource "infoblox_a_record" "a_record_static2"{
40+
fqdn = "static2.example.com"
41+
ip_addr = "192.168.31.32"
42+
ttl = 0 # ttl=0 means 'do not cache'
43+
dns_view = "non_default_dnsview" # corresponding DNS view MUST exist
44+
}
45+
46+
resource "infoblox_a_record" "a_record_dynamic1"{
47+
fqdn = "dynamic1.example.com"
48+
# ip_addr = "" # CIDR is used for dynamic allocation
49+
# ttl = 0 # not mentioning TTL value means
50+
# using parent zone's TTL value.
51+
52+
# In case of non-default network view,
53+
# you should specify a DNS view as well.
54+
network_view = "non_default" # corresponding network view MUST exist
55+
dns_view = "nondefault_view" # corresponding DNS view MUST exist
56+
57+
# appropriate network MUST exist in the network view
58+
cidr = "infoblox_ipv4_network.ipv4_network.cidr"
59+
}
60+
61+
resource "infoblox_a_record" "a_record_dynamic2"{
62+
fqdn = "dynamic2.example.com"
63+
# not specifying explicitly means using the default network view
64+
# network_view = "default"
65+
# not specifying explicitly means using the default DNS view
66+
# dns_view = "default"
67+
# appropriate network MUST exist in the network view
68+
cidr = "infoblox_ipv4_network.ipv4_network.cidr"
69+
}
70+
```

docs/resources/infoblox_aaaa_record.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# AAAA-record Resource
2+
3+
The `infoblox_aaaa_record` resource associates a domain name with an IPv6 address.
4+
5+
The following list describes the parameters you can define in the resource block of the record:
6+
7+
* `fqdn`: required, specifies the fully qualified domain name for which you want to assign the IP address to. Example: `host43.zone12.org`
8+
* `network_view`: optional, specifies the Network view to use when **allocating** an IP address from a network dynamically. For static allocation, do not use this field. Example: `networkview1`
9+
* `dns_view`: optional, specifies the DNS view in which the zone exists. If a value is not specified, the default DNS view is considered. Example: `dns_view_1`
10+
* `ttl`: optional, specifies the time to live value for the record. There is no default value for this parameter. If you do not specify a value, the TTL value is inherited from Grid DNS properties. A TTL value of 0 (zero) means caching should be disabled for this record. Example: `600`
11+
* `comment`: optional, describes the record. Example: `static record #1`
12+
* `ext_attrs`: optional, a set of NIOS extensible attributes that are attached to the record. Example: `jsonencode({})`
13+
* `ip_addr`: required only for static allocation, specifies the IPv4 address to associate with the A-record. Example: `2001:db8::ff00:42:8329`.
14+
* For allocating a static IP address, specify a valid IP address.
15+
* For allocating a dynamic IP address, do not use this field. Instead, define the `cidr` field. Optionally, set the `network_view` if you do not want to allocate in the default network view.
16+
* `cidr`: required only for dynamic allocation, specifies the network from which to allocate an IP address when the `ipv6_addr` field is empty. The address is in CIDR format. For static allocation, use `ipv6_addr` instead of this field. Example: `2001::/64`.
17+
18+
-> All parameters except `fqdn` are optional. If you do not specify the `ipv6_addr` parameter, you must use the `cidr` parameter for dynamic address allocation. `cidr` and `ipv6_addr` are mutually exclusive. Specify a custom network view with `cidr` if you do not want to use the default network view.
19+
20+
### Examples of the AAAA-record Block
21+
22+
```hcl
23+
resource "infoblox_aaaa_record" "aaaa_record_static1"{
24+
25+
# the zone 'example.com' MUST exist in the DNS view ('default')
26+
fqdn = "static1-v6.example.com"
27+
28+
ipv6_addr = "2001:db8::ff00:42:8329"
29+
ttl = 10
30+
comment = "static AAAA-record #1"
31+
ext_attrs = jsonencode({
32+
"Tenant ID" = "tf-plugin"
33+
"Cloud API Owned" = "True"
34+
"CMP Type"= "VMware"
35+
"Location" = "New York"
36+
"Site" = "HQ"
37+
})
38+
}
39+
40+
resource "infoblox_aaaa_record" "aaaa_record_dynamic1"{
41+
fqdn = "dynamic2-v6.example.com"
42+
43+
# not specifying explicitly means using the default network view
44+
# network_view = "default"
45+
46+
# not specifying explicitly means using the default DNS view
47+
# dns_view = "default"
48+
49+
# appropriate network MUST exist in the network view
50+
cidr = "infoblox_ipv6_network.ipv6_network.cidr"
51+
}
52+
```

0 commit comments

Comments
 (0)