-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#11 added azureipam_reservation_cidr to allow to specify cidr to reserve
- Loading branch information
Showing
17 changed files
with
681 additions
and
41 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
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
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,71 @@ | ||
--- | ||
page_title: "azureipam_reservation_cidr Resource - azureipam" | ||
subcategory: "" | ||
description: |- | ||
The reservation resource allows you to create a IPAM reservation in the specific space and block with a fixed cidr. | ||
--- | ||
|
||
# azureipam_reservation_cidr (Resource) | ||
|
||
The reservation resource allows you to create a IPAM reservation in the specific space and block with a fixed cidr. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Deploy the azurerm vnet | ||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "Australia East" | ||
} | ||
resource "azurerm_virtual_network" "example" { | ||
name = "example-network" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
address_space = [azureipam_reservation_cidr.new.cidr] | ||
tags = azureipam_reservation_cidr.new.tags ##Don't forget to add the auto-generated `X-IPAM-RES-ID` tag to the vnet. | ||
} | ||
# Create a CIDR reservation specifying a custom cidr | ||
resource "azureipam_reservation_cidr" "new" { | ||
space = "au" | ||
block = "AustraliaEast" | ||
specific_cidr = "10.82.4.0/24" | ||
description = "this is a test" | ||
} | ||
output "created" { | ||
value = azureipam_reservation_cidr.new | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `block` (String) List with the names of blocks in the specified space in which the reservation is to be create. The list is evaluated in the order provider. Changing this forces a new resource to be created. | ||
- `space` (String) Name of the existing space in the IPAM application. Changing this forces a new resource to be created. | ||
|
||
### Optional | ||
|
||
- `description` (String) Description text that describe the reservation, that will be added as an additional tag. | ||
- `specific_cidr` (String) The specific CIDR to reserve, in cidr notation. At least one of size or specific_cidr attribute must be specified. Not allowed if more than one block is specified. | ||
|
||
### Read-Only | ||
|
||
- `cidr` (String) The assigned and reserved range, in cidr notation. | ||
- `created_by` (String) Email or identification of user that created the reservation. | ||
- `created_on` (String) The date and time that the reservacion was created. | ||
- `id` (String) The unique identifier of the generated reservation. | ||
- `settled_by` (String) Email or identification of user that settled the reservation. | ||
- `settled_on` (String) The date and time that the reservacion was settled. | ||
- `status` (String) Status of the reservation, a 'wait' status indicates that is waiting for the related vnet creation | ||
- `tags` (Map of String) Auto-generated tags for the reservation. Particular relevance the 'X-IPAM-RES-ID' tag, since it must be included in the vnet creation in order that the IPAM solution automatically considers the reservation as completed. | ||
|
||
## Import | ||
|
||
Reservations can be imported using the ID of the IPAM reservation, e.g. | ||
|
||
```shell | ||
terraform import azureipam_reservation_cidr.new 95s5RH8HS38Y6k37vuGLQu | ||
``` |
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
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,24 @@ | ||
# Deploy the azurerm vnet | ||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "Australia East" | ||
} | ||
resource "azurerm_virtual_network" "example" { | ||
name = "example-network" | ||
location = azurerm_resource_group.example.location | ||
resource_group_name = azurerm_resource_group.example.name | ||
|
||
address_space = [azureipam_reservation_cidr.new.cidr] | ||
tags = azureipam_reservation_cidr.new.tags ##Don't forget to add the auto-generated `X-IPAM-RES-ID` tag to the vnet. | ||
} | ||
|
||
# Create a CIDR reservation specifying a custom cidr | ||
resource "azureipam_reservation_cidr" "new" { | ||
space = "au" | ||
block = "AustraliaEast" | ||
specific_cidr = "10.82.4.0/24" | ||
description = "this is a test" | ||
} | ||
output "created" { | ||
value = azureipam_reservation_cidr.new | ||
} |
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
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.