1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. runtimeconfig
  5. Config
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.runtimeconfig.Config

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Example Usage

    Example creating a RuntimeConfig resource.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const my_runtime_config = new gcp.runtimeconfig.Config("my-runtime-config", {
        name: "my-service-runtime-config",
        description: "Runtime configuration values for my service",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_runtime_config = gcp.runtimeconfig.Config("my-runtime-config",
        name="my-service-runtime-config",
        description="Runtime configuration values for my service")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/runtimeconfig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := runtimeconfig.NewConfig(ctx, "my-runtime-config", &runtimeconfig.ConfigArgs{
    			Name:        pulumi.String("my-service-runtime-config"),
    			Description: pulumi.String("Runtime configuration values for my service"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var my_runtime_config = new Gcp.RuntimeConfig.Config("my-runtime-config", new()
        {
            Name = "my-service-runtime-config",
            Description = "Runtime configuration values for my service",
        });
    
    });
    
    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 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()
                .name("my-service-runtime-config")
                .description("Runtime configuration values for my service")
                .build());
    
        }
    }
    
    resources:
      my-runtime-config:
        type: gcp:runtimeconfig:Config
        properties:
          name: my-service-runtime-config
          description: Runtime configuration values for my service
    

    Create Config Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Config(name: string, args?: ConfigArgs, opts?: CustomResourceOptions);
    @overload
    def Config(resource_name: str,
               args: Optional[ConfigArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Config(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               name: Optional[str] = None,
               project: Optional[str] = None)
    func NewConfig(ctx *Context, name string, args *ConfigArgs, opts ...ResourceOption) (*Config, error)
    public Config(string name, ConfigArgs? args = null, CustomResourceOptions? opts = null)
    public Config(String name, ConfigArgs args)
    public Config(String name, ConfigArgs args, CustomResourceOptions options)
    
    type: gcp:runtimeconfig:Config
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConfigArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var gcpConfigResource = new Gcp.RuntimeConfig.Config("gcpConfigResource", new()
    {
        Description = "string",
        Name = "string",
        Project = "string",
    });
    
    example, err := runtimeconfig.NewConfig(ctx, "gcpConfigResource", &runtimeconfig.ConfigArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    })
    
    var gcpConfigResource = new Config("gcpConfigResource", ConfigArgs.builder()
        .description("string")
        .name("string")
        .project("string")
        .build());
    
    gcp_config_resource = gcp.runtimeconfig.Config("gcpConfigResource",
        description="string",
        name="string",
        project="string")
    
    const gcpConfigResource = new gcp.runtimeconfig.Config("gcpConfigResource", {
        description: "string",
        name: "string",
        project: "string",
    });
    
    type: gcp:runtimeconfig:Config
    properties:
        description: string
        name: string
        project: string
    

    Config Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Config resource accepts the following input properties:

    Description string
    The description to associate with the runtime config.
    Name string
    The name of the runtime config.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Description string
    The description to associate with the runtime config.
    Name string
    The name of the runtime config.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description String
    The description to associate with the runtime config.
    name String
    The name of the runtime config.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description string
    The description to associate with the runtime config.
    name string
    The name of the runtime config.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description str
    The description to associate with the runtime config.
    name str
    The name of the runtime config.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description String
    The description to associate with the runtime config.
    name String
    The name of the runtime config.


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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Config resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Config Resource

    Get an existing Config resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ConfigState, opts?: CustomResourceOptions): Config
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None) -> Config
    func GetConfig(ctx *Context, name string, id IDInput, state *ConfigState, opts ...ResourceOption) (*Config, error)
    public static Config Get(string name, Input<string> id, ConfigState? state, CustomResourceOptions? opts = null)
    public static Config get(String name, Output<String> id, ConfigState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Description string
    The description to associate with the runtime config.
    Name string
    The name of the runtime config.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Description string
    The description to associate with the runtime config.
    Name string
    The name of the runtime config.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description String
    The description to associate with the runtime config.
    name String
    The name of the runtime config.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description string
    The description to associate with the runtime config.
    name string
    The name of the runtime config.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description str
    The description to associate with the runtime config.
    name str
    The name of the runtime config.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    description String
    The description to associate with the runtime config.
    name String
    The name of the runtime config.


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

    Import

    Runtime Configs can be imported using the name or full config name, e.g.

    • projects/{{project_id}}/configs/{{name}}

    • {{name}}

    When using the pulumi import command, Runtime Configs can be imported using one of the formats above. For example:

    $ pulumi import gcp:runtimeconfig/config:Config default projects/{{project_id}}/configs/{{name}}
    
    $ pulumi import gcp:runtimeconfig/config:Config default {{name}}
    

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

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi