Replies: 1 comment
-
I tried to create a separate resource: Resource(
self,
"resource",
depends_on=[droplet],
connection={
"host": droplet.ipv4_address,
"port": 22,
"private_key": os.environ.get("DIGITALOCEAN_PRIVATE_KEY_PATH"),
"user": "root",
"type": "ssh",
"agent": False,
"timeout": "15s",
},
provisioners=[
{
"type": "file",
"source": str(PATH_PROVISION_DROPLET),
"destination": path_provision_droplet,
},
{
"type": "remote-exec",
"script": path_provision_droplet,
},
],
) and the provision fails with a SSH error:
which is kind of expected given that the "null_resource": {
"resource": {
"//": {
"metadata": {
"path": "stack/resource",
"uniqueId": "resource"
}
},
"connection": {
"host": "${digitalocean_droplet.droplet.ipv4_address}",
"port": 22,
"timeout": "15s",
"type": "ssh",
"user": "root"
},
"depends_on": [
"digitalocean_droplet.droplet"
],
"provisioner": [
{
"file": {
"destination": "/var/tmp/bootstrap-droplet.sh",
"source": ".../bootstrap-droplet.sh"
}
},
{
"remote-exec": {
"script": "/var/tmp/bootstrap-droplet.sh"
}
}
]
}
} Is this expected? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm trying to understand how can I pass the IP address of the Droplet when provisioning it with Python:
Cheers,
Thomas
Beta Was this translation helpful? Give feedback.
All reactions