Variable
Example Usage
Example creating a RuntimeConfig variable.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.runtimeconfig.Config;
import com.pulumi.gcp.runtimeconfig.ConfigArgs;
import com.pulumi.gcp.runtimeconfig.Variable;
import com.pulumi.gcp.runtimeconfig.VariableArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var my_runtime_config = new Config("my-runtime-config", ConfigArgs.builder()
.description("Runtime configuration values for my service")
.build());
var environment = new Variable("environment", VariableArgs.builder()
.parent(my_runtime_config.name())
.text("example.com")
.build());
}
}
Content copied to clipboard
Import
Runtime Config Variables can be imported using the name
or full variable name, e.g.
$ pulumi import gcp:runtimeconfig/variable:Variable myvariable myconfig/myvariable
Content copied to clipboard
$ pulumi import gcp:runtimeconfig/variable:Variable myvariable projects/my-gcp-project/configs/myconfig/variables/myvariable
Content copied to clipboard
When importing using only the name, the provider project must be set.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
or value
- (Required) The content to associate with the variable. Exactly one of text
or variable
must be specified. If text
is specified, it must be a valid UTF-8 string and less than 4096 bytes in length. If value
is specified, it must be base64 encoded and less than 4096 bytes in length.
Link copied to clipboard
(Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z".