-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
otatar
committed
Jan 30, 2025
1 parent
ba0222b
commit edfcc9d
Showing
11 changed files
with
264 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: '>= 0.14.0' | ||
|
||
formatter: markdown table | ||
|
||
content: |- | ||
# Terraform ACI Atomic Counter Module | ||
Atomic Counter | ||
Location in GUI: | ||
`Operations` » `Visualization` » `Settings` | ||
## Examples | ||
```hcl | ||
{{ include "./examples/complete/main.tf" }} | ||
``` | ||
{{ .Requirements }} | ||
{{ .Providers }} | ||
{{ .Inputs }} | ||
{{ .Outputs }} | ||
{{ .Resources }} | ||
output: | ||
file: README.md | ||
mode: replace | ||
|
||
sort: | ||
enabled: false |
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,55 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Terraform Atomic Counter Module | ||
|
||
Atomic Counter Module | ||
|
||
Location in GUI: | ||
`Operations` » `Visualization` » `Settings` | ||
|
||
## Examples | ||
|
||
```hcl | ||
module "aci_banner" { | ||
source = "netascode/nac-aci/aci/modules/terraform-atomic-counter" | ||
version = ">= 0.8.0" | ||
admin_state = true | ||
mode = "path" | ||
user_domain = "all" | ||
name = "My_Atomic_Counter" | ||
} | ||
``` | ||
|
||
## Requirements | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 | | ||
| <a name="requirement_aci"></a> [aci](#requirement\_aci) | >= 2.0.0 | | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aci"></a> [aci](#provider\_aci) | >= 2.0.0 | | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_admin_state"></a> [admin\_state](#input\_admin\_state) | Admin state. | `bool` | `false` | no | | ||
| <a name="input_mode></a> [mode](#input\_mode) | APIC GUI banner URL. | `string` | `"trail|path"` | no | | ||
|
||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
|------|-------------| | ||
| <a name="output_dn"></a> [dn](#output\_dn) | Distinguished name of `OngoingAcMode` object. | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
| [aci_rest_managed.aaaPreLoginBanner](https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs/resources/rest_managed) | resource | | ||
<!-- END_TF_DOCS --> |
24 changes: 24 additions & 0 deletions
24
modules/terraform-aci-atomic-counter/examples/complete/.terraform-docs.yml
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 @@ | ||
version: '>= 0.14.0' | ||
|
||
formatter: markdown table | ||
|
||
content: |- | ||
# Banner Example | ||
To run this example you need to execute: | ||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
Note that this example will create resources. Resources can be destroyed with `terraform destroy`. | ||
```hcl | ||
{{ include "./main.tf" }} | ||
``` | ||
output: | ||
file: README.md | ||
mode: replace |
25 changes: 25 additions & 0 deletions
25
modules/terraform-aci-atomic-counter/examples/complete/README.md
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,25 @@ | ||
<!-- BEGIN_TF_DOCS --> | ||
# Banner Example | ||
|
||
To run this example you need to execute: | ||
|
||
```bash | ||
$ terraform init | ||
$ terraform plan | ||
$ terraform apply | ||
``` | ||
|
||
Note that this example will create resources. Resources can be destroyed with `terraform destroy`. | ||
|
||
```hcl | ||
module "aci_banner" { | ||
source = "netascode/nac-aci/aci//modules/terraform-aci-banner" | ||
version = ">= 0.8.0" | ||
apic_gui_banner_url = "http://1.1.1.1" | ||
apic_gui_alias = "PROD" | ||
apic_cli_banner = "My CLI Banner" | ||
switch_cli_banner = "My Switch Banner" | ||
} | ||
``` | ||
<!-- END_TF_DOCS --> |
9 changes: 9 additions & 0 deletions
9
modules/terraform-aci-atomic-counter/examples/complete/main.tf
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,9 @@ | ||
module "aci_banner" { | ||
source = "netascode/nac-aci/aci//modules/terraform-aci-banner" | ||
version = ">= 0.8.0" | ||
|
||
apic_gui_banner_url = "http://1.1.1.1" | ||
apic_gui_alias = "PROD" | ||
apic_cli_banner = "My CLI Banner" | ||
switch_cli_banner = "My Switch Banner" | ||
} |
11 changes: 11 additions & 0 deletions
11
modules/terraform-aci-atomic-counter/examples/complete/versions.tf
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,11 @@ | ||
|
||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
required_providers { | ||
aci = { | ||
source = "CiscoDevNet/aci" | ||
version = ">= 2.0.0" | ||
} | ||
} | ||
} |
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,9 @@ | ||
resource "aci_rest_managed" "OngoingAcMode" { | ||
dn = "uni/fabric/ogmode" | ||
class_name = "OngoingAcMode" | ||
escape_html = var.escape_html | ||
content = { | ||
adminSt = var.admin_state == true ? "on" : "off" | ||
name = var.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,4 @@ | ||
output "dn" { | ||
value = aci_rest_managed.OngoingAcMode.id | ||
description = "Distinguished name of `OngoingAcMode` object." | ||
} |
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,73 @@ | ||
variable "admin_state" { | ||
description = "Admin state." | ||
type = bool | ||
default = true | ||
} | ||
|
||
variable "annotation" { | ||
description = "Annotation value." | ||
type = string | ||
default = null | ||
|
||
validation { | ||
condition = var.annotation == null || can(regex("^[a-zA-Z0-9_.:-]{0,64}$", var.annotation)) | ||
error_message = "Allowed characters: `a`-`z`, `A`-`Z`, `0`-`9`, `_`, `.`, `:`, `-`. Maximum characters: 64." | ||
} | ||
} | ||
|
||
variable "description" { | ||
description = "Description." | ||
type = string | ||
default = "" | ||
|
||
validation { | ||
condition = can(regex("^[a-zA-Z0-9\\\\!#$%()*,-./:;@ _{|}~?&+]{0,128}$", var.description)) | ||
error_message = "Allowed characters: `a`-`z`, `A`-`Z`, `0`-`9`, `\\`, `!`, `#`, `$`, `%`, `(`, `)`, `*`, `,`, `-`, `.`, `/`, `:`, `;`, `@`, ` `, `_`, `{`, `|`, }`, `~`, `?`, `&`, `+`. Maximum characters: 128." | ||
} | ||
} | ||
|
||
|
||
variable "name" { | ||
description = "Atomic Counter Name." | ||
type = string | ||
|
||
validation { | ||
condition = can(regex("^[a-zA-Z0-9_.:-]{0,64}$", var.name)) | ||
error_message = "Allowed characters: `a`-`z`, `A`-`Z`, `0`-`9`, `_`, `.`, `:`, `-`. Maximum characters: 64." | ||
} | ||
} | ||
|
||
variable "mode" { | ||
description = "The BGP Domain name" | ||
type = string | ||
default = "trail" | ||
} | ||
|
||
variable "alias" { | ||
description = "Alias." | ||
type = string | ||
default = "" | ||
|
||
validation { | ||
condition = can(regex("^[a-zA-Z0-9_.:-]{0,64}$", var.alias)) | ||
error_message = "Allowed characters: `a`-`z`, `A`-`Z`, `0`-`9`, `_`, `.`, `:`, `-`. Maximum characters: 64." | ||
} | ||
} | ||
|
||
variable "owner_key" { | ||
description = "Owner Key" | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "owner_tag" { | ||
description = "Owner Tag" | ||
type = string | ||
default = "" | ||
} | ||
|
||
variable "user_domain" { | ||
description = "User domain" | ||
type = string | ||
default = "all" | ||
} |
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,11 @@ | ||
|
||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
required_providers { | ||
aci = { | ||
source = "CiscoDevNet/aci" | ||
version = ">= 2.0.0" | ||
} | ||
} | ||
} |