Skip to content

Commit

Permalink
Add file contents to README.md for examples (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
thogarty authored Dec 6, 2023
1 parent 34e2b2b commit 1383e31
Show file tree
Hide file tree
Showing 20 changed files with 2,462 additions and 40 deletions.
135 changes: 133 additions & 2 deletions examples/cloud-router-2-aws-connection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,139 @@ terraform init
terraform apply
```

To use this example of the module in your own terraform configuration include the following
(You must also have variables/values defined and have the contents of versions.tf somewhere in your config):
To use this example of the module in your own terraform configuration include the following:

*NOTE: terraform.tfvars must be a separate file, but all other content can be placed together in main.tf if you prefer*

terraform.tfvars (Replace these values with your own):
```hcl
equinix_client_id = "<MyEquinixClientId>"
equinix_client_secret = "<MyEquinixSecret>"
notifications_type = "ALL"
notifications_emails = ["[email protected]","[email protected]"]
purchase_order_number = "1-323292"
aside_fcr_uuid = "<Fabric Cloud Router UUID>"
connection_name = "fcr_2_aws"
connection_type = "IP_VC"
bandwidth = 50
aside_ap_type = "CLOUD_ROUTER"
zside_ap_type = "SP"
zside_ap_authentication_key = "<AWS Account Id>"
zside_ap_profile_type = "L2_PROFILE"
zside_location = "SV"
zside_seller_region = "us-west-1"
zside_fabric_sp_name = "AWS Direct Connect"
additional_info = [
{ key = "accessKey", value = "<aws_access_key>" },
{ key = "secretKey", value = "<aws_secret_key>" }
]
```
versions.tf:
```hcl
terraform {
required_version = ">= 1.5.4"
required_providers {
equinix = {
source = "equinix/equinix"
version = ">= 1.20.0"
}
}
}
```
variables.tf:
```hcl
variable "equinix_client_id" {
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform"
type = string
}
variable "equinix_client_secret" {
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform"
type = string
}
variable "connection_name" {
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores"
type = string
}
variable "connection_type" {
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC"
default = ""
type = string
}
variable "notifications_type" {
description = "Notification Type - ALL is the only type currently supported"
type = string
default = "ALL"
}
variable "notifications_emails" {
description = "Array of contact emails"
type = list(string)
}
variable "bandwidth" {
description = "Connection bandwidth in Mbps"
type = number
}
variable "purchase_order_number" {
description = "Purchase order number"
type = string
default = ""
}
variable "aside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
}
variable "aside_fcr_uuid" {
description = "Equinix-assigned Fabric Cloud Router identifier"
type = string
}
variable "zside_ap_authentication_key" {
description = "Authentication key for provider based connections"
type = string
default = ""
}
variable "zside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
default = "SP"
}
variable "zside_ap_profile_type" {
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE"
type = string
default = "L2_PROFILE"
}
variable "zside_location" {
description = "Access point metro code"
type = string
default = "SP"
}
variable "zside_fabric_sp_name" {
description = "Equinix Service Profile Name"
type = string
default = ""
}
variable "zside_seller_region" {
description = "Access point seller region"
type = string
default = ""
}
variable "additional_info" {
description = "Additional parameters required for some service profiles. It should be a list of maps containing 'key' and 'value e.g. `[{ key='asn' value = '65000'}, { key='ip' value = '192.168.0.1'}]`"
type = list(object({ key = string, value = string }))
default = []
}
```
outputs.tf:
```hcl
output "module_output" {
value = module.cloud_router_aws_connection.primary_connection_id
}
```
main.tf:

```hcl
Expand Down
126 changes: 124 additions & 2 deletions examples/cloud-router-2-azure-connection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,130 @@ terraform init
terraform apply
```

To use this example of the module in your own terraform configuration include the following
(You must also have variables/values defined and have the contents of versions.tf somewhere in your config):
To use this example of the module in your own terraform configuration include the following:

*NOTE: terraform.tfvars must be a separate file, but all other content can be placed together in main.tf if you prefer*

terraform.tfvars (Replace these values with your own):
```hcl
equinix_client_id = "<MyEquinixClientId>"
equinix_client_secret = "<MyEquinixSecret>"
connection_name = "fcr_2_azure"
connection_type = "IP_VC"
notifications_type = "ALL"
notifications_emails = ["[email protected]","[email protected]"]
purchase_order_number = "1-323292"
bandwidth = 50
aside_ap_type = "CLOUD_ROUTER"
aside_fcr_uuid = "<Primary Fabric Cloud router UUID>"
zside_ap_type = "SP"
zside_ap_authentication_key = "<Azure Service Key>"
zside_ap_profile_type = "L2_PROFILE"
zside_location = "SV"
zside_peering_type = "PRIVATE"
zside_fabric_sp_name = "Azure ExpressRoute"
```
versions.tf:
```hcl
terraform {
required_version = ">= 1.5.4"
required_providers {
equinix = {
source = "equinix/equinix"
version = ">= 1.20.0"
}
}
}
```
variables.tf:
```hcl
variable "equinix_client_id" {
description = "Equinix client ID (consumer key), obtained after registering app in the developer platform"
type = string
}
variable "equinix_client_secret" {
description = "Equinix client secret ID (consumer secret), obtained after registering app in the developer platform"
type = string
}
variable "connection_name" {
description = "Connection name. An alpha-numeric 24 characters string which can include only hyphens and underscores"
type = string
}
variable "connection_type" {
description = "Defines the connection type like VG_VC, EVPL_VC, EPL_VC, EC_VC, IP_VC, ACCESS_EPL_VC"
type = string
default = ""
}
variable "notifications_type" {
description = "Notification Type - ALL is the only type currently supported"
type = string
default = "ALL"
}
variable "notifications_emails" {
description = "Array of contact emails"
type = list(string)
}
variable "bandwidth" {
description = "Connection bandwidth in Mbps"
type = number
}
variable "purchase_order_number" {
description = "Purchase order number"
type = string
default = ""
}
variable "aside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
}
variable "aside_fcr_uuid" {
description = "Equinix-assigned Fabric Cloud Router identifier"
type = string
}
variable "zside_ap_authentication_key" {
description = "Authentication key for provider based connections"
type = string
default = ""
}
variable "zside_ap_type" {
description = "Access point type - COLO, VD, VG, SP, IGW, SUBNET, GW"
type = string
default = "SP"
}
variable "zside_ap_profile_type" {
description = "Service profile type - L2_PROFILE, L3_PROFILE, ECIA_PROFILE, ECMC_PROFILE"
type = string
default = "L2_PROFILE"
}
variable "zside_location" {
description = "Access point metro code"
type = string
default = "SP"
}
variable "zside_peering_type" {
description = "Access point peering type - PRIVATE, MICROSOFT, PUBLIC, MANUAL"
default = "PRIVATE"
}
variable "zside_fabric_sp_name" {
description = "Equinix Service Profile Name"
type = string
default = ""
}
```
outputs.tf:
```hcl
output "module_output" {
value = module.cloud_router_azure_connection.primary_connection_id
}
```
main.tf:

```hcl
Expand Down
Loading

0 comments on commit 1383e31

Please sign in to comment.