1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. GcpConnector
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.GcpConnector

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating a Gcp connector.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        // Credentials inherit_from_delegate
        var test = new Harness.Platform.GcpConnector("test", new()
        {
            Description = "test",
            Identifier = "identifier",
            InheritFromDelegates = new[]
            {
                new Harness.Platform.Inputs.GcpConnectorInheritFromDelegateArgs
                {
                    DelegateSelectors = new[]
                    {
                        "harness-delegate",
                    },
                },
            },
            Tags = new[]
            {
                "foo:bar",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewGcpConnector(ctx, "test", &platform.GcpConnectorArgs{
    			Description: pulumi.String("test"),
    			Identifier:  pulumi.String("identifier"),
    			InheritFromDelegates: platform.GcpConnectorInheritFromDelegateArray{
    				&platform.GcpConnectorInheritFromDelegateArgs{
    					DelegateSelectors: pulumi.StringArray{
    						pulumi.String("harness-delegate"),
    					},
    				},
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    			},
    		})
    		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.harness.platform.GcpConnector;
    import com.pulumi.harness.platform.GcpConnectorArgs;
    import com.pulumi.harness.platform.inputs.GcpConnectorInheritFromDelegateArgs;
    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 test = new GcpConnector("test", GcpConnectorArgs.builder()        
                .description("test")
                .identifier("identifier")
                .inheritFromDelegates(GcpConnectorInheritFromDelegateArgs.builder()
                    .delegateSelectors("harness-delegate")
                    .build())
                .tags("foo:bar")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    # Credentials inherit_from_delegate
    test = harness.platform.GcpConnector("test",
        description="test",
        identifier="identifier",
        inherit_from_delegates=[harness.platform.GcpConnectorInheritFromDelegateArgs(
            delegate_selectors=["harness-delegate"],
        )],
        tags=["foo:bar"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    // Credentials inherit_from_delegate
    const test = new harness.platform.GcpConnector("test", {
        description: "test",
        identifier: "identifier",
        inheritFromDelegates: [{
            delegateSelectors: ["harness-delegate"],
        }],
        tags: ["foo:bar"],
    });
    
    resources:
      # Credentials inherit_from_delegate
      test:
        type: harness:platform:GcpConnector
        properties:
          description: test
          identifier: identifier
          inheritFromDelegates:
            - delegateSelectors:
                - harness-delegate
          tags:
            - foo:bar
    

    Create GcpConnector Resource

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

    Constructor syntax

    new GcpConnector(name: string, args: GcpConnectorArgs, opts?: CustomResourceOptions);
    @overload
    def GcpConnector(resource_name: str,
                     args: GcpConnectorArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def GcpConnector(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     identifier: Optional[str] = None,
                     description: Optional[str] = None,
                     inherit_from_delegates: Optional[Sequence[GcpConnectorInheritFromDelegateArgs]] = None,
                     manual: Optional[GcpConnectorManualArgs] = None,
                     name: Optional[str] = None,
                     org_id: Optional[str] = None,
                     project_id: Optional[str] = None,
                     tags: Optional[Sequence[str]] = None)
    func NewGcpConnector(ctx *Context, name string, args GcpConnectorArgs, opts ...ResourceOption) (*GcpConnector, error)
    public GcpConnector(string name, GcpConnectorArgs args, CustomResourceOptions? opts = null)
    public GcpConnector(String name, GcpConnectorArgs args)
    public GcpConnector(String name, GcpConnectorArgs args, CustomResourceOptions options)
    
    type: harness:platform:GcpConnector
    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 GcpConnectorArgs
    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 GcpConnectorArgs
    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 GcpConnectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GcpConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GcpConnectorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var gcpConnectorResource = new Harness.Platform.GcpConnector("gcpConnectorResource", new()
    {
        Identifier = "string",
        Description = "string",
        InheritFromDelegates = new[]
        {
            new Harness.Platform.Inputs.GcpConnectorInheritFromDelegateArgs
            {
                DelegateSelectors = new[]
                {
                    "string",
                },
            },
        },
        Manual = new Harness.Platform.Inputs.GcpConnectorManualArgs
        {
            DelegateSelectors = new[]
            {
                "string",
            },
            SecretKeyRef = "string",
        },
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewGcpConnector(ctx, "gcpConnectorResource", &platform.GcpConnectorArgs{
    	Identifier:  pulumi.String("string"),
    	Description: pulumi.String("string"),
    	InheritFromDelegates: platform.GcpConnectorInheritFromDelegateArray{
    		&platform.GcpConnectorInheritFromDelegateArgs{
    			DelegateSelectors: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Manual: &platform.GcpConnectorManualArgs{
    		DelegateSelectors: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SecretKeyRef: pulumi.String("string"),
    	},
    	Name:      pulumi.String("string"),
    	OrgId:     pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var gcpConnectorResource = new GcpConnector("gcpConnectorResource", GcpConnectorArgs.builder()        
        .identifier("string")
        .description("string")
        .inheritFromDelegates(GcpConnectorInheritFromDelegateArgs.builder()
            .delegateSelectors("string")
            .build())
        .manual(GcpConnectorManualArgs.builder()
            .delegateSelectors("string")
            .secretKeyRef("string")
            .build())
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .build());
    
    gcp_connector_resource = harness.platform.GcpConnector("gcpConnectorResource",
        identifier="string",
        description="string",
        inherit_from_delegates=[harness.platform.GcpConnectorInheritFromDelegateArgs(
            delegate_selectors=["string"],
        )],
        manual=harness.platform.GcpConnectorManualArgs(
            delegate_selectors=["string"],
            secret_key_ref="string",
        ),
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"])
    
    const gcpConnectorResource = new harness.platform.GcpConnector("gcpConnectorResource", {
        identifier: "string",
        description: "string",
        inheritFromDelegates: [{
            delegateSelectors: ["string"],
        }],
        manual: {
            delegateSelectors: ["string"],
            secretKeyRef: "string",
        },
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
    });
    
    type: harness:platform:GcpConnector
    properties:
        description: string
        identifier: string
        inheritFromDelegates:
            - delegateSelectors:
                - string
        manual:
            delegateSelectors:
                - string
            secretKeyRef: string
        name: string
        orgId: string
        projectId: string
        tags:
            - string
    

    GcpConnector 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 GcpConnector resource accepts the following input properties:

    Identifier string
    Unique identifier of the resource.
    Description string
    Description of the resource.
    InheritFromDelegates List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpConnectorInheritFromDelegate>
    Inherit configuration from delegate.
    Manual Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpConnectorManual
    Manual credential configuration.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    Identifier string
    Unique identifier of the resource.
    Description string
    Description of the resource.
    InheritFromDelegates []GcpConnectorInheritFromDelegateArgs
    Inherit configuration from delegate.
    Manual GcpConnectorManualArgs
    Manual credential configuration.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    description String
    Description of the resource.
    inheritFromDelegates List<GcpConnectorInheritFromDelegate>
    Inherit configuration from delegate.
    manual GcpConnectorManual
    Manual credential configuration.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    identifier string
    Unique identifier of the resource.
    description string
    Description of the resource.
    inheritFromDelegates GcpConnectorInheritFromDelegate[]
    Inherit configuration from delegate.
    manual GcpConnectorManual
    Manual credential configuration.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    tags string[]
    Tags to associate with the resource.
    identifier str
    Unique identifier of the resource.
    description str
    Description of the resource.
    inherit_from_delegates Sequence[GcpConnectorInheritFromDelegateArgs]
    Inherit configuration from delegate.
    manual GcpConnectorManualArgs
    Manual credential configuration.
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    tags Sequence[str]
    Tags to associate with the resource.
    identifier String
    Unique identifier of the resource.
    description String
    Description of the resource.
    inheritFromDelegates List<Property Map>
    Inherit configuration from delegate.
    manual Property Map
    Manual credential configuration.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GcpConnector 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 GcpConnector Resource

    Get an existing GcpConnector 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?: GcpConnectorState, opts?: CustomResourceOptions): GcpConnector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            identifier: Optional[str] = None,
            inherit_from_delegates: Optional[Sequence[GcpConnectorInheritFromDelegateArgs]] = None,
            manual: Optional[GcpConnectorManualArgs] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> GcpConnector
    func GetGcpConnector(ctx *Context, name string, id IDInput, state *GcpConnectorState, opts ...ResourceOption) (*GcpConnector, error)
    public static GcpConnector Get(string name, Input<string> id, GcpConnectorState? state, CustomResourceOptions? opts = null)
    public static GcpConnector get(String name, Output<String> id, GcpConnectorState 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
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    InheritFromDelegates List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpConnectorInheritFromDelegate>
    Inherit configuration from delegate.
    Manual Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpConnectorManual
    Manual credential configuration.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags List<string>
    Tags to associate with the resource.
    Description string
    Description of the resource.
    Identifier string
    Unique identifier of the resource.
    InheritFromDelegates []GcpConnectorInheritFromDelegateArgs
    Inherit configuration from delegate.
    Manual GcpConnectorManualArgs
    Manual credential configuration.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Tags []string
    Tags to associate with the resource.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    inheritFromDelegates List<GcpConnectorInheritFromDelegate>
    Inherit configuration from delegate.
    manual GcpConnectorManual
    Manual credential configuration.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.
    description string
    Description of the resource.
    identifier string
    Unique identifier of the resource.
    inheritFromDelegates GcpConnectorInheritFromDelegate[]
    Inherit configuration from delegate.
    manual GcpConnectorManual
    Manual credential configuration.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    tags string[]
    Tags to associate with the resource.
    description str
    Description of the resource.
    identifier str
    Unique identifier of the resource.
    inherit_from_delegates Sequence[GcpConnectorInheritFromDelegateArgs]
    Inherit configuration from delegate.
    manual GcpConnectorManualArgs
    Manual credential configuration.
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    tags Sequence[str]
    Tags to associate with the resource.
    description String
    Description of the resource.
    identifier String
    Unique identifier of the resource.
    inheritFromDelegates List<Property Map>
    Inherit configuration from delegate.
    manual Property Map
    Manual credential configuration.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    tags List<String>
    Tags to associate with the resource.

    Supporting Types

    GcpConnectorInheritFromDelegate, GcpConnectorInheritFromDelegateArgs

    DelegateSelectors List<string>
    The delegates to inherit the credentials from.
    DelegateSelectors []string
    The delegates to inherit the credentials from.
    delegateSelectors List<String>
    The delegates to inherit the credentials from.
    delegateSelectors string[]
    The delegates to inherit the credentials from.
    delegate_selectors Sequence[str]
    The delegates to inherit the credentials from.
    delegateSelectors List<String>
    The delegates to inherit the credentials from.

    GcpConnectorManual, GcpConnectorManualArgs

    DelegateSelectors List<string>
    The delegates to connect with.
    SecretKeyRef string
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
    DelegateSelectors []string
    The delegates to connect with.
    SecretKeyRef string
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
    delegateSelectors List<String>
    The delegates to connect with.
    secretKeyRef String
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
    delegateSelectors string[]
    The delegates to connect with.
    secretKeyRef string
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
    delegate_selectors Sequence[str]
    The delegates to connect with.
    secret_key_ref str
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.
    delegateSelectors List<String>
    The delegates to connect with.
    secretKeyRef String
    Reference to the Harness secret containing the secret key. To reference a secret at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a secret at the account scope, prefix 'account` to the expression: account.{identifier}.

    Import

    Import account level gcp connector

     $ pulumi import harness:platform/gcpConnector:GcpConnector example <connector_id>
    

    Import org level gcp connector

     $ pulumi import harness:platform/gcpConnector:GcpConnector example <ord_id>/<connector_id>
    

    Import project level gcp connector

     $ pulumi import harness:platform/gcpConnector:GcpConnector example <org_id>/<project_id>/<connector_id>
    

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

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs