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

harness.cloudprovider.Gcp

Explore with Pulumi AI

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

    Resource for creating a GCP cloud provider. This resource uses the config-as-code API’s. When updating the name or path of this resource you should typically also set the create_before_destroy = true lifecycle setting.

    Create Gcp Resource

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

    Constructor syntax

    new Gcp(name: string, args?: GcpArgs, opts?: CustomResourceOptions);
    @overload
    def Gcp(resource_name: str,
            args: Optional[GcpArgs] = None,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Gcp(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            delegate_selectors: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            secret_file_id: Optional[str] = None,
            skip_validation: Optional[bool] = None,
            usage_scopes: Optional[Sequence[GcpUsageScopeArgs]] = None)
    func NewGcp(ctx *Context, name string, args *GcpArgs, opts ...ResourceOption) (*Gcp, error)
    public Gcp(string name, GcpArgs? args = null, CustomResourceOptions? opts = null)
    public Gcp(String name, GcpArgs args)
    public Gcp(String name, GcpArgs args, CustomResourceOptions options)
    
    type: harness:cloudprovider:Gcp
    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 GcpArgs
    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 GcpArgs
    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 GcpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GcpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GcpArgs
    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 gcpResource = new Harness.Cloudprovider.Gcp("gcpResource", new()
    {
        DelegateSelectors = new[]
        {
            "string",
        },
        Name = "string",
        SecretFileId = "string",
        SkipValidation = false,
        UsageScopes = new[]
        {
            new Harness.Cloudprovider.Inputs.GcpUsageScopeArgs
            {
                ApplicationId = "string",
                EnvironmentFilterType = "string",
                EnvironmentId = "string",
            },
        },
    });
    
    example, err := cloudprovider.NewGcp(ctx, "gcpResource", &cloudprovider.GcpArgs{
    	DelegateSelectors: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name:           pulumi.String("string"),
    	SecretFileId:   pulumi.String("string"),
    	SkipValidation: pulumi.Bool(false),
    	UsageScopes: cloudprovider.GcpUsageScopeArray{
    		&cloudprovider.GcpUsageScopeArgs{
    			ApplicationId:         pulumi.String("string"),
    			EnvironmentFilterType: pulumi.String("string"),
    			EnvironmentId:         pulumi.String("string"),
    		},
    	},
    })
    
    var gcpResource = new Gcp("gcpResource", GcpArgs.builder()
        .delegateSelectors("string")
        .name("string")
        .secretFileId("string")
        .skipValidation(false)
        .usageScopes(GcpUsageScopeArgs.builder()
            .applicationId("string")
            .environmentFilterType("string")
            .environmentId("string")
            .build())
        .build());
    
    gcp_resource = harness.cloudprovider.Gcp("gcpResource",
        delegate_selectors=["string"],
        name="string",
        secret_file_id="string",
        skip_validation=False,
        usage_scopes=[harness.cloudprovider.GcpUsageScopeArgs(
            application_id="string",
            environment_filter_type="string",
            environment_id="string",
        )])
    
    const gcpResource = new harness.cloudprovider.Gcp("gcpResource", {
        delegateSelectors: ["string"],
        name: "string",
        secretFileId: "string",
        skipValidation: false,
        usageScopes: [{
            applicationId: "string",
            environmentFilterType: "string",
            environmentId: "string",
        }],
    });
    
    type: harness:cloudprovider:Gcp
    properties:
        delegateSelectors:
            - string
        name: string
        secretFileId: string
        skipValidation: false
        usageScopes:
            - applicationId: string
              environmentFilterType: string
              environmentId: string
    

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

    DelegateSelectors List<string>
    Delegate selectors to use for this provider.
    Name string
    The name of the cloud provider.
    SecretFileId string
    The id of the secret containing the GCP credentials
    SkipValidation bool
    Skip validation of GCP configuration.
    UsageScopes List<Lbrlabs.PulumiPackage.Harness.Cloudprovider.Inputs.GcpUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    DelegateSelectors []string
    Delegate selectors to use for this provider.
    Name string
    The name of the cloud provider.
    SecretFileId string
    The id of the secret containing the GCP credentials
    SkipValidation bool
    Skip validation of GCP configuration.
    UsageScopes []GcpUsageScopeArgs
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors List<String>
    Delegate selectors to use for this provider.
    name String
    The name of the cloud provider.
    secretFileId String
    The id of the secret containing the GCP credentials
    skipValidation Boolean
    Skip validation of GCP configuration.
    usageScopes List<GcpUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors string[]
    Delegate selectors to use for this provider.
    name string
    The name of the cloud provider.
    secretFileId string
    The id of the secret containing the GCP credentials
    skipValidation boolean
    Skip validation of GCP configuration.
    usageScopes GcpUsageScope[]
    This block is used for scoping the resource to a specific set of applications or environments.
    delegate_selectors Sequence[str]
    Delegate selectors to use for this provider.
    name str
    The name of the cloud provider.
    secret_file_id str
    The id of the secret containing the GCP credentials
    skip_validation bool
    Skip validation of GCP configuration.
    usage_scopes Sequence[GcpUsageScopeArgs]
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors List<String>
    Delegate selectors to use for this provider.
    name String
    The name of the cloud provider.
    secretFileId String
    The id of the secret containing the GCP credentials
    skipValidation Boolean
    Skip validation of GCP configuration.
    usageScopes List<Property Map>
    This block is used for scoping the resource to a specific set of applications or environments.

    Outputs

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

    Get an existing Gcp 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?: GcpState, opts?: CustomResourceOptions): Gcp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            delegate_selectors: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            secret_file_id: Optional[str] = None,
            skip_validation: Optional[bool] = None,
            usage_scopes: Optional[Sequence[GcpUsageScopeArgs]] = None) -> Gcp
    func GetGcp(ctx *Context, name string, id IDInput, state *GcpState, opts ...ResourceOption) (*Gcp, error)
    public static Gcp Get(string name, Input<string> id, GcpState? state, CustomResourceOptions? opts = null)
    public static Gcp get(String name, Output<String> id, GcpState 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:
    DelegateSelectors List<string>
    Delegate selectors to use for this provider.
    Name string
    The name of the cloud provider.
    SecretFileId string
    The id of the secret containing the GCP credentials
    SkipValidation bool
    Skip validation of GCP configuration.
    UsageScopes List<Lbrlabs.PulumiPackage.Harness.Cloudprovider.Inputs.GcpUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    DelegateSelectors []string
    Delegate selectors to use for this provider.
    Name string
    The name of the cloud provider.
    SecretFileId string
    The id of the secret containing the GCP credentials
    SkipValidation bool
    Skip validation of GCP configuration.
    UsageScopes []GcpUsageScopeArgs
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors List<String>
    Delegate selectors to use for this provider.
    name String
    The name of the cloud provider.
    secretFileId String
    The id of the secret containing the GCP credentials
    skipValidation Boolean
    Skip validation of GCP configuration.
    usageScopes List<GcpUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors string[]
    Delegate selectors to use for this provider.
    name string
    The name of the cloud provider.
    secretFileId string
    The id of the secret containing the GCP credentials
    skipValidation boolean
    Skip validation of GCP configuration.
    usageScopes GcpUsageScope[]
    This block is used for scoping the resource to a specific set of applications or environments.
    delegate_selectors Sequence[str]
    Delegate selectors to use for this provider.
    name str
    The name of the cloud provider.
    secret_file_id str
    The id of the secret containing the GCP credentials
    skip_validation bool
    Skip validation of GCP configuration.
    usage_scopes Sequence[GcpUsageScopeArgs]
    This block is used for scoping the resource to a specific set of applications or environments.
    delegateSelectors List<String>
    Delegate selectors to use for this provider.
    name String
    The name of the cloud provider.
    secretFileId String
    The id of the secret containing the GCP credentials
    skipValidation Boolean
    Skip validation of GCP configuration.
    usageScopes List<Property Map>
    This block is used for scoping the resource to a specific set of applications or environments.

    Supporting Types

    GcpUsageScope, GcpUsageScopeArgs

    ApplicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    EnvironmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    EnvironmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    ApplicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    EnvironmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    EnvironmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId String
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType String
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId String
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    application_id str
    Id of the application to scope to. If empty then this scope applies to all applications.
    environment_filter_type str
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environment_id str
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId String
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType String
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId String
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.

    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