diff --git a/Makefile b/Makefile
index 81a53ad8..121d83db 100644
--- a/Makefile
+++ b/Makefile
@@ -24,5 +24,6 @@ testacc:
gen:
go generate
+ terraform-docs ./modules/bloxone_infra_host_aws
.PHONY: default test testacc gen
diff --git a/docs/guides/migration.md b/docs/guides/migration.md
index db8dba7b..a376d7d6 100644
--- a/docs/guides/migration.md
+++ b/docs/guides/migration.md
@@ -53,11 +53,11 @@ The resource types have changed in the new provider. The following table shows t
| b1ddi_dns_auth_nsg | bloxone_dns_auth_nsg |
| b1ddi_dns_record | bloxone_dns_record* |
-> NOTE: The _b1ddi_dns_record_ in the B1DDI provider used to be a single resource type that could be used to create any type of DNS record.
-> In the BloxOne provider, this has been split into multiple resource types, one for each record type.
-> For example, _b1ddi_dns_record_ is now _bloxone_dns_a_record_, _bloxone_dns_aaaa_record_, _bloxone_dns_caa_record_, etc.
->
-> The _bloxone_dns_record_ is for resource records that are not supported explicitly by the provider. For example, if you want to create a DNS record of type _URI_, you can use _bloxone_dns_record_.
+-> NOTE: The _b1ddi_dns_record_ in the B1DDI provider used to be a single resource type that could be used to create any type of DNS record.
+In the BloxOne provider, this has been split into multiple resource types, one for each record type.
+For example, _b1ddi_dns_record_ is now _bloxone_dns_a_record_, _bloxone_dns_aaaa_record_, _bloxone_dns_caa_record_, etc.
+The _bloxone_dns_record_ is for resource records that are not supported explicitly by the provider.
+For example, if you want to create a DNS record of type _URI_, you can use _bloxone_dns_record_.
To migrate your configuration, you will need to replace the old resource types with the new resource types. For example:
@@ -119,39 +119,53 @@ There should be no changes to your infrastructure if you have replaced all the r
In case there are changes, you will need to make the necessary changes to your configuration to match the new provider.
Some of the changes you may need to make are listed below.
- - **Unsupported block type**: Configuration written as blocks will have to be rewritten as values. For example, if you have a block like this:
- ```terraform
- internal_secondaries {
- host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
- }
- ```
- you will have to rewrite it with an equal sign :
- ```terraform
- internal_secondaries = [
- {
- host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
- }
- ]
- ```
- - **Read Only attributes**: Some attributes are read only in the BloxOne provider. For example, the _type_ attribute in _bloxone_dns_a_record_ is read only. If you have a configuration like this:
- ```terraform
- resource "bloxone_dns_a_record" "example" {
- name = "domain.com"
- type = "A"
- }
- ```
- you will have to remove _type_ from the config as it is read only.
- - **Default values**: Some default values may have changed in the new provider. For example, the _hostname_rewrite_regex_ attribute in _bloxone_dns_forward_nsg_ has been changed from `[^a-zA-Z0-9.-]` to `[^a-zA-Z0-9_.]`.
- If your configuration, like the one below, doesn't specify a value for _hostname_rewrite_regex_:
- ```terraform
- resource "bloxone_dns_forward_nsg" "example" {
- name = "example"
- }
- ```
- you'll need to add a _hostname_rewrite_regex_ value to your configuration. This value should match the existing or old default value, otherwise, the plan will indicate a change.
- ```terraform
- resource "bloxone_dns_forward_nsg" "example" {
- name = "example"
- hostname_rewrite_regex = "[^a-zA-Z0-9.-]"
- }
- ```
+
+#### Unsupported block type
+Configuration written as blocks will have to be rewritten as values. For example, if you have a block like this:
+```terraform
+internal_secondaries {
+ host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
+}
+```
+you will have to rewrite it with an equal sign :
+```terraform
+internal_secondaries = [
+ {
+ host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
+ }
+]
+```
+
+#### Read Only attributes
+Some attributes are read only in the BloxOne provider. For example, the _type_ attribute in _bloxone_dns_a_record_ is read only.
+
+If you have a configuration like this:
+```terraform
+resource "bloxone_dns_a_record" "example" {
+ name = "domain.com"
+ type = "A"
+}
+```
+you will have to remove _type_ from the config as it is read only:
+```terraform
+resource "bloxone_dns_a_record" "example" {
+ name = "domain.com"
+}
+```
+
+#### Default values
+Some default values may have changed in the new provider. For example, the _hostname_rewrite_regex_ attribute in _bloxone_dns_forward_nsg_ has been changed from `[^a-zA-Z0-9.-]` to `[^a-zA-Z0-9_.]`.
+
+If your configuration, like the one below, doesn't specify a value for _hostname_rewrite_regex_:
+```terraform
+resource "bloxone_dns_forward_nsg" "example" {
+ name = "example"
+}
+```
+you will need to add a _hostname_rewrite_regex_ value to your configuration. This value should match the existing or old default value, otherwise, the plan will indicate a change.
+```terraform
+resource "bloxone_dns_forward_nsg" "example" {
+ name = "example"
+ hostname_rewrite_regex = "[^a-zA-Z0-9.-]"
+}
+```
diff --git a/docs/guides/quickstart-dhcp.md b/docs/guides/quickstart-dhcp.md
new file mode 100644
index 00000000..b30c5bac
--- /dev/null
+++ b/docs/guides/quickstart-dhcp.md
@@ -0,0 +1,238 @@
+---
+page_title: "Managing DHCP service with the BloxOne Terraform Provider"
+subcategory: "Guides"
+description: |-
+ This guide provides step-by-step instructions for using the BloxOne Terraform Provider to manage IPAM and DHCP resources.
+---
+
+# Managing DHCP service with the BloxOne Terraform Provider
+
+This guide provides step-by-step instructions for using the BloxOne Terraform Provider to manage IPAM and DHCP resources.
+
+## Configuring the Provider
+
+The provider needs to be configured with an API key and the URL of the Infoblox Cloud Services Portal (CSP). You can get the API Key from the Infoblox Cloud Services Portal (CSP) by following the steps outlined in this guide - [Configuring User API Keys](https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys).
+
+Create a directory for the Terraform configuration and create a file named `main.tf` with the following content:
+
+````terraform
+terraform {
+ required_providers {
+ bloxone = {
+ source = "infobloxopen/bloxone"
+ version = ">= 0.1.0"
+ }
+ }
+
+ required_version = ">= 1.0.0"
+}
+
+provider "bloxone" {
+ csp_url = "https://csp.infoblox.com"
+ api_key = ""
+}
+````
+
+!> Warning: Hard-coded credentials are not recommended in any configuration file. It is recommended to use environment variables.
+
+You can also use the following environment variables to configure the provider:
+`BLOXONE_CSP_URL` and `BLOXONE_API_KEY`.
+
+Initialize the provider by running the following command. This will download the provider and initialize the working directory.
+
+```shell
+terraform init
+```
+
+## Configuring Resources
+
+### IPAM and DHCP Resources
+In this example, you will use the following resources to create an IP space, address block, and subnet.
+
+- [bloxone_ipam_ip_space](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_ip_space)
+- [bloxone_ipam_address_block](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_address_block)
+- [bloxone_ipam_subnet](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_subnet)
+
+Add the following to the `main.tf` file:
+
+````terraform
+// Create an IP space
+resource "bloxone_ipam_ip_space" "this" {
+ name = "example"
+}
+
+// Create an address block within the IP space
+resource "bloxone_ipam_address_block" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "16"
+}
+
+// Create a subnet within the address block
+resource "bloxone_ipam_subnet" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "24"
+}
+
+````
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+Further, you will create a range and a fixed address reservation within the subnet.
+
+You will use the following resources to create these
+- [bloxone_ipam_range](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_range)
+- [bloxone_dhcp_fixed_address](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/dhcp_fixed_address)
+
+You will use the following data sources to get the option codes in the default DHCPv4 option space
+- [bloxone_dhcp_option_spaces](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/data-sources/dhcp_option_spaces)
+- [bloxone_dhcp_option_codes](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/data-sources/dhcp_option_codes)
+
+Add the following code to your main.tf:
+
+````terraform
+// Get the default option space for DHCPv4
+data "bloxone_dhcp_option_spaces" "dhcp4" {
+ filters = {
+ name = "dhcp4"
+ }
+}
+
+// Get the option codes for the default option space
+data "bloxone_dhcp_option_codes" "dhcp4" {
+ filters = {
+ option_space = data.bloxone_dhcp_option_spaces.dhcp4.results.0.id
+ }
+}
+
+locals {
+ // Create a map of option code names to option code IDs
+ // This will be used to look up the option code ID by name
+ dhcp4_option_code_lookup = zipmap(data.bloxone_dhcp_option_codes.dhcp4.results[*].name, data.bloxone_dhcp_option_codes.dhcp4.results[*].id)
+}
+
+// Create a range within the subnet
+resource "bloxone_ipam_range" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ start = "10.0.0.5"
+ end = "10.0.0.100"
+ dhcp_options = [
+ {
+ option_code = local.dhcp4_option_code_lookup["domain-name-servers"]
+ option_value = "10.0.0.1"
+ type = "option"
+ },
+ {
+ option_code = local.dhcp4_option_code_lookup["domain-name"]
+ option_value = "domain.com"
+ type = "option"
+ }
+ ]
+
+ depends_on = [bloxone_ipam_subnet.this]
+}
+
+// Create a Fixed Address within the subnet
+resource "bloxone_dhcp_fixed_address" "this" {
+ ip_space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.6"
+ match_type = "mac"
+ match_value = "00:11:22:33:44:55"
+ dhcp_options = [
+ {
+ option_code = local.dhcp4_option_code_lookup["time-offset"]
+ option_value = "-5"
+ type = "option"
+ }
+ ]
+
+ depends_on = [bloxone_ipam_subnet.this]
+}
+````
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+### BloxOne Host on AWS with DHCP service
+
+As a final step, you will also configure a BloxOne Host on AWS with DHCP service.
+You will use the following module to create these
+- [bloxone_infra_host_aws](https://github.com/infobloxopen/terraform-provider-bloxone/tree/master/modules/bloxone_infra_host_aws)
+
+The module requires the [AWS terraform provider](https://registry.terraform.io/providers/hashicorp/aws/latest) to be configured.
+To configure the AWS provider, add the following code to your main.tf:
+
+````terraform
+provider "aws" {
+ region = "us-west-2"
+ access_key = "my-access-key"
+ secret_key = "my-secret-key"
+}
+````
+
+!> Warning: Hard-coded credentials are not recommended in any configuration file. It is recommended to use the AWS credentials file or environment variables.
+
+You can also use the following environment variables to configure the provider:
+`AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
+
+To create an EC2 instance with DHCP service, you will need to have the following information:
+- key_name: The name of the key pair to use for the instance
+- subnet_id: The ID of the subnet to launch the instance into
+- vpc_security_group_ids: A list of security group IDs to associate with the instance
+
+Add the following code to your main.tf to create an EC2 instance with DHCP service:
+
+````terraform
+
+// Create a BloxOne Host on AWS with DHCP service
+module "bloxone_infra_host_aws" {
+ source = "github.com/infobloxopen/terraform-provider-bloxone//modules/bloxone_infra_host_aws"
+
+ key_name = "my-key"
+ subnet_id = "subnet-id"
+ vpc_security_group_ids = ["vpc-security-group-id"]
+
+ services = {
+ dhcp = "start"
+ }
+}
+````
+
+You will also have to modify the subnet resource to assign the BloxOne Host to serve the subnet. To do this, replace the subnet resource with the following code:
+
+````terraform
+resource "bloxone_ipam_subnet" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "24"
+ dhcp_host = module.bloxone_infra_host_aws.host.legacy_id
+}
+````
+
+Here, the `dhcp_host` attribute has been added to the subnet resource and assigned the `legacy_id` of the BloxOne Host to serve the subnet.
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+## Applying the Configuration
+
+To create the resources, run the following command:
+
+```shell
+terraform apply
+```
+
+## Next steps
+
+You can also use the BloxOne Terraform Provider to manage other resources such as DNS zones, DNS records. For more information, see the [BloxOne Terraform Provider documentation](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs).
diff --git a/docs/index.md b/docs/index.md
index b950ae62..09a2388c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,14 +1,14 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
-page_title: "bloxone Provider"
+page_title: "BloxOne Provider"
subcategory: ""
description: |-
-
+ The BloxOne provider is used to interact with the resources supported by Infoblox BloxOne API.
---
-# bloxone Provider
-
+# BloxOne Provider
+The BloxOne provider is used to interact with the resources supported by Infoblox BloxOne API.
## Example Usage
diff --git a/internal/provider/provider.go b/internal/provider/provider.go
index bf2686df..2fd85eea 100644
--- a/internal/provider/provider.go
+++ b/internal/provider/provider.go
@@ -44,6 +44,7 @@ func (p *BloxOneProvider) Metadata(_ context.Context, _ provider.MetadataRequest
func (p *BloxOneProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{
+ Description: "The BloxOne provider is used to interact with the resources supported by Infoblox BloxOne API.",
Attributes: map[string]schema.Attribute{
"csp_url": schema.StringAttribute{
MarkdownDescription: "URL for BloxOne Cloud Services Portal. Can also be configured using the `BLOXONE_CSP_URL` environment variable.",
diff --git a/modules/bloxone_infra_host_aws/README.md b/modules/bloxone_infra_host_aws/README.md
index ed76c420..d3d82a7d 100644
--- a/modules/bloxone_infra_host_aws/README.md
+++ b/modules/bloxone_infra_host_aws/README.md
@@ -34,14 +34,13 @@ module "bloxone_infra_host_aws" {
| Name | Version |
|------|---------|
-| [terraform](#requirement\_terraform) | >= 1.5 |
-| [aws](#requirement\_aws) | >= 4.9 |
+| [terraform](#requirement\_terraform) | >= 1.0 |
## Providers
| Name | Version |
|------|---------|
-| [aws](#provider\_aws) | >= 4.9 |
+| [aws](#provider\_aws) | n/a |
| [bloxone](#provider\_bloxone) | n/a |
| [random](#provider\_random) | n/a |
diff --git a/modules/bloxone_infra_host_aws/main.tf b/modules/bloxone_infra_host_aws/main.tf
index 72c8aab0..5089f61c 100644
--- a/modules/bloxone_infra_host_aws/main.tf
+++ b/modules/bloxone_infra_host_aws/main.tf
@@ -54,7 +54,7 @@ data "aws_ami" "bloxone" {
most_recent = true
filter {
name = "name"
- values = ["Infoblox BloxOne 3.5 BYOL"]
+ values = ["Infoblox BloxOne 3.8.1 BYOL"]
}
}
diff --git a/templates/guides/migration.md b/templates/guides/migration.md
index db8dba7b..a376d7d6 100644
--- a/templates/guides/migration.md
+++ b/templates/guides/migration.md
@@ -53,11 +53,11 @@ The resource types have changed in the new provider. The following table shows t
| b1ddi_dns_auth_nsg | bloxone_dns_auth_nsg |
| b1ddi_dns_record | bloxone_dns_record* |
-> NOTE: The _b1ddi_dns_record_ in the B1DDI provider used to be a single resource type that could be used to create any type of DNS record.
-> In the BloxOne provider, this has been split into multiple resource types, one for each record type.
-> For example, _b1ddi_dns_record_ is now _bloxone_dns_a_record_, _bloxone_dns_aaaa_record_, _bloxone_dns_caa_record_, etc.
->
-> The _bloxone_dns_record_ is for resource records that are not supported explicitly by the provider. For example, if you want to create a DNS record of type _URI_, you can use _bloxone_dns_record_.
+-> NOTE: The _b1ddi_dns_record_ in the B1DDI provider used to be a single resource type that could be used to create any type of DNS record.
+In the BloxOne provider, this has been split into multiple resource types, one for each record type.
+For example, _b1ddi_dns_record_ is now _bloxone_dns_a_record_, _bloxone_dns_aaaa_record_, _bloxone_dns_caa_record_, etc.
+The _bloxone_dns_record_ is for resource records that are not supported explicitly by the provider.
+For example, if you want to create a DNS record of type _URI_, you can use _bloxone_dns_record_.
To migrate your configuration, you will need to replace the old resource types with the new resource types. For example:
@@ -119,39 +119,53 @@ There should be no changes to your infrastructure if you have replaced all the r
In case there are changes, you will need to make the necessary changes to your configuration to match the new provider.
Some of the changes you may need to make are listed below.
- - **Unsupported block type**: Configuration written as blocks will have to be rewritten as values. For example, if you have a block like this:
- ```terraform
- internal_secondaries {
- host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
- }
- ```
- you will have to rewrite it with an equal sign :
- ```terraform
- internal_secondaries = [
- {
- host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
- }
- ]
- ```
- - **Read Only attributes**: Some attributes are read only in the BloxOne provider. For example, the _type_ attribute in _bloxone_dns_a_record_ is read only. If you have a configuration like this:
- ```terraform
- resource "bloxone_dns_a_record" "example" {
- name = "domain.com"
- type = "A"
- }
- ```
- you will have to remove _type_ from the config as it is read only.
- - **Default values**: Some default values may have changed in the new provider. For example, the _hostname_rewrite_regex_ attribute in _bloxone_dns_forward_nsg_ has been changed from `[^a-zA-Z0-9.-]` to `[^a-zA-Z0-9_.]`.
- If your configuration, like the one below, doesn't specify a value for _hostname_rewrite_regex_:
- ```terraform
- resource "bloxone_dns_forward_nsg" "example" {
- name = "example"
- }
- ```
- you'll need to add a _hostname_rewrite_regex_ value to your configuration. This value should match the existing or old default value, otherwise, the plan will indicate a change.
- ```terraform
- resource "bloxone_dns_forward_nsg" "example" {
- name = "example"
- hostname_rewrite_regex = "[^a-zA-Z0-9.-]"
- }
- ```
+
+#### Unsupported block type
+Configuration written as blocks will have to be rewritten as values. For example, if you have a block like this:
+```terraform
+internal_secondaries {
+ host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
+}
+```
+you will have to rewrite it with an equal sign :
+```terraform
+internal_secondaries = [
+ {
+ host = "dns/host/989a0d20-c030-11ee-a93d-0b6e6ea305e3"
+ }
+]
+```
+
+#### Read Only attributes
+Some attributes are read only in the BloxOne provider. For example, the _type_ attribute in _bloxone_dns_a_record_ is read only.
+
+If you have a configuration like this:
+```terraform
+resource "bloxone_dns_a_record" "example" {
+ name = "domain.com"
+ type = "A"
+}
+```
+you will have to remove _type_ from the config as it is read only:
+```terraform
+resource "bloxone_dns_a_record" "example" {
+ name = "domain.com"
+}
+```
+
+#### Default values
+Some default values may have changed in the new provider. For example, the _hostname_rewrite_regex_ attribute in _bloxone_dns_forward_nsg_ has been changed from `[^a-zA-Z0-9.-]` to `[^a-zA-Z0-9_.]`.
+
+If your configuration, like the one below, doesn't specify a value for _hostname_rewrite_regex_:
+```terraform
+resource "bloxone_dns_forward_nsg" "example" {
+ name = "example"
+}
+```
+you will need to add a _hostname_rewrite_regex_ value to your configuration. This value should match the existing or old default value, otherwise, the plan will indicate a change.
+```terraform
+resource "bloxone_dns_forward_nsg" "example" {
+ name = "example"
+ hostname_rewrite_regex = "[^a-zA-Z0-9.-]"
+}
+```
diff --git a/templates/guides/quickstart-dhcp.md b/templates/guides/quickstart-dhcp.md
new file mode 100644
index 00000000..b30c5bac
--- /dev/null
+++ b/templates/guides/quickstart-dhcp.md
@@ -0,0 +1,238 @@
+---
+page_title: "Managing DHCP service with the BloxOne Terraform Provider"
+subcategory: "Guides"
+description: |-
+ This guide provides step-by-step instructions for using the BloxOne Terraform Provider to manage IPAM and DHCP resources.
+---
+
+# Managing DHCP service with the BloxOne Terraform Provider
+
+This guide provides step-by-step instructions for using the BloxOne Terraform Provider to manage IPAM and DHCP resources.
+
+## Configuring the Provider
+
+The provider needs to be configured with an API key and the URL of the Infoblox Cloud Services Portal (CSP). You can get the API Key from the Infoblox Cloud Services Portal (CSP) by following the steps outlined in this guide - [Configuring User API Keys](https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys).
+
+Create a directory for the Terraform configuration and create a file named `main.tf` with the following content:
+
+````terraform
+terraform {
+ required_providers {
+ bloxone = {
+ source = "infobloxopen/bloxone"
+ version = ">= 0.1.0"
+ }
+ }
+
+ required_version = ">= 1.0.0"
+}
+
+provider "bloxone" {
+ csp_url = "https://csp.infoblox.com"
+ api_key = ""
+}
+````
+
+!> Warning: Hard-coded credentials are not recommended in any configuration file. It is recommended to use environment variables.
+
+You can also use the following environment variables to configure the provider:
+`BLOXONE_CSP_URL` and `BLOXONE_API_KEY`.
+
+Initialize the provider by running the following command. This will download the provider and initialize the working directory.
+
+```shell
+terraform init
+```
+
+## Configuring Resources
+
+### IPAM and DHCP Resources
+In this example, you will use the following resources to create an IP space, address block, and subnet.
+
+- [bloxone_ipam_ip_space](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_ip_space)
+- [bloxone_ipam_address_block](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_address_block)
+- [bloxone_ipam_subnet](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_subnet)
+
+Add the following to the `main.tf` file:
+
+````terraform
+// Create an IP space
+resource "bloxone_ipam_ip_space" "this" {
+ name = "example"
+}
+
+// Create an address block within the IP space
+resource "bloxone_ipam_address_block" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "16"
+}
+
+// Create a subnet within the address block
+resource "bloxone_ipam_subnet" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "24"
+}
+
+````
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+Further, you will create a range and a fixed address reservation within the subnet.
+
+You will use the following resources to create these
+- [bloxone_ipam_range](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/ipam_range)
+- [bloxone_dhcp_fixed_address](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/resources/dhcp_fixed_address)
+
+You will use the following data sources to get the option codes in the default DHCPv4 option space
+- [bloxone_dhcp_option_spaces](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/data-sources/dhcp_option_spaces)
+- [bloxone_dhcp_option_codes](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs/data-sources/dhcp_option_codes)
+
+Add the following code to your main.tf:
+
+````terraform
+// Get the default option space for DHCPv4
+data "bloxone_dhcp_option_spaces" "dhcp4" {
+ filters = {
+ name = "dhcp4"
+ }
+}
+
+// Get the option codes for the default option space
+data "bloxone_dhcp_option_codes" "dhcp4" {
+ filters = {
+ option_space = data.bloxone_dhcp_option_spaces.dhcp4.results.0.id
+ }
+}
+
+locals {
+ // Create a map of option code names to option code IDs
+ // This will be used to look up the option code ID by name
+ dhcp4_option_code_lookup = zipmap(data.bloxone_dhcp_option_codes.dhcp4.results[*].name, data.bloxone_dhcp_option_codes.dhcp4.results[*].id)
+}
+
+// Create a range within the subnet
+resource "bloxone_ipam_range" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ start = "10.0.0.5"
+ end = "10.0.0.100"
+ dhcp_options = [
+ {
+ option_code = local.dhcp4_option_code_lookup["domain-name-servers"]
+ option_value = "10.0.0.1"
+ type = "option"
+ },
+ {
+ option_code = local.dhcp4_option_code_lookup["domain-name"]
+ option_value = "domain.com"
+ type = "option"
+ }
+ ]
+
+ depends_on = [bloxone_ipam_subnet.this]
+}
+
+// Create a Fixed Address within the subnet
+resource "bloxone_dhcp_fixed_address" "this" {
+ ip_space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.6"
+ match_type = "mac"
+ match_value = "00:11:22:33:44:55"
+ dhcp_options = [
+ {
+ option_code = local.dhcp4_option_code_lookup["time-offset"]
+ option_value = "-5"
+ type = "option"
+ }
+ ]
+
+ depends_on = [bloxone_ipam_subnet.this]
+}
+````
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+### BloxOne Host on AWS with DHCP service
+
+As a final step, you will also configure a BloxOne Host on AWS with DHCP service.
+You will use the following module to create these
+- [bloxone_infra_host_aws](https://github.com/infobloxopen/terraform-provider-bloxone/tree/master/modules/bloxone_infra_host_aws)
+
+The module requires the [AWS terraform provider](https://registry.terraform.io/providers/hashicorp/aws/latest) to be configured.
+To configure the AWS provider, add the following code to your main.tf:
+
+````terraform
+provider "aws" {
+ region = "us-west-2"
+ access_key = "my-access-key"
+ secret_key = "my-secret-key"
+}
+````
+
+!> Warning: Hard-coded credentials are not recommended in any configuration file. It is recommended to use the AWS credentials file or environment variables.
+
+You can also use the following environment variables to configure the provider:
+`AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
+
+To create an EC2 instance with DHCP service, you will need to have the following information:
+- key_name: The name of the key pair to use for the instance
+- subnet_id: The ID of the subnet to launch the instance into
+- vpc_security_group_ids: A list of security group IDs to associate with the instance
+
+Add the following code to your main.tf to create an EC2 instance with DHCP service:
+
+````terraform
+
+// Create a BloxOne Host on AWS with DHCP service
+module "bloxone_infra_host_aws" {
+ source = "github.com/infobloxopen/terraform-provider-bloxone//modules/bloxone_infra_host_aws"
+
+ key_name = "my-key"
+ subnet_id = "subnet-id"
+ vpc_security_group_ids = ["vpc-security-group-id"]
+
+ services = {
+ dhcp = "start"
+ }
+}
+````
+
+You will also have to modify the subnet resource to assign the BloxOne Host to serve the subnet. To do this, replace the subnet resource with the following code:
+
+````terraform
+resource "bloxone_ipam_subnet" "this" {
+ space = bloxone_ipam_ip_space.this.id
+ address = "10.0.0.0"
+ cidr = "24"
+ dhcp_host = module.bloxone_infra_host_aws.host.legacy_id
+}
+````
+
+Here, the `dhcp_host` attribute has been added to the subnet resource and assigned the `legacy_id` of the BloxOne Host to serve the subnet.
+
+You can now run `terraform plan` to see what resources will be created.
+
+```shell
+terraform plan
+```
+
+## Applying the Configuration
+
+To create the resources, run the following command:
+
+```shell
+terraform apply
+```
+
+## Next steps
+
+You can also use the BloxOne Terraform Provider to manage other resources such as DNS zones, DNS records. For more information, see the [BloxOne Terraform Provider documentation](https://registry.terraform.io/providers/infobloxopen/bloxone/latest/docs).
diff --git a/templates/index.md.tmpl b/templates/index.md.tmpl
new file mode 100644
index 00000000..93e9b405
--- /dev/null
+++ b/templates/index.md.tmpl
@@ -0,0 +1,19 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "BloxOne Provider"
+subcategory: ""
+description: |-
+{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
+---
+
+# BloxOne Provider
+
+{{ .Description | trimspace }}
+
+{{ if .HasExample -}}
+## Example Usage
+
+{{codefile "terraform" .ExampleFile}}
+{{- end }}
+
+{{ .SchemaMarkdown | trimspace }}