Allow management of StackScripts on an account using a syntax like:
resource "linode_stackscript" "mounterscript" {
// Linode doesn't have a unique string identifier for Stackscripts,
// so I'm thinking we fake it in TF using username+stackscript+title
// matching their canonical URL on the website (without the numeric ID).
title = "My Mounter Script" // canonicalized by TF as something like username/my-mounter-script
script = [ "#!/bin/bash", "grep ... || (echo ... >> /etc/fstab && mount ... )" ]
public = false
}
resource "linode_instance" "boots_to_mounterscript" {
...
disks = [ {
image: "linode/ubuntu18.04",
stackscript: "${linode_stackscript.mounterscript.id}",
... Linode disk API call requires root pw, ssh key, size, etc.
.... This will also need a way to provide StackScript params.
} ]
}
Allow management of StackScripts on an account using a syntax like: