Add variable to specify the bastion host#395
Add variable to specify the bastion host#395etiennedub wants to merge 2 commits intoComputeCanada:mainfrom
Conversation
|
The scope of the bastion_host does not have to be limited.
|
There was a problem hiding this comment.
Changes in this file appear unnecessary.
There was a problem hiding this comment.
Changes in this file appear unnecessary.
| variable "puppetfile" {} | ||
|
|
||
| variable "bastion_remote" { | ||
| default = {} |
There was a problem hiding this comment.
No default value if we move th variable bastion_remote from incus/incus.tf to common/variables.tf.
| node = { type = "container", cpus = 2, ram = 3000, gpus = 0, tags = ["node"], count = 1 } | ||
| } | ||
|
|
||
| firewall_rules = { |
| http = { "from_port" = 80, "to_port" = 80, tag = "proxy", "cidr" = "0.0.0.0/0" }, | ||
| https = { "from_port" = 443, "to_port" = 443, tag = "proxy", "cidr" = "0.0.0.0/0" }, | ||
| } | ||
| bastion_tags = ["login"] |
| # } | ||
|
|
||
| # Use the local ip as bastion (when deploying Terraform directly from the Incus host) | ||
| bastion_remote = { |
There was a problem hiding this comment.
SSH-ing to self first before connecting to the puppetserver appears to be useless, but I could be wrong.
| # data "http" "agent_ip" { | ||
| # url = "http://ipv4.icanhazip.com" | ||
| # } | ||
| data "http" "agent_ip" { |
There was a problem hiding this comment.
Move this to common/variables.tf
There was a problem hiding this comment.
Replicate this in aws/infrastructure.tf, azure/infrastructure.tf, gcp/infrastructure.tf, openstack/infrastructure.tf
Add a variable to specify the bastion host with Incus.
This is useful when deploying remotely and use the Incus and Terraform are not running on the same host. You can use the Incus host as bastion for the provisioning.