Scope
Scope represents a Scope in a Fleet. To get more information about Scope, see:
How-to Guides
Example Usage
Gkehub Scope Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const scope = new gcp.gkehub.Scope("scope", {
scopeId: "my-scope",
namespaceLabels: {
keyb: "valueb",
keya: "valuea",
keyc: "valuec",
},
labels: {
keyb: "valueb",
keya: "valuea",
keyc: "valuec",
},
});
import pulumi
import pulumi_gcp as gcp
scope = gcp.gkehub.Scope("scope",
scope_id="my-scope",
namespace_labels={
"keyb": "valueb",
"keya": "valuea",
"keyc": "valuec",
},
labels={
"keyb": "valueb",
"keya": "valuea",
"keyc": "valuec",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var scope = new Gcp.GkeHub.Scope("scope", new()
{
ScopeId = "my-scope",
NamespaceLabels =
{
{ "keyb", "valueb" },
{ "keya", "valuea" },
{ "keyc", "valuec" },
},
Labels =
{
{ "keyb", "valueb" },
{ "keya", "valuea" },
{ "keyc", "valuec" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/gkehub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gkehub.NewScope(ctx, "scope", &gkehub.ScopeArgs{
ScopeId: pulumi.String("my-scope"),
NamespaceLabels: pulumi.StringMap{
"keyb": pulumi.String("valueb"),
"keya": pulumi.String("valuea"),
"keyc": pulumi.String("valuec"),
},
Labels: pulumi.StringMap{
"keyb": pulumi.String("valueb"),
"keya": pulumi.String("valuea"),
"keyc": pulumi.String("valuec"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.gkehub.Scope;
import com.pulumi.gcp.gkehub.ScopeArgs;
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 scope = new Scope("scope", ScopeArgs.builder()
.scopeId("my-scope")
.namespaceLabels(Map.ofEntries(
Map.entry("keyb", "valueb"),
Map.entry("keya", "valuea"),
Map.entry("keyc", "valuec")
))
.labels(Map.ofEntries(
Map.entry("keyb", "valueb"),
Map.entry("keya", "valuea"),
Map.entry("keyc", "valuec")
))
.build());
}
}
resources:
scope:
type: gcp:gkehub:Scope
properties:
scopeId: my-scope
namespaceLabels:
keyb: valueb
keya: valuea
keyc: valuec
labels:
keyb: valueb
keya: valuea
keyc: valuec
Import
Scope can be imported using any of these accepted formats:
projects/{{project}}/locations/global/scopes/{{scope_id}}
{{project}}/{{scope_id}}
{{scope_id}}
When using thepulumi import
command, Scope can be imported using one of the formats above. For example:
$ pulumi import gcp:gkehub/scope:Scope default projects/{{project}}/locations/global/scopes/{{scope_id}}
$ pulumi import gcp:gkehub/scope:Scope default {{project}}/{{scope_id}}
$ pulumi import gcp:gkehub/scope:Scope default {{scope_id}}
Properties
Time the Scope was created in UTC.
Time the Scope was deleted in UTC.
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Scope-level cluster namespace labels. For the member clusters bound to the Scope, these labels are applied to each namespace under the Scope. Scope-level labels take precedence over Namespace-level labels (namespace_labels
in the Fleet Namespace resource) if they share a key. Keys and values must be Kubernetes-conformant.
The combination of labels configured directly on the resource and default labels configured on the provider.
State of the scope resource. Structure is documented below.
Time the Scope was updated in UTC.