Skip to content

Commit

Permalink
add my public ssh key
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Oct 17, 2024
1 parent 1ffbdc1 commit cb28f04
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion infra-do/droplet-executor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resource "digitalocean_droplet" "executor" {
size = "s-1vcpu-2gb" # doctl compute size list
image = "ubuntu-24-04-x64"

ssh_keys = [digitalocean_ssh_key.default.fingerprint]

volume_ids = []

vpc_uuid = digitalocean_vpc.default.id
Expand Down Expand Up @@ -36,7 +38,7 @@ resource "digitalocean_droplet" "executor" {
- echo "DB_NAME=${digitalocean_database_cluster.postgres.name}" >> .executor.env
# Influx config
- echo "INFLUXDB_URL=TODO" >> .executor.env
- echo "INFLUXDB_URL=http://${digitalocean_droplet.influxdb.ipv4_address_private}:8086" >> .executor.env
- echo "INFLUXDB_ORG=${var.influxdb_org}" >> .executor.env
- echo "INFLUXDB_BUCKET=${var.influxdb_bucket}" >> .executor.env
- echo "INFLUXDB_TOKEN=${var.influxdb_token}" >> .executor.env
Expand Down
2 changes: 2 additions & 0 deletions infra-do/droplet-influx.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resource "digitalocean_droplet" "influxdb" {
size = "s-1vcpu-512mb-10gb" # doctl compute size list
image = "ubuntu-24-04-x64"

ssh_keys = [digitalocean_ssh_key.default.fingerprint]

volume_ids = [digitalocean_volume.influxdb_volume.id]

vpc_uuid = digitalocean_vpc.default.id
Expand Down
6 changes: 6 additions & 0 deletions infra-do/droplet-vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ resource "digitalocean_vpc" "default" {
region = "sfo3"
ip_range = "10.0.0.0/16"
}

resource "digitalocean_ssh_key" "default" {
name = "main key"
public_key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxpBCyn17WmbL4hzzMuInkihbz2801p1Y/ay+rzyICo"

}
1 change: 1 addition & 0 deletions infra-do/id_ed25519.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

7 changes: 0 additions & 7 deletions infra-do/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ output "live_domain" {
output "volume_id" {
value = digitalocean_volume.influxdb_volume.id
}

output "influx_droplet_ip" {
value = digitalocean_droplet.influxdb.private_networking
}
output "droplet_1_private_ip" {
value = digitalocean_droplet.executor.private_networking
}

0 comments on commit cb28f04

Please sign in to comment.