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());
}
}

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
$ pulumi import gcp:runtimeconfig/variable:Variable myvariable projects/my-gcp-project/configs/myconfig/variables/myvariable

When importing using only the name, the provider project must be set.

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the variable to manage. Note that variable names can be hierarchical using slashes (e.g. "prod-variables/hostname").

Link copied to clipboard
val parent: Output<String>

The name of the RuntimeConfig resource containing this variable.

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val text: Output<String>?

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
val updateTime: Output<String>

(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".

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val value: Output<String>?