-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DDIA-308] Assign Service Instance in DHCP Config Profile (#121)
* Added DHCP Hosts resource config * Added support for retry and timeouts * Added a new schema * Resolved lint errors * Fixed tag issue * Implemented the review changes * Formatting changes * Updated Example * Fixed issues * Reverted changes in data source schema * Generated docs
- Loading branch information
Showing
11 changed files
with
1,385 additions
and
821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bloxone_dhcp_host Resource - terraform-provider-bloxone" | ||
subcategory: "IPAM/DHCP" | ||
description: |- | ||
Manages DHCP Hosts. | ||
A DHCP Host object associates a DHCP Config Profile with an on-prem host. | ||
Note: This resource represents an existing backend object that cannot be created or deleted through API calls. Instead, it can only be updated. When using terraform apply the resource configuration is applied to the existing object, and no new object is created. Similarly terraform destroy removes the configuration associated with the object without actually deleting it from the backend. | ||
--- | ||
|
||
# bloxone_dhcp_host (Resource) | ||
|
||
Manages DHCP Hosts. | ||
|
||
A DHCP Host object associates a DHCP Config Profile with an on-prem host. | ||
|
||
Note: This resource represents an existing backend object that cannot be created or deleted through API calls. Instead, it can only be updated. When using terraform apply the resource configuration is applied to the existing object, and no new object is created. Similarly terraform destroy removes the configuration associated with the object without actually deleting it from the backend. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "bloxone_infra_hosts" "host" { | ||
filters = { | ||
display_name = "my-host" | ||
} | ||
} | ||
resource "bloxone_dhcp_server" "dhcp_server" { | ||
name = "my-dhcp-server" | ||
} | ||
resource "bloxone_dhcp_host" "example_dhcp_host" { | ||
id = data.bloxone_infra_hosts.host.results.0.legacy_id | ||
server = bloxone_dhcp_server.dhcp_server.id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The resource identifier. | ||
- `server` (String) The resource identifier. | ||
|
||
### Optional | ||
|
||
- `retry_if_not_found` (Boolean) If set to `true`, the resource will retry until a matching host is found, or until the Create Timeout expires. | ||
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) | ||
|
||
### Read-Only | ||
|
||
- `address` (String) The primary IP address of the on-prem host. | ||
- `anycast_addresses` (List of String) Anycast address configured to the host. Order is not significant. | ||
- `associated_server` (Attributes) The DHCP Config Profile for the on-prem host. (see [below for nested schema](#nestedatt--associated_server)) | ||
- `comment` (String) The description for the on-prem host. | ||
- `current_version` (String) Current dhcp application version of the host. | ||
- `ip_space` (String) The resource identifier. | ||
- `name` (String) The display name of the on-prem host. | ||
- `ophid` (String) The on-prem host ID. | ||
- `provider_id` (String) External provider identifier. | ||
- `tags` (Map of String) The tags of the on-prem host in JSON format. | ||
- `tags_all` (Map of String) The tags of the on-prem host in JSON format including default tags. | ||
- `type` (String) Defines the type of host. Allowed values: * _bloxone_ddi_: host type is BloxOne DDI, * _microsoft_azure_: host type is Microsoft Azure, * _amazon_web_service_: host type is Amazon Web Services. * _microsoft_active_directory_: host type is Microsoft Active Directory. | ||
|
||
<a id="nestedblock--timeouts"></a> | ||
### Nested Schema for `timeouts` | ||
|
||
Optional: | ||
|
||
- `create` (String) A string that can be [parsed as a duration](https://pkg.go.dev/time#ParseDuration) consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). | ||
|
||
|
||
<a id="nestedatt--associated_server"></a> | ||
### Nested Schema for `associated_server` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) The resource identifier. | ||
- `name` (String) The DHCP Config Profile name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
data "bloxone_infra_hosts" "host" { | ||
filters = { | ||
display_name = "my-host" | ||
} | ||
} | ||
|
||
resource "bloxone_dhcp_server" "dhcp_server" { | ||
name = "my-dhcp-server" | ||
} | ||
|
||
resource "bloxone_dhcp_host" "example_dhcp_host" { | ||
id = data.bloxone_infra_hosts.host.results.0.legacy_id | ||
server = bloxone_dhcp_server.dhcp_server.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.