@cryptotaxi247 / infra-1 / commits / 52b9307c

bastion: also deploy with terraform

zimbatm committed Sep 14, 2021 at 20:42 UTC 52b9307c710cb0ba806373e65cb839e6a9e44542
1 file changed +16
bastion/bastion.tf
+16
@@ -139,3 +139,19 @@ resource "aws_eip" "bastion" {
139 instance = aws_instance.bastion.id
140 vpc = true
141 }
142 +
143 +module "bastion_deploy" {
144 + source = "github.com/numtide/terraform-deploy-nixos-flakes"
145 +
146 + target_host = aws_eip.bastion.public_ip
147 + target_user = "deploy"
148 +
149 + flake = path.module
150 + flake_host = "bastion"
151 +
152 + ssh_agent = true
153 +
154 + triggers = {
155 + machine_id = aws_instance.bastion.id
156 + }
157 +}