Hi,
I'm currently using Terragrunt in combination with Terraform to deploy
digitalocean droplets.
What I'm planning is to use local exec in order to run Ansbile on the
deployed host(s) afterwards. So I need to access the list of hosts somehow
but I always run into an error
saying that the variable xyz is not (yet) declared.
Here's an Example I've tried:
resource "digitalocean_droplet" "instance" {
image = "${var.host_image}"
name = "${var.host_name}"
region = "fra1"
size = "${var.host_sizing}"
backups = "${var.useBackups}"
tags = "${split(",", replace(var.host_tags, " ", ""))}"
ssh_keys = ["${digitalocean_ssh_key.default.fingerprint}"]
provisioner "remote-exec" {
inline = ["echo"]
connection {
host = "${data.digitalocean_droplet.instance.ipv4_address}"
type = "ssh"
user = "root"
private_key = "${file(var.public_key)}"
}
}
}
Any chance to accomplish my goal?
--
This mailing list is governed under the HashiCorp Community Guidelines -
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of
those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/65cec1b4-203f-4f0d-bb96-5c9e8e5e137e%40googlegroups.com.