Skip to content

Commit d24534f

Browse files
authored
Fix for NPA-420 , added ms_server field in datasource (#488)
* Fix for NPA-420 , added ms_server field in datasource * added empty string checks in convertDhcpMemberToMap function * test case changes and Allocate IP function changes in network and fixed address object * rebased and resolved conflict * documentation changes for options field * changed the name of the resource for fixed address and range * vendor directory changes with latest commit id from go-client
1 parent 9043777 commit d24534f

36 files changed

+348
-176
lines changed

docs/data-sources/infoblox_alias_record.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Use the `infoblox_alias_record` data resource for the Alias record to retrieve t
1414
* `comment`: the text describing the record. This is a regular comment. Example: `Temporary Alias-record`.
1515
* `creator`: the creator of the record. Valid value is `STATIC`.
1616
* `ext_attrs`: the set of extensible attributes of the record, if any. The content is formatted as string of JSON map. Example: `"{\"Site\":\"Greece\"}"`
17+
* `cloud_info`: Structure containing all cloud API related information for this object. Example: `"{\"authority_type\":\"GM\",\"delegated_scope\":\"NONE\",\"owned_by_adaptor\":false}"`
1718

1819
For usage of filters, add the fields as keys and appropriate values to be passed to the keys like `name`, `view`, `zone`, `comment`, `target_name`, and `target_type` corresponding to object.
1920
From the below list of supported arguments for filters, use only the searchable fields for retrieving the matching records.

docs/data-sources/infoblox_ipv4_fixed_address.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,31 @@ The `infoblox_ipv4_fixed_address` data source to retrieve the following informat
88
* `comment`: Comment for the fixed address; maximum 256 characters. Example: `fixed address`
99
* `dhcp_client_identifier`: The DHCP client ID for the fixed address. The field is required only when match_client is set to CLIENT_ID. Example: `20`
1010
* `disable`: Determines whether a fixed address is disabled or not. When this is set to False, the fixed address is enabled. Example: `false`
11-
* `extattrs`: Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
11+
* `ext_attrs`: Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
1212
* `ipv4addr`: The IPv4 Address of the fixed address. If the `ipv4addr` field is not provided and the `network` field is set, the next available IP address in the network will be allocated. Example: `10.0.0.34`
1313
* `mac`: The MAC address value for this fixed address. The field is required only when match_client is set to its default value - MAC_ADDRESS. Example: `00-1A-2B-3C-4D-5E`
1414
* `match_client`: The match client for the fixed address.Valid values are CIRCUIT_ID, CLIENT_ID , MAC_ADDRESS, REMOTE_ID and RESERVED. Default value is MAC_ADDRESS. Example: `CLIENT_ID`
1515
* `name`: This field contains the name of this fixed address. Example: `fixedAddressName`
1616
* `network`: The network to which this fixed address belongs, in IPv4 Address/CIDR format. Example: `10.0.0.0/24`
1717
* `network_view`: The name of the network view in which this fixed address resides. The default value is The default network view. Example: `default`
18-
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object.
19-
* `cloud_info`: Structure containing all cloud API related information for this object. Example: `"{\"authority_type\":\"GM\",\"delegated_scope\":\"NONE\",\"owned_by_adaptor\":false}"`
18+
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. The description of the fields of `options` is as follows:
19+
* `name`: The Name of the DHCP option. Example: `domain-name-servers`.
20+
* `num`: The code of the DHCP option. Example: `6`.
21+
* `value`: The value of the option. Example: `11.22.33.44`.
22+
* `vendor_class`: The name of the space this DHCP option is associated to. Default value is `DHCP`.
23+
* `use_option`:Only applies to special options that are displayed separately from other options and have a use flag. These options are `router`,
24+
`router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`.
25+
2026
```terraform
2127
options {
22-
name = "dhcp-lease-time"
23-
value = "43200"
24-
vendor_class = "DHCP"
25-
num = 51
26-
use_option = true
27-
}
28+
name = "dhcp-lease-time"
29+
value = "43200"
30+
vendor_class = "DHCP"
31+
num = 51
32+
use_option = false
33+
}
2834
```
35+
* `cloud_info`: Structure containing all cloud API related information for this object. Example: `"{\"authority_type\":\"GM\",\"delegated_scope\":\"NONE\",\"owned_by_adaptor\":false}"`
2936
* `use_options`: Use option is a flag that indicates whether the options field are used or not. The default value is false. Example: `false`
3037

3138
For usage of filters, add the fields as keys and appropriate values to be passed to the keys like `comment`, `ipv4addr` corresponding to object.
@@ -38,7 +45,7 @@ From the below list of supported arguments for filters, use only the searchable
3845
|--------------|--------------|--------|------------|
3946
| network_view | network_view | string | yes |
4047
| network | network | string | yes |
41-
| match_cleint | match_client | string | yes |
48+
| match_client | match_client | string | yes |
4249
| mac | mac | string | yes |
4350
| comment | comment | string | yes |
4451
| ipv4addr | ipv4addr | string | yes |
@@ -66,7 +73,7 @@ You can reference this resource and retrieve information about it.
6673
resource "infoblox_ipv4_network" "net2" {
6774
cidr = "18.0.0.0/24"
6875
}
69-
resource "infoblox_ipv4_fixed_address" "fix4"{
76+
resource "infoblox_ipv4_fixed_address" "fix_addr"{
7077
client_identifier_prepend_zero=true
7178
comment= "fixed address"
7279
dhcp_client_identifier="23"
@@ -99,7 +106,7 @@ data "infoblox_ipv4_fixed_address" "testFixedAddress_read1" {
99106
filters = {
100107
"*Site" = "Blr"
101108
}
102-
depends_on = [infoblox_ipv4_fixed_address.fix4]
109+
depends_on = [infoblox_ipv4_fixed_address.fix_addr]
103110
}
104111
output "fa_rec_temp1" {
105112
value = data.infoblox_ipv4_fixed_address.testFixedAddress_read1

docs/data-sources/infoblox_ipv4_range.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ Use the `infoblox_ipv4_range` data source to retrieve the following information
99
* `start_addr`: The IPv4 Address starting address of the range. Example: `21.20.2.20`.
1010
* `end_addr`: The IPv4 Address end address of the range. Example: `21.20.2.40`
1111
* `disable`: Determines whether a range is disabled or not. When this is set to False, the range is enabled. Default value: `false`.
12-
* `extattrs`: Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
13-
* `failover_association`: The name of the failover association: the server in this failover association will serve the IPv4 range in case the main server is out of service. `server_association_type` must be set to `FAILOVER` or `FAILOVER_MS` if you want the failover association specified here to serve the range.
12+
* `ext_attrs`: Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
13+
* `failover_association`: The name of the failover association: the server in this failover association will serve the IPv4 range in case the main server is out of service. Example: `dhcp_failover`.
1414
* `server_association_type`: The type of server that is going to serve the range. Valid values are `FAILOVER`,`MEMBER`,`MS_FAILOVER`,`MS_SERVER`,`NONE`. Default value: `NONE`.
15-
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object.
15+
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. The description of the fields of `options` is as follows:
16+
* `name`: The Name of the DHCP option. Example: `domain-name-servers`.
17+
* `num`: The code of the DHCP option. Example: `6`.
18+
* `value`: The value of the option. Example: `11.22.33.44`.
19+
* `vendor_class`: The name of the space this DHCP option is associated to. Default value is `DHCP`.
20+
* `use_option`:Only applies to special options that are displayed separately from other options and have a use flag. These options are `router`,
21+
`router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`.
1622
```terraform
1723
options {
1824
name = "dhcp-lease-time"
@@ -23,6 +29,7 @@ options {
2329
}
2430
```
2531
* `use_options`: Use option is a flag that indicates whether the options field are used or not. The default value is false. Example: `false`
32+
* `ms_server`: The Microsoft server that will provide service for this range. server_association_type needs to be set to MS_SERVER if you want the server specified here to serve the range. Example: `10.23.23.2`
2633
* `member`: The member that will provide service for this range. `server_association_type` needs to be set to `MEMBER` if you want the server specified here to serve the range. `member` has the following three fields `name`, `ipv4addr` and `ipv6addr`.The description of the fields of `member` is as follows:
2734
* `name`: The name of the Grid member. Example: `infoblox.localdomain`.
2835
* `ipv4addr`: The IPv4 Address of the Grid Member. Example: `11.10.1.0`.
@@ -54,6 +61,8 @@ member = {
5461

5562
!> Please consider using only fields as the keys in terraform datasource filters, kindly don't use alias names as keys from the above table.
5663

64+
!> The search functionality using the filters argument is not supported for member and ms_server fields.
65+
5766
### Example for using the filters:
5867
```hcl
5968
data "infoblox_ipv4_range" "range_rec_temp" {
@@ -83,6 +92,7 @@ resource "infoblox_ipv4_range" "range" {
8392
disable = false
8493
member = {
8594
name = "infoblox.localdomain"
95+
ipv4addr = "10.197.2.19"
8696
}
8797
server_association_type= "MEMBER"
8898
ext_attrs = jsonencode({

docs/data-sources/infoblox_ipv4_range_template.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ Use the `infoblox_ipv4_range_template` data resource for the IPV4 Range Template
77
* `offset`: The start address offset for the range. Example: `30`.
88
* `use_options`: Use flag for options. Example: `true`.
99
* `cloud_api_compatible`: The flag controls whether this template can be used to create network objects in a cloud-computing deployment. Example: `true`.
10-
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. Example:
10+
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. The description of the fields of `options` is as follows:
11+
* `name`: The Name of the DHCP option. Example: `domain-name-servers`.
12+
* `num`: The code of the DHCP option. Example: `6`.
13+
* `value`: The value of the option. Example: `11.22.33.44`.
14+
* `vendor_class`: The name of the space this DHCP option is associated to. Default value is `DHCP`.
15+
* `use_option`:Only applies to special options that are displayed separately from other options and have a use flag. These options are `router`,
16+
`router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`.
1117
```terraform
12-
option {
18+
options {
1319
name = "domain-name-servers"
1420
value = "11.22.33.44"
21+
num = 6
1522
use_option = true
1623
}
1724
```
@@ -51,6 +58,8 @@ From the below list of supported arguments for filters, use only the searchable
5158

5259
!> Please consider using only fields as the keys in terraform datasource filters, kindly don't use alias names as keys from the above table.
5360

61+
!>The search functionality using the filters argument is not supported for member and ms_server fields.
62+
5463
### Example for using the filters:
5564
```hcl
5665
data "infoblox_ipv4_range_template" "range_template_read" {

docs/data-sources/infoblox_ipv4_shared_network.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ Use the `infoblox_ipv4_shared_network` data source to retrieve the following inf
77
* `network_view`: The name of the network view in which this shared network resides. Example: `default`
88
* `disable`: The disable flag for the IPv4 shared network object. Example: `true`
99
* `use_options`: Use flag for options. Example: `true`.
10-
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. Example:
10+
* `options`: An array of DHCP option structs that lists the DHCP options associated with the object. The description of the fields of `options` is as follows:
11+
* `name`: The Name of the DHCP option. Example: `domain-name-servers`.
12+
* `num`: The code of the DHCP option. Example: `6`.
13+
* `value`: The value of the option. Example: `11.22.33.44`.
14+
* `vendor_class`: The name of the space this DHCP option is associated to. Default value is `DHCP`.
15+
* `use_option`:Only applies to special options that are displayed separately from other options and have a use flag. These options are `router`,
16+
`router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`.
1117
```terraform
12-
option {
18+
options {
1319
name = "domain-name-servers"
1420
value = "11.22.33.44"
21+
num = 6
1522
use_option = true
1623
}
1724
```
@@ -26,9 +33,9 @@ From the below list of supported arguments for filters, use only the searchable
2633
-----
2734
| Field | Alias | Type | Searchable |
2835
|--------------|--------------|--------|------------|
29-
| name | fqdn | string | yes |
36+
| name | name | string | yes |
3037
| network_view | network_view | string | yes |
31-
| comment | zone | string | yes |
38+
| comment | comment | string | yes |
3239

3340
!> Any of the combination from searchable fields in supported arguments list for fields are allowed.
3441

docs/resources/infoblox_alias_record.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following list describes the parameters you can define in the `infoblox_alia
1010
* `target_type`: required, specifies the type of the target object. Valid values are: `A`, `AAAA`, `MX`, `NAPTR`, `PTR`, `SPF`, `SRV` and `TXT`.
1111
* `ttl`: optional, specifies the "time to live" value for the alias-record. There is no default value for this parameter. If a value is not specified, then in NIOS, the value is inherited from the parent zone of the DNS record for this resource. A TTL value of 0 (zero) means caching should be disabled for this record. Example: `3600`.
1212
* `disable`: optional, specifies whether the alias record is disabled or not. Default value is `false`.
13-
* `dns_view`: required, specifies the DNS view in which the zone exists. If a value is not specified, the name `default` is set as the DNS view. Example: `dns_view_1`.
13+
* `dns_view`: optional, specifies the DNS view in which the zone exists. If a value is not specified, the name `default` is set as the DNS view. Example: `dns_view_1`.
1414
* `comment`: optional, describes the alias-record. Example: `an example alias-record`.
1515
* `ext_attrs`: optional, specifies the set of NIOS extensible attributes that are attached to the alias-record. Example: `jsonencode({"Site":"Singapore"})`.
1616

docs/resources/infoblox_ipv4_fixed_address.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,27 @@ The `infoblox_ipv4_fixed_address` resource, enables you to allocate, update, or
1010
* `comment`: optional, Comment for the fixed address; maximum 256 characters. Example: `fixed address`
1111
* `dhcp_client_identifier`: optional, The DHCP client ID for the fixed address. The field is required only when match_client is set to CLIENT_ID. Example: `20`
1212
* `disable`: optional, Determines whether a fixed address is disabled or not. When this is set to False, the fixed address is enabled. Example: `false`
13-
* `extattrs`: optional, Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
13+
* `ext_attrs`: optional, Extensible attributes associated with the object. Example: `"{\"*Site\":\"Antarctica\"}"`
1414
* `ipv4addr`: optional, The IPv4 Address of the fixed address. If the `ipv4addr` field is not provided and the `network` field is set, the next available IP address in the network will be allocated. Example: `10.0.0.34`
1515
* `mac`: optional, The MAC address value for this fixed address. The field is required only when match_client is set to its default value - MAC_ADDRESS. Example: `00-1A-2B-3C-4D-5E`
1616
* `match_client`: optional, The match client for the fixed address.Valid values are CIRCUIT_ID, CLIENT_ID , MAC_ADDRESS, REMOTE_ID and RESERVED. Default value is MAC_ADDRESS. Example: `CLIENT_ID`
1717
* `name`: optional, This field contains the name of this fixed address. Example: `fixedAddressName`
1818
* `network`: optional, The network to which this fixed address belongs, in IPv4 Address/CIDR format. Example: `10.0.0.0/24`
1919
* `network_view`: optional, The name of the network view in which this fixed address resides. The default value is The default network view. Example: `default`
20-
* `options`: optional, An array of DHCP option structs that lists the DHCP options associated with the object.
20+
* `options`: optional, specifies an array of DHCP option structs that lists the DHCP options associated with the object. The description of the fields of `options` is as follows:
21+
* `name`: required, specifies the Name of the DHCP option. Example: `domain-name-servers`.
22+
* `num`: required, specifies the code of the DHCP option. Example: `6`.
23+
* `value`: required, specifies the value of the option. Example: `11.22.33.44`.
24+
* `vendor_class`: optional, specifies the name of the space this DHCP option is associated to. Default value is `DHCP`.
25+
* `use_option`: optional, only applies to special options that are displayed separately from other options and have a use flag. These options are `router`,
26+
`router-templates`, `domain-name-servers`, `domain-name`, `broadcast-address`, `broadcast-address-offset`, `dhcp-lease-time`, and `dhcp6.name-servers`.
2127
```terraform
2228
options {
2329
name = "dhcp-lease-time"
2430
value = "43200"
2531
vendor_class = "DHCP"
2632
num = 51
27-
use_option = true
33+
use_option = false
2834
}
2935
```
3036
* `use_options`: optional, Use option is a flag that indicates whether the options field are used or not. The default value is false. Example: `false`
@@ -34,7 +40,7 @@ options {
3440
```hcl
3541
//example for fixed address with maximal parameters and using next available ip function
3642
//ipv4addr not specified and network is given so next available ip in the network will be allocated
37-
resource "infoblox_ipv4_fixed_address" "fix4"{
43+
resource "infoblox_ipv4_fixed_address" "fix_address"{
3844
client_identifier_prepend_zero=true
3945
comment= "fixed address"
4046
dhcp_client_identifier="23"
@@ -51,7 +57,7 @@ resource "infoblox_ipv4_fixed_address" "fix4"{
5157
value = "43200"
5258
vendor_class = "DHCP"
5359
num = 51
54-
use_option = true
60+
use_option = false
5561
}
5662
options {
5763
name = "routers"
@@ -67,15 +73,15 @@ resource "infoblox_ipv4_network" "net2" {
6773
cidr = "18.0.0.0/24"
6874
}
6975
//creates a fixed address by explicitly providing the `ipv4addr` value instead of using the next available IP function.
70-
resource "infoblox_ipv4_fixed_address" "fix3"{
76+
resource "infoblox_ipv4_fixed_address" "fix_address_1"{
7177
ipv4addr = "17.0.0.9"
7278
mac = "00:0C:24:2E:8F:2A"
7379
options {
7480
name = "dhcp-lease-time"
7581
value = "43200"
7682
vendor_class = "DHCP"
7783
num = 51
78-
use_option = true
84+
use_option = false
7985
}
8086
depends_on=[infoblox_ipv4_network.net3]
8187
}

0 commit comments

Comments
 (0)