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

harness.platform.GcpCloudCostConnector

Explore with Pulumi AI

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

    Resource for creating a GCP Cloud Cost connector in Harness.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Harness.Platform.GcpCloudCostConnector("test", new()
        {
            BillingExportSpec = new Harness.Platform.Inputs.GcpCloudCostConnectorBillingExportSpecArgs
            {
                DataSetId = "data_set_id",
                TableId = "table_id",
            },
            Description = "test",
            FeaturesEnableds = new[]
            {
                "BILLING",
                "VISIBILITY",
                "OPTIMIZATION",
            },
            GcpProjectId = "gcp_project_id",
            Identifier = "identifier",
            ServiceAccountEmail = "service_account_email",
            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.NewGcpCloudCostConnector(ctx, "test", &platform.GcpCloudCostConnectorArgs{
    			BillingExportSpec: &platform.GcpCloudCostConnectorBillingExportSpecArgs{
    				DataSetId: pulumi.String("data_set_id"),
    				TableId:   pulumi.String("table_id"),
    			},
    			Description: pulumi.String("test"),
    			FeaturesEnableds: pulumi.StringArray{
    				pulumi.String("BILLING"),
    				pulumi.String("VISIBILITY"),
    				pulumi.String("OPTIMIZATION"),
    			},
    			GcpProjectId:        pulumi.String("gcp_project_id"),
    			Identifier:          pulumi.String("identifier"),
    			ServiceAccountEmail: pulumi.String("service_account_email"),
    			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.GcpCloudCostConnector;
    import com.pulumi.harness.platform.GcpCloudCostConnectorArgs;
    import com.pulumi.harness.platform.inputs.GcpCloudCostConnectorBillingExportSpecArgs;
    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 GcpCloudCostConnector("test", GcpCloudCostConnectorArgs.builder()        
                .billingExportSpec(GcpCloudCostConnectorBillingExportSpecArgs.builder()
                    .dataSetId("data_set_id")
                    .tableId("table_id")
                    .build())
                .description("test")
                .featuresEnableds(            
                    "BILLING",
                    "VISIBILITY",
                    "OPTIMIZATION")
                .gcpProjectId("gcp_project_id")
                .identifier("identifier")
                .serviceAccountEmail("service_account_email")
                .tags("foo:bar")
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    test = harness.platform.GcpCloudCostConnector("test",
        billing_export_spec=harness.platform.GcpCloudCostConnectorBillingExportSpecArgs(
            data_set_id="data_set_id",
            table_id="table_id",
        ),
        description="test",
        features_enableds=[
            "BILLING",
            "VISIBILITY",
            "OPTIMIZATION",
        ],
        gcp_project_id="gcp_project_id",
        identifier="identifier",
        service_account_email="service_account_email",
        tags=["foo:bar"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    const test = new harness.platform.GcpCloudCostConnector("test", {
        billingExportSpec: {
            dataSetId: "data_set_id",
            tableId: "table_id",
        },
        description: "test",
        featuresEnableds: [
            "BILLING",
            "VISIBILITY",
            "OPTIMIZATION",
        ],
        gcpProjectId: "gcp_project_id",
        identifier: "identifier",
        serviceAccountEmail: "service_account_email",
        tags: ["foo:bar"],
    });
    
    resources:
      test:
        type: harness:platform:GcpCloudCostConnector
        properties:
          billingExportSpec:
            dataSetId: data_set_id
            tableId: table_id
          description: test
          featuresEnableds:
            - BILLING
            - VISIBILITY
            - OPTIMIZATION
          gcpProjectId: gcp_project_id
          identifier: identifier
          serviceAccountEmail: service_account_email
          tags:
            - foo:bar
    

    Create GcpCloudCostConnector Resource

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

    Constructor syntax

    new GcpCloudCostConnector(name: string, args: GcpCloudCostConnectorArgs, opts?: CustomResourceOptions);
    @overload
    def GcpCloudCostConnector(resource_name: str,
                              args: GcpCloudCostConnectorArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def GcpCloudCostConnector(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              features_enableds: Optional[Sequence[str]] = None,
                              gcp_project_id: Optional[str] = None,
                              identifier: Optional[str] = None,
                              service_account_email: Optional[str] = None,
                              billing_export_spec: Optional[GcpCloudCostConnectorBillingExportSpecArgs] = None,
                              description: Optional[str] = None,
                              name: Optional[str] = None,
                              org_id: Optional[str] = None,
                              project_id: Optional[str] = None,
                              tags: Optional[Sequence[str]] = None)
    func NewGcpCloudCostConnector(ctx *Context, name string, args GcpCloudCostConnectorArgs, opts ...ResourceOption) (*GcpCloudCostConnector, error)
    public GcpCloudCostConnector(string name, GcpCloudCostConnectorArgs args, CustomResourceOptions? opts = null)
    public GcpCloudCostConnector(String name, GcpCloudCostConnectorArgs args)
    public GcpCloudCostConnector(String name, GcpCloudCostConnectorArgs args, CustomResourceOptions options)
    
    type: harness:platform:GcpCloudCostConnector
    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 GcpCloudCostConnectorArgs
    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 GcpCloudCostConnectorArgs
    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 GcpCloudCostConnectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GcpCloudCostConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GcpCloudCostConnectorArgs
    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 gcpCloudCostConnectorResource = new Harness.Platform.GcpCloudCostConnector("gcpCloudCostConnectorResource", new()
    {
        FeaturesEnableds = new[]
        {
            "string",
        },
        GcpProjectId = "string",
        Identifier = "string",
        ServiceAccountEmail = "string",
        BillingExportSpec = new Harness.Platform.Inputs.GcpCloudCostConnectorBillingExportSpecArgs
        {
            DataSetId = "string",
            TableId = "string",
        },
        Description = "string",
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := platform.NewGcpCloudCostConnector(ctx, "gcpCloudCostConnectorResource", &platform.GcpCloudCostConnectorArgs{
    	FeaturesEnableds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	GcpProjectId:        pulumi.String("string"),
    	Identifier:          pulumi.String("string"),
    	ServiceAccountEmail: pulumi.String("string"),
    	BillingExportSpec: &platform.GcpCloudCostConnectorBillingExportSpecArgs{
    		DataSetId: pulumi.String("string"),
    		TableId:   pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	OrgId:       pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var gcpCloudCostConnectorResource = new GcpCloudCostConnector("gcpCloudCostConnectorResource", GcpCloudCostConnectorArgs.builder()        
        .featuresEnableds("string")
        .gcpProjectId("string")
        .identifier("string")
        .serviceAccountEmail("string")
        .billingExportSpec(GcpCloudCostConnectorBillingExportSpecArgs.builder()
            .dataSetId("string")
            .tableId("string")
            .build())
        .description("string")
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .build());
    
    gcp_cloud_cost_connector_resource = harness.platform.GcpCloudCostConnector("gcpCloudCostConnectorResource",
        features_enableds=["string"],
        gcp_project_id="string",
        identifier="string",
        service_account_email="string",
        billing_export_spec=harness.platform.GcpCloudCostConnectorBillingExportSpecArgs(
            data_set_id="string",
            table_id="string",
        ),
        description="string",
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"])
    
    const gcpCloudCostConnectorResource = new harness.platform.GcpCloudCostConnector("gcpCloudCostConnectorResource", {
        featuresEnableds: ["string"],
        gcpProjectId: "string",
        identifier: "string",
        serviceAccountEmail: "string",
        billingExportSpec: {
            dataSetId: "string",
            tableId: "string",
        },
        description: "string",
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
    });
    
    type: harness:platform:GcpCloudCostConnector
    properties:
        billingExportSpec:
            dataSetId: string
            tableId: string
        description: string
        featuresEnableds:
            - string
        gcpProjectId: string
        identifier: string
        name: string
        orgId: string
        projectId: string
        serviceAccountEmail: string
        tags:
            - string
    

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

    FeaturesEnableds List<string>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    GcpProjectId string
    GCP Project Id.
    Identifier string
    Unique identifier of the resource.
    ServiceAccountEmail string
    Email corresponding to the Service Account.
    BillingExportSpec Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    Description string
    Description of the resource.
    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.
    FeaturesEnableds []string
    Indicates which features to enable among Billing, Optimization, and Visibility.
    GcpProjectId string
    GCP Project Id.
    Identifier string
    Unique identifier of the resource.
    ServiceAccountEmail string
    Email corresponding to the Service Account.
    BillingExportSpec GcpCloudCostConnectorBillingExportSpecArgs
    Returns billing details.
    Description string
    Description of the resource.
    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.
    featuresEnableds List<String>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId String
    GCP Project Id.
    identifier String
    Unique identifier of the resource.
    serviceAccountEmail String
    Email corresponding to the Service Account.
    billingExportSpec GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    description String
    Description of the resource.
    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.
    featuresEnableds string[]
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId string
    GCP Project Id.
    identifier string
    Unique identifier of the resource.
    serviceAccountEmail string
    Email corresponding to the Service Account.
    billingExportSpec GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    description string
    Description of the resource.
    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.
    features_enableds Sequence[str]
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcp_project_id str
    GCP Project Id.
    identifier str
    Unique identifier of the resource.
    service_account_email str
    Email corresponding to the Service Account.
    billing_export_spec GcpCloudCostConnectorBillingExportSpecArgs
    Returns billing details.
    description str
    Description of the resource.
    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.
    featuresEnableds List<String>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId String
    GCP Project Id.
    identifier String
    Unique identifier of the resource.
    serviceAccountEmail String
    Email corresponding to the Service Account.
    billingExportSpec Property Map
    Returns billing details.
    description String
    Description of the resource.
    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 GcpCloudCostConnector 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 GcpCloudCostConnector Resource

    Get an existing GcpCloudCostConnector 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?: GcpCloudCostConnectorState, opts?: CustomResourceOptions): GcpCloudCostConnector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            billing_export_spec: Optional[GcpCloudCostConnectorBillingExportSpecArgs] = None,
            description: Optional[str] = None,
            features_enableds: Optional[Sequence[str]] = None,
            gcp_project_id: Optional[str] = None,
            identifier: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            service_account_email: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> GcpCloudCostConnector
    func GetGcpCloudCostConnector(ctx *Context, name string, id IDInput, state *GcpCloudCostConnectorState, opts ...ResourceOption) (*GcpCloudCostConnector, error)
    public static GcpCloudCostConnector Get(string name, Input<string> id, GcpCloudCostConnectorState? state, CustomResourceOptions? opts = null)
    public static GcpCloudCostConnector get(String name, Output<String> id, GcpCloudCostConnectorState 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:
    BillingExportSpec Lbrlabs.PulumiPackage.Harness.Platform.Inputs.GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    Description string
    Description of the resource.
    FeaturesEnableds List<string>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    GcpProjectId string
    GCP Project Id.
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ServiceAccountEmail string
    Email corresponding to the Service Account.
    Tags List<string>
    Tags to associate with the resource.
    BillingExportSpec GcpCloudCostConnectorBillingExportSpecArgs
    Returns billing details.
    Description string
    Description of the resource.
    FeaturesEnableds []string
    Indicates which features to enable among Billing, Optimization, and Visibility.
    GcpProjectId string
    GCP Project Id.
    Identifier string
    Unique identifier of the resource.
    Name string
    Name of the resource.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    ServiceAccountEmail string
    Email corresponding to the Service Account.
    Tags []string
    Tags to associate with the resource.
    billingExportSpec GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    description String
    Description of the resource.
    featuresEnableds List<String>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId String
    GCP Project Id.
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    serviceAccountEmail String
    Email corresponding to the Service Account.
    tags List<String>
    Tags to associate with the resource.
    billingExportSpec GcpCloudCostConnectorBillingExportSpec
    Returns billing details.
    description string
    Description of the resource.
    featuresEnableds string[]
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId string
    GCP Project Id.
    identifier string
    Unique identifier of the resource.
    name string
    Name of the resource.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    serviceAccountEmail string
    Email corresponding to the Service Account.
    tags string[]
    Tags to associate with the resource.
    billing_export_spec GcpCloudCostConnectorBillingExportSpecArgs
    Returns billing details.
    description str
    Description of the resource.
    features_enableds Sequence[str]
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcp_project_id str
    GCP Project Id.
    identifier str
    Unique identifier of the resource.
    name str
    Name of the resource.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    service_account_email str
    Email corresponding to the Service Account.
    tags Sequence[str]
    Tags to associate with the resource.
    billingExportSpec Property Map
    Returns billing details.
    description String
    Description of the resource.
    featuresEnableds List<String>
    Indicates which features to enable among Billing, Optimization, and Visibility.
    gcpProjectId String
    GCP Project Id.
    identifier String
    Unique identifier of the resource.
    name String
    Name of the resource.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    serviceAccountEmail String
    Email corresponding to the Service Account.
    tags List<String>
    Tags to associate with the resource.

    Supporting Types

    GcpCloudCostConnectorBillingExportSpec, GcpCloudCostConnectorBillingExportSpecArgs

    DataSetId string
    Data Set Id.
    TableId string
    Table Id.
    DataSetId string
    Data Set Id.
    TableId string
    Table Id.
    dataSetId String
    Data Set Id.
    tableId String
    Table Id.
    dataSetId string
    Data Set Id.
    tableId string
    Table Id.
    data_set_id str
    Data Set Id.
    table_id str
    Table Id.
    dataSetId String
    Data Set Id.
    tableId String
    Table Id.

    Import

    Import account level gcp cloud cost connector

     $ pulumi import harness:platform/gcpCloudCostConnector:GcpCloudCostConnector example <connector_id>
    

    Import org level gcp cloud cost connector

     $ pulumi import harness:platform/gcpCloudCostConnector:GcpCloudCostConnector example <ord_id>/<connector_id>
    

    Import project level gcp cloud cost connector

     $ pulumi import harness:platform/gcpCloudCostConnector:GcpCloudCostConnector 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