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

gcp.runtimeconfig.getConfig

Explore with Pulumi AI

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const run-service = gcp.runtimeconfig.getConfig({
        name: "my-service",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    run_service = gcp.runtimeconfig.get_config(name="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.LookupConfig(ctx, &runtimeconfig.LookupConfigArgs{
    			Name: "my-service",
    		}, nil)
    		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 run_service = Gcp.RuntimeConfig.GetConfig.Invoke(new()
        {
            Name = "my-service",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.runtimeconfig.RuntimeconfigFunctions;
    import com.pulumi.gcp.runtimeconfig.inputs.GetConfigArgs;
    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) {
            final var run-service = RuntimeconfigFunctions.getConfig(GetConfigArgs.builder()
                .name("my-service")
                .build());
    
        }
    }
    
    variables:
      run-service:
        fn::invoke:
          Function: gcp:runtimeconfig:getConfig
          Arguments:
            name: my-service
    

    Using getConfig

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getConfig(args: GetConfigArgs, opts?: InvokeOptions): Promise<GetConfigResult>
    function getConfigOutput(args: GetConfigOutputArgs, opts?: InvokeOptions): Output<GetConfigResult>
    def get_config(name: Optional[str] = None,
                   project: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetConfigResult
    def get_config_output(name: Optional[pulumi.Input[str]] = None,
                   project: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetConfigResult]
    func LookupConfig(ctx *Context, args *LookupConfigArgs, opts ...InvokeOption) (*LookupConfigResult, error)
    func LookupConfigOutput(ctx *Context, args *LookupConfigOutputArgs, opts ...InvokeOption) LookupConfigResultOutput

    > Note: This function is named LookupConfig in the Go SDK.

    public static class GetConfig 
    {
        public static Task<GetConfigResult> InvokeAsync(GetConfigArgs args, InvokeOptions? opts = null)
        public static Output<GetConfigResult> Invoke(GetConfigInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConfigResult> getConfig(GetConfigArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gcp:runtimeconfig/getConfig:getConfig
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Runtime Configurator configuration.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    Name string
    The name of the Runtime Configurator configuration.


    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the Runtime Configurator configuration.


    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name string
    The name of the Runtime Configurator configuration.


    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name str
    The name of the Runtime Configurator configuration.


    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the Runtime Configurator configuration.


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

    getConfig Result

    The following output properties are available:

    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Project string
    Description string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Project string
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    project String
    description string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    project string
    description str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    project str
    description String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    project String

    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