/
getConfig.go
63 lines (58 loc) · 1.87 KB
/
getConfig.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package runtimeconfig
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// To get more information about RuntimeConfigs, see:
//
// * [API documentation](https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/v1beta1/projects.configs)
// * How-to Guides
// * [Runtime Configurator Fundamentals](https://cloud.google.com/deployment-manager/runtime-configurator/)
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-gcp/sdk/v4/go/gcp/runtimeconfig"
// "github.com/pulumi/pulumi/sdk/v2/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
// })
// }
// ```
func LookupConfig(ctx *pulumi.Context, args *LookupConfigArgs, opts ...pulumi.InvokeOption) (*LookupConfigResult, error) {
var rv LookupConfigResult
err := ctx.Invoke("gcp:runtimeconfig/getConfig:getConfig", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getConfig.
type LookupConfigArgs struct {
// The name of the Runtime Configurator configuration.
Name string `pulumi:"name"`
// The project in which the resource belongs. If it
// is not provided, the provider project is used.
Project *string `pulumi:"project"`
}
// A collection of values returned by getConfig.
type LookupConfigResult struct {
Description string `pulumi:"description"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
Project *string `pulumi:"project"`
}