-
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 #1 from dfns/feat/tunnel-ssm
- Loading branch information
Showing
2,895 changed files
with
974,702 additions
and
26 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,47 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tunnel_ssm Data Source - tunnel" | ||
subcategory: "" | ||
description: |- | ||
Create a local AWS SSM tunnel to a remote host | ||
--- | ||
|
||
# tunnel_ssm (Data Source) | ||
|
||
Create a local AWS SSM tunnel to a remote host | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# The following example shows how to create a tunnel for an AWS RDS database. | ||
data "tunnel_ssm" "rds" { | ||
target_host = "https://my-db.us-east-1.rds.amazonaws.com" | ||
target_port = 443 | ||
ssm_instance = "i-instanceid" | ||
ssm_region = "us-east-1" | ||
} | ||
provider "postgresql" { | ||
host = data.tunnel_ssm.rds.local_host | ||
port = data.tunnel_ssm.rds.local_port | ||
database = "my-database" | ||
username = "my-user" | ||
password = "my-password" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `ssm_instance` (String) Specify the exact Instance ID of the managed node to connect to for the session | ||
- `ssm_region` (String) AWS Region where the instance is located | ||
- `target_host` (String) The DNS name or IP address of the remote host | ||
- `target_port` (Number) The port number of the remote host | ||
|
||
### Read-Only | ||
|
||
- `local_host` (String) The DNS name or IP address of the local host | ||
- `local_port` (Number) The local port number to use for the tunnel |
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 |
---|---|---|
@@ -1,16 +1,47 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "tunnel Provider" | ||
subcategory: "" | ||
page_title: "Provider: Tunnel" | ||
description: |- | ||
The Tunnel provider is used to manage local network tunnels. | ||
--- | ||
|
||
# tunnel Provider | ||
# Tunnel Provider | ||
|
||
The Tunnel provider is used to manage local network tunnels. This enables users to | ||
securely access and manage remote servers (databases, web servers, etc.) in private | ||
networks without needing to open additional ports to the outside networks. | ||
|
||
The provider is compatible with HashiCorp Cloud Platform (HCP) | ||
|
||
## Available tunnel types | ||
|
||
- [AWS Systems Manager (SSM)](https://docs.aws.amazon.com/systems-manager/latest/userguide/) | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
tunnel = { | ||
source = "dfns/tunnel" | ||
version = ">= 1.0.0" | ||
} | ||
} | ||
} | ||
data "tunnel_ssm" "eks" { | ||
target_host = "https://eks-cluster.region.eks.amazonaws.com" | ||
target_port = 443 | ||
ssm_instance = "i-instanceid" | ||
ssm_region = "us-east-1" | ||
} | ||
provider "kubernetes" { | ||
host = "https://${data.tunnel_ssm.eks.local_host}:${data.tunnel_ssm.eks.local_port}" | ||
tls_server_name = "eks-cluster.region.eks.amazonaws.com" | ||
client_certificate = file("~/.kube/client-cert.pem") | ||
client_key = file("~/.kube/client-key.pem") | ||
cluster_ca_certificate = file("~/.kube/cluster-ca-cert.pem") | ||
} | ||
``` |
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,16 @@ | ||
# The following example shows how to create a tunnel for an AWS RDS database. | ||
|
||
data "tunnel_ssm" "rds" { | ||
target_host = "https://my-db.us-east-1.rds.amazonaws.com" | ||
target_port = 443 | ||
ssm_instance = "i-instanceid" | ||
ssm_region = "us-east-1" | ||
} | ||
|
||
provider "postgresql" { | ||
host = data.tunnel_ssm.rds.local_host | ||
port = data.tunnel_ssm.rds.local_port | ||
database = "my-database" | ||
username = "my-user" | ||
password = "my-password" | ||
} |
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 @@ | ||
terraform { | ||
required_providers { | ||
tunnel = { | ||
source = "dfns/tunnel" | ||
version = ">= 1.0.0" | ||
} | ||
} | ||
} | ||
|
||
data "tunnel_ssm" "eks" { | ||
target_host = "https://eks-cluster.region.eks.amazonaws.com" | ||
target_port = 443 | ||
ssm_instance = "i-instanceid" | ||
ssm_region = "us-east-1" | ||
} | ||
|
||
provider "kubernetes" { | ||
host = "https://${data.tunnel_ssm.eks.local_host}:${data.tunnel_ssm.eks.local_port}" | ||
|
||
tls_server_name = "eks-cluster.region.eks.amazonaws.com" | ||
|
||
client_certificate = file("~/.kube/client-cert.pem") | ||
client_key = file("~/.kube/client-key.pem") | ||
cluster_ca_certificate = file("~/.kube/cluster-ca-cert.pem") | ||
} |
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.