Skip to content

Commit

Permalink
Merge pull request #74 from umich-vci/fix_network
Browse files Browse the repository at this point in the history
Fix network
  • Loading branch information
adarobin authored Mar 19, 2024
2 parents 01919d5 + bd11ce5 commit 6df2bcb
Show file tree
Hide file tree
Showing 15 changed files with 1,607 additions and 619 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 0.4.1 (March 19, 2024)

BREAKING CHANGES:
* The schema on several resources has been changed, but now fields exposed
track what is documented for the Legacy API.
* There were breaking changes in 0.4.0 as well, but they were not documented or as consistent.

IMPROVEMENTS:
* All fields on network, address, and host_record resource that are configurable
via the API should work now.
* Updated dependencies

## 0.4.0 (February 29, 2024)

IMPROVEMENTS:
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/host_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ output "bluecat_host_addresses" {

- `address_ids` (Set of Number) A set of all address ids associated with the host record.
- `addresses` (Set of String) A set of all addresses associated with the host record.
- `custom_properties` (Map of String) A map of all custom properties associated with the host record.
- `id` (Number) Entity identifier
- `name` (String) The short name of the host record.
- `parent_id` (Number) The ID of the parent of the host record.
Expand All @@ -42,3 +41,4 @@ output "bluecat_host_addresses" {
- `reverse_record` (Boolean) A boolean that represents if the host record should set reverse records.
- `ttl` (Number) The TTL of the host record.
- `type` (String) The type of the resource.
- `user_defined_fields` (Map of String) A map of all custom properties associated with the host record.
31 changes: 15 additions & 16 deletions docs/data-sources/ip4_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,24 @@ Data source to access the attributes of an IPv4 network from a hint based search

### Read-Only

- `addresses_free` (Number) The number of addresses unallocated/free on the network.
- `addresses_in_use` (Number) The number of addresses allocated/in use on the network.
- `allow_duplicate_host` (String) Duplicate host names check.
- `cidr` (String) The CIDR address of the IPv4 network.
- `custom_properties` (Map of String) A map of all custom properties associated with the IPv4 network.
- `default_domains` (Set of Number) TODO
- `allow_duplicate_host` (Boolean) Duplicate host names check.
- `cidr` (String) The CIDR address of the IP4Network.
- `default_domains` (Set of Number) The object ids of the default DNS domains for the network.
- `default_view` (Number) The object id of the default DNS View for the network.
- `dns_restrictions` (Set of Number) TODO
- `gateway` (String) The gateway of the IPv4 network.
- `id` (Number) Example identifier
- `dns_restrictions` (Set of Number) The object ids of the DNS restrictions for the network.
- `gateway` (String) The gateway of the IP4Network.
- `id` (Number) The ID assigned to the IP4Network.
- `inherit_allow_duplicate_host` (Boolean) Duplicate host names check is inherited.
- `inherit_default_domains` (Boolean) Default domains are inherited.
- `inherit_default_view` (Boolean) The default DNS View is inherited.
- `inherit_dns_restrictions` (Boolean) DNS restrictions are inherited.
- `inherit_ping_before_assign` (Boolean) The network pings an address before assignment is inherited.
- `location_code` (String) TODO
- `location_inherited` (Boolean) TODO
- `name` (String) The name assigned the resource.
- `ping_before_assign` (String) The network pings an address before assignment.
- `properties` (String) The properties of the resource as returned by the API (pipe delimited).
- `template` (Number) TODO
- `type` (String) The type of the IP4Network
- `location_code` (String) The location code of the network.
- `location_inherited` (Boolean) The location is inherited.
- `name` (String) The name assigned to the IP4Network.
- `ping_before_assign` (Boolean) The network pings an address before assignment.
- `properties` (String) The properties of the IP4Network (pipe delimited).
- `shared_network` (String) The name of the shared network tag associated with the IP4 Network.
- `template` (Number) The ID of the linked template
- `type` (String) The type of the entity.
- `user_defined_fields` (Map of String) A map of all user-definied fields associated with the entity.
6 changes: 3 additions & 3 deletions docs/resources/host_record.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ output "bluecat_hostname_fqdn" {

### Optional

- `comments` (String) Comments to be associated with the host record.
- `custom_properties` (Map of String) A map of all custom properties associated with the host record.
- `reverse_record` (Boolean) If a reverse record should be created for addresses.
- `ttl` (Number) The TTL for the host record. When set to -1, ignores the TTL.
- `user_defined_fields` (Map of String) A map of all user-definied fields associated with the Host Record.

### Read-Only

- `absolute_name` (String) The absolute name (fqdn) of the host record.
- `id` (String) Host Record identifier
- `address_ids` (Set of Number) A set of all address ids associated with the host record.
- `id` (Number) Host Record identifier
- `properties` (String) The properties of the host record as returned by the API (pipe delimited).
- `type` (String) The type of the resource.
17 changes: 13 additions & 4 deletions docs/resources/ip4_address.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,28 @@ output "allocated_address" {
### Required

- `configuration_id` (Number) The object ID of the Configuration that will hold the new address. If changed, forces a new resource.
- `name` (String) The name assigned to the IPv4 address. This is not related to DNS.
- `parent_id` (Number) The object ID of the Configuration, Block, or Network to find the next available IPv4 address in. If changed, forces a new resource.

### Optional

- `action` (String) The action to take on the next available IPv4 address. Must be one of: "MAKE_STATIC", "MAKE_RESERVED", or "MAKE_DHCP_RESERVED". If changed, forces a new resource.
- `custom_properties` (Map of String) A map of all custom properties associated with the IPv4 address.
- `location_code` (String) The location code of the address.
- `mac_address` (String) The MAC address to associate with the IPv4 address.
- `name` (String) The display name of the IPv4 address.
- `user_defined_fields` (Map of String) A map of all user-definied fields associated with the IPv4 address.

### Read-Only

- `address` (String) The IPv4 address that was allocated.
- `id` (Number) IP4 address identifier
- `properties` (String) The properties of the IPv4 address as returned by the API (pipe delimited).
- `expiry_time` (String) Time that IPv4 address lease expires.
- `id` (Number) IPv4 Address identifier.
- `lease_time` (String) Time that IPv4 address was leased.
- `location_inherited` (Boolean) The location is inherited.
- `parameter_request_list` (String) Time that IPv4 address lease expires.
- `properties` (String) The properties of the resource as returned by the API (pipe delimited).
- `router_port_info` (String) Connected router port information of the IPv4 address.
- `state` (String) The state of the IPv4 address.
- `switch_port_info` (String) Connected switch port information of the IPv4 address.
- `type` (String) The type of the resource.
- `vendor_class_identifier` (String) Time that IPv4 address lease expires.
- `vlan_info` (String) VLAN information of the IPv4 address.
30 changes: 17 additions & 13 deletions docs/resources/ip4_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,34 @@ output "bluecat_ip4_network_cidr" {

### Required

- `name` (String) The display name of the IPv4 network.
- `parent_id` (Number) The object ID of the parent object that will contain the new IPv4 network. If this argument is changed, then the resource will be recreated.
- `size` (Number) The size of the IPv4 network expressed as a power of 2. For example, 256 would create a /24. If this argument is changed, then the resource will be recreated.

### Optional

- `allow_duplicate_host` (Boolean) Duplicate host names check.
- `default_domains` (Set of Number) The object ids of the default DNS domains for the network.
- `default_view` (Number) The object id of the default DNS View for the network.
- `dns_restrictions` (Set of Number) The object ids of the DNS restrictions for the network.
- `gateway` (String) The gateway of the IPv4 network.
- `inherit_allow_duplicate_host` (Boolean) Duplicate host names check is inherited.
- `inherit_default_domains` (Boolean) Default domains are inherited.
- `inherit_default_view` (Boolean) The default DNS View is inherited.
- `inherit_dns_restrictions` (Boolean) DNS restrictions are inherited.
- `inherit_ping_before_assign` (Boolean) The network pings an address before assignment is inherited.
- `is_larger_allowed` (Boolean) (Optional) Is it ok to return a network that is larger than the size specified?
- `location_code` (String) The location code of the network.
- `name` (String) The display name of the IPv4 network.
- `ping_before_assign` (Boolean) The network pings an address before assignment.
- `traversal_method` (String) The traversal method used to find the range to allocate the network. Must be one of "NO_TRAVERSAL", "DEPTH_FIRST", or "BREADTH_FIRST".
- `user_defined_fields` (Map of String) A map of all user-definied fields associated with the IP4 Network.

### Read-Only

- `addresses_free` (Number) The number of addresses unallocated/free on the network.
- `addresses_in_use` (Number) The number of addresses allocated/in use on the network.
- `allow_duplicate_host` (String) Duplicate host names check.
- `cidr` (String) The CIDR address of the IPv4 network.
- `custom_properties` (Map of String) A map of all custom properties associated with the IPv4 network.
- `default_view` (Number) The object id of the default DNS View for the network.
- `gateway` (String) The gateway of the IPv4 network.
- `id` (Number) IPv4 Network identifier.
- `inherit_allow_duplicate_host` (Boolean) Duplicate host names check is inherited.
- `inherit_default_domains` (Boolean) Default domains are inherited.
- `inherit_default_view` (Boolean) The default DNS Viewis inherited.
- `inherit_dns_restrictions` (Boolean) DNS restrictions are inherited.
- `inherit_ping_before_assign` (Boolean) The network pings an address before assignment is inherited.
- `ping_before_assign` (String) The network pings an address before assignment.
- `location_inherited` (Boolean) The location is inherited.
- `properties` (String) The properties of the resource as returned by the API (pipe delimited).
- `shared_network` (String) The name of the shared network tag associated with the IP4 Network.
- `template` (Number) The ID of the linked template
- `type` (String) The type of the resource.
37 changes: 19 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ go 1.22

require (
github.com/hashicorp/terraform-plugin-docs v0.18.0
github.com/hashicorp/terraform-plugin-framework v1.6.0
github.com/hashicorp/terraform-plugin-framework v1.6.1
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.22.0
github.com/hashicorp/terraform-plugin-go v0.22.1
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-testing v1.6.0
github.com/hashicorp/terraform-plugin-testing v1.7.0
github.com/umich-vci/gobam v0.0.0-20230705194030-32758b9f0f3c
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819
)

require (
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
Expand All @@ -27,23 +28,23 @@ require (
github.com/fiorix/wsdl2go v1.4.7 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/cli v1.1.6 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/hc-install v0.6.2 // indirect
github.com/hashicorp/hcl/v2 v2.19.1 // indirect
github.com/hashicorp/hc-install v0.6.3 // indirect
github.com/hashicorp/hcl/v2 v2.20.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
Expand All @@ -67,16 +68,16 @@ require (
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/yuin/goldmark v1.6.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.15.0 // indirect
github.com/zclconf/go-cty v1.14.3 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/grpc v1.61.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/grpc v1.62.1 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
)
Loading

0 comments on commit 6df2bcb

Please sign in to comment.