diff --git a/CHANGELOG.md b/CHANGELOG.md index 31a5fd7fa..5f3c4ec29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v2.4.0](https://github.com/infobloxopen/terraform-provider-infoblox/tree/v2.4.0) (2023-05-29) +- IPV4/IPV6 Network Container resources reworked: + - 'parent_cidr' and 'allocate_prefix_len' are added for dynamic allocation + - both the resources now support the dynamic allocation determined by 'parent_cidr' + - added examples for dynamic allocation in each IPV4 and IPV6 resources +- Bugfixes + ## [v2.3.0](https://github.com/infobloxopen/terraform-provider-infoblox/tree/v2.3.0) (2023-04-13) - Minimal required Go-lang version is bumped up - infoblox_ptr_record resource's behaviour changes (see the documentation changes for the details) diff --git a/README.md b/README.md index ee875891c..02b588a76 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This is a provider plugin for Terraform to manage Infoblox NIOS (Network Identity Operating System) resources using Terraform infrastructure as code solutions. The plugin enables lifecycle management of Infoblox NIOS DDI resources. -The latest version of Infoblox provider is [v2.3.0](https://github.com/infobloxopen/terraform-provider-infoblox/releases/tag/v2.3.0) +The latest version of Infoblox provider is [v2.4.0](https://github.com/infobloxopen/terraform-provider-infoblox/releases/tag/v2.4.0) ## Provider Features diff --git a/docs/resources/infoblox_ipv4_network_container.md b/docs/resources/infoblox_ipv4_network_container.md index d47e23f2e..db207c149 100644 --- a/docs/resources/infoblox_ipv4_network_container.md +++ b/docs/resources/infoblox_ipv4_network_container.md @@ -7,12 +7,16 @@ The following list describes the parameters you can define in the network contai resource block: * `network_view`: optional, specifies the network view in which to create the network container; if a value is not specified, the name `default` is used as the network view. -* `cidr`: required, specifies the network block to use for the network container; do not use an IPv6 CIDR for an IPv4 network container. +* `cidr`: required only if `parent_cidr` is not set, specifies the network block to use for the network container; do not use an IPv6 CIDR for an IPv4 network container. +* `parent_cidr`: required only if `cidr` is not set, specifies the network container from which next available network container must be allocated. +* `allocate_prefix_len`: required only if `parent_cidr` is set, defines length of netmask for a network container that should be allocated from network container, determined by `parent_cidr`. * `comment`: optional, describes the network container. * `ext_attrs`: optional, specifies the set of NIOS extensible attributes that will be attached to the network container. !> Once the network container is created, the `network_view` and `cidr` parameter values cannot be changed by performing an `update` operation. +!> Once the network container is created dynamically, the `parent_cidr` and `allocate_prefix_len` parameter values cannot be changed. + ### Examples of the Network Container Resource ```hcl @@ -32,5 +36,15 @@ resource "infoblox_ipv4_network_container" "v4net_c2" { }) } -// so far, we do not support dynamic allocation of network containers +// full set of parameters for dynamic allocation of network containers +resource "infoblox_ipv4_network_container" "v4net_c3" { + parent_cidr = infoblox_ipv4_network_container.v4net_c2.cidr + allocate_prefix_len = 26 + network_view = infoblox_ipv4_network_container.v4net_c2.network_view + comment = "dynamic allocation of network container" + ext_attrs = jsonencode({ + "Site" = "remote office" + "Country" = "Australia" + }) +} ``` diff --git a/docs/resources/infoblox_ipv6_network_container.md b/docs/resources/infoblox_ipv6_network_container.md index 44f10b6b6..d9062d3e5 100644 --- a/docs/resources/infoblox_ipv6_network_container.md +++ b/docs/resources/infoblox_ipv6_network_container.md @@ -7,12 +7,16 @@ The following list describes the parameters you can define in the network contai resource block: * `network_view`: optional, specifies the network view in which to create the network container; if a value is not specified, the name `default` is used as the network view. -* `cidr`: required, specifies the network block to use for the network container; do not use an IPv4 CIDR for an IPv6 network container. +* `cidr`: required only if `parent_cidr` is not set, specifies the network block to use for the network container; do not use an IPv4 CIDR for an IPv6 network container. +* `parent_cidr`: required only if `cidr` is not set, specifies the network container from which next available network container must be allocated. +* `allocate_prefix_len`: required only if `parent_cidr` is set, defines length of netmask for a network container that should be allocated from network container, determined by `parent_cidr`. * `comment`: optional, describes the network container. * `ext_attrs`: optional, specifies the set of NIOS extensible attributes that will be attached to the network container. !> Once the network container is created, the `network_view` and `cidr` parameter values cannot be changed by performing an `update` operation. +!> Once the network container is created dynamically, the `parent_cidr` and `allocate_prefix_len` parameter values cannot be changed. + ### Examples of the Network Container Resource ```hcl @@ -32,5 +36,15 @@ resource "infoblox_ipv6_network_container" "v6net_c2" { }) } -// so far, we do not support dynamic allocation of network containers +// full set of parameters for dynamic allocation of network containers +resource "infoblox_ipv6_network_container" "v6net_c3" { + parent_cidr = infoblox_ipv6_network_container.v6net_c2.cidr + allocate_prefix_len = 97 + network_view = infoblox_ipv6_network_container.v6net_c2.network_view + comment = "dynamic allocation of network container" + ext_attrs = jsonencode({ + "Tenant ID" = "terraform_test_tenant" + Site = "Test site" + }) +} ```