* setup GCP terraform structure for connector dev infra * fxes * Created aws terraform bootstrap infrastructure * Corrected path for S3 state file * Creating ssh tunnel testing infrastructure * Creating a bastion host * Docs * Created bastion host with airbyte unprivileged account for tunneling * Added yum updates * Create a private subnet and a postgres database within it * Identifier for db * Create postgres and bastion within a module. * Set up postgres infrastructure * Don't need this terraform wrapper when we run with tfenv * Dropped incomplete WIP from GCP setup for this PR. * Touchups to how to use terraform * Updated to resolve merge conflict * More separated top level structure to avoid monorepo problems with terraform destroy. * Clarifying directory structure * Migrated directory structure for testing infrastructure Co-authored-by: Jenny Brown <jenny@airbyte.io>
30 lines
877 B
HCL
30 lines
877 B
HCL
# Set up a subnet with bastion and postgres so we can test inbound ssh tunnel behavior from connectors.
|
|
|
|
# ec2-user needs login creds
|
|
resource "aws_key_pair" "key" {
|
|
key_name = "dbtunnel-bastion-ec2-user-ssh-key"
|
|
public_key = file("${path.module}/user_ssh_public_keys/dbtunnel-bastion-ec2-user_rsa.pub")
|
|
}
|
|
|
|
# Sets up the bastion host, an unprivileged airbyte shell user, and postgres
|
|
module "ssh_tunnel_testing" {
|
|
source = "./module"
|
|
|
|
airbyte_user_authorized_keys_local_filepath = "user_ssh_public_keys/dbtunnel-bastion-airbyte_rsa.pub"
|
|
|
|
aws_vpc_id = "vpc-001ad881b80193126"
|
|
sudo_keypair_name = aws_key_pair.key.key_name
|
|
|
|
subnet_az1 = "us-east-2a"
|
|
subnet_cidr_block1 = "10.0.40.0/24"
|
|
|
|
subnet_az2 = "us-east-2b"
|
|
subnet_cidr_block2 = "10.0.41.0/24"
|
|
|
|
rds_instance_class = "db.t3.small"
|
|
|
|
// Outputs: bastion_ip_addr postgres_endpoint_fqdn_with_port
|
|
|
|
}
|
|
|