-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from mohith10/externalDNS-feature
Added External DNS Feature
- Loading branch information
Showing
14 changed files
with
761 additions
and
38 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,49 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "dcloud_external_dns Data Source - terraform-provider-dcloud" | ||
subcategory: "" | ||
description: |- | ||
All the dns records currently in a given topology | ||
--- | ||
|
||
# dcloud_external_dns (Data Source) | ||
|
||
All the dns records currently in a given topology | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `topology_uid` (String) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `external_dns` (List of Object) (see [below for nested schema](#nestedatt--external_dns)) | ||
|
||
<a id="nestedatt--external_dns"></a> | ||
### Nested Schema for `external_dns` | ||
|
||
Read-Only: | ||
|
||
- `uid` (String) | ||
- `topology_uid` (String) | ||
- `hostname` (String) | ||
- `nat_rule_id` (String) | ||
- `a_record` (String) | ||
- `srv_records` (List of Object) (see [below for nested schema](#nestedobjatt--external_dns--srv_records)) | ||
|
||
|
||
<a id="nestedobjatt--external_dns--srv_records"></a> | ||
### Nested Schema for `external_dns.srv_records` | ||
|
||
Read-Only: | ||
|
||
- `protocol` (String) | ||
- `service` (String) | ||
- `port` (Int) | ||
- `uid` (String) | ||
|
||
|
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,35 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "dcloud_inventory_dns_assets Data Source - terraform-provider-dcloud" | ||
subcategory: "" | ||
description: |- | ||
All the inventory dns assets available to be used in a topology | ||
--- | ||
|
||
# dcloud_inventory_dns_assets (Data Source) | ||
|
||
All the inventory dns assets available to be used in a topology | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `topology_uid` (String) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `inventory_dns_assets` (List of Object) (see [below for nested schema](#nestedatt--inventory_dns_assets)) | ||
|
||
<a id="nestedatt--inventory_dns_assets"></a> | ||
### Nested Schema for `inventory_dns_assets` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `name` (String) | ||
|
||
|
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,32 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "dcloud_inventory_srv_protocols Data Source - terraform-provider-dcloud" | ||
subcategory: "" | ||
description: |- | ||
All the inventory srv protocols available to be used in a topology | ||
--- | ||
|
||
# dcloud_inventory_srv_protocols (Data Source) | ||
|
||
All the inventory srv protocols available to be used in a topology | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `inventory_srv_protocols` (List of Object) (see [below for nested schema](#nestedatt--inventory_srv_protocols)) | ||
|
||
<a id="nestedatt--inventory_srv_protocols"></a> | ||
### Nested Schema for `inventory_srv_protocols` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) | ||
- `protocol` (String) | ||
|
||
|
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,38 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "dcloud_mail_server Resource - terraform-provider-dcloud" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# dcloud_mail_server (Resource) | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `nat_rule_id` (String) | ||
- `hostname` (String) | ||
- `topology_uid` (String) | ||
|
||
### Optional | ||
|
||
- `srv_records` (Block List, Min: 1) (see [below for nested schema](#nestedblock--srv_records)) | ||
|
||
<a id="nestedblock--srv_records"></a> | ||
### Nested Schema for `srv_records` | ||
|
||
Required: | ||
|
||
- `protocol` (Boolean) | ||
- `service` (String) | ||
- `port` (Int) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `a_record` (String) | ||
- `uid` (String) |
46 changes: 46 additions & 0 deletions
46
examples/data-sources/external_dns_data_source/data-source.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,46 @@ | ||
terraform { | ||
required_providers { | ||
dcloud = { | ||
version = "0.1" | ||
source = "cisco-open/dcloud" | ||
} | ||
} | ||
} | ||
|
||
provider "dcloud" { | ||
tb_url = "https://tbv3-production.ciscodcloud.com/api" | ||
} | ||
|
||
resource "dcloud_topology" "test_topology" { | ||
name = "Test Topology For Testing External DNS rules" | ||
description = "Will be used to load External DNS Rules" | ||
notes = "" | ||
datacenter = "LON" | ||
} | ||
|
||
resource "dcloud_ip_nat_rule" "test_topology_ip_nat_rule"{ | ||
topology_uid = dcloud_topology.test_topology.id | ||
target_ip_address = "192.168.1.1" | ||
target_name = "Sample Device" | ||
east_west = false | ||
} | ||
|
||
resource "dcloud_external_dns" "test_topology_external_dns"{ | ||
topology_uid = dcloud_topology.test_topology.id | ||
nat_rule_id = dcloud_ip_nat_rule.test_topology_ip_nat_rule.id | ||
hostname = "localhost" | ||
srv_records{ | ||
service = "_test" | ||
protocol = "TCP" | ||
port = 8081 | ||
} | ||
} | ||
|
||
data "dcloud_external_dns" "external_dns_test"{ | ||
depends_on = [dcloud_external_dns.test_topology_external_dns] | ||
topology_uid = dcloud_topology.test_topology.id | ||
} | ||
|
||
output "external_dns" { | ||
value = data.dcloud_external_dns.external_dns_test | ||
} |
27 changes: 27 additions & 0 deletions
27
examples/data-sources/inventory_dns_asset_data_source/data-source.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,27 @@ | ||
terraform { | ||
required_providers { | ||
dcloud = { | ||
version = "0.1" | ||
source = "cisco-open/dcloud" | ||
} | ||
} | ||
} | ||
|
||
provider "dcloud" { | ||
tb_url = "https://tbv3-production.ciscodcloud.com/api" | ||
} | ||
|
||
resource "dcloud_topology" "test_topology" { | ||
name = "Test Topology For Testing External DNS Assets" | ||
description = "Will be used to load External DNS assets" | ||
notes = "" | ||
datacenter = "LON" | ||
} | ||
|
||
data "dcloud_inventory_dns_assets" "test_dns_assets" { | ||
topology_uid = dcloud_topology.test_topology.id | ||
} | ||
|
||
output "dns_assets" { | ||
value = data.dcloud_inventory_dns_assets.test_dns_assets | ||
} |
19 changes: 19 additions & 0 deletions
19
examples/data-sources/inventory_srv_protocol_data_source/data-source.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,19 @@ | ||
terraform { | ||
required_providers { | ||
dcloud = { | ||
version = "0.1" | ||
source = "cisco-open/dcloud" | ||
} | ||
} | ||
} | ||
|
||
provider "dcloud" { | ||
tb_url = "https://tbv3-production.ciscodcloud.com/api" | ||
} | ||
|
||
data "dcloud_inventory_srv_protocols" "test_srv_protocols" { | ||
} | ||
|
||
output "srv_protocols" { | ||
value = data.dcloud_inventory_srv_protocols.test_srv_protocols | ||
} |
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.