From 9fa642cee76fa689c3a860d876025efe429936b8 Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Wed, 1 Jul 2015 21:24:34 -0400 Subject: [PATCH] Add ForceNew metadata_startup_script field --- r/compute_instance.html.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/r/compute_instance.html.markdown b/r/compute_instance.html.markdown index ae231a8c..bf8add9e 100644 --- a/r/compute_instance.html.markdown +++ b/r/compute_instance.html.markdown @@ -44,6 +44,8 @@ resource "google_compute_instance" "default" { foo = "bar" } + metadata_startup_script = "echo hi > /test.txt" + service_account { scopes = ["userinfo-email", "compute-ro", "storage-ro"] } @@ -73,6 +75,12 @@ The following arguments are supported: * `metadata` - (Optional) Metadata key/value pairs to make available from within the instance. +* `metadata_startup_script` - (Optional) An alternative to using the + startup-script metadata key, except this one forces the instance to be + recreated (thus re-running the script) if it is changed. This replaces the + startup-script metadata key on the created instance and thus the two mechanisms + are not allowed to be used simultaneously. + * `network_interface` - (Required) Networks to attach to the instance. This can be specified multiple times for multiple networks. Structure is documented below.