harness.platform.GcpCloudCostConnector
Explore with Pulumi AI
Resource for creating a GCP Cloud Cost connector in Harness.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const test = new harness.platform.GcpCloudCostConnector("test", {
identifier: "identifier",
name: "name",
description: "test",
tags: ["foo:bar"],
featuresEnableds: [
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
],
gcpProjectId: "gcp_project_id",
serviceAccountEmail: "service_account_email",
billingExportSpec: {
dataSetId: "data_set_id",
tableId: "table_id",
},
});
import pulumi
import pulumi_harness as harness
test = harness.platform.GcpCloudCostConnector("test",
identifier="identifier",
name="name",
description="test",
tags=["foo:bar"],
features_enableds=[
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
],
gcp_project_id="gcp_project_id",
service_account_email="service_account_email",
billing_export_spec={
"data_set_id": "data_set_id",
"table_id": "table_id",
})
package main
import (
"github.com/pulumi/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{
Identifier: pulumi.String("identifier"),
Name: pulumi.String("name"),
Description: pulumi.String("test"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
},
FeaturesEnableds: pulumi.StringArray{
pulumi.String("BILLING"),
pulumi.String("VISIBILITY"),
pulumi.String("OPTIMIZATION"),
pulumi.String("GOVERNANCE"),
},
GcpProjectId: pulumi.String("gcp_project_id"),
ServiceAccountEmail: pulumi.String("service_account_email"),
BillingExportSpec: &platform.GcpCloudCostConnectorBillingExportSpecArgs{
DataSetId: pulumi.String("data_set_id"),
TableId: pulumi.String("table_id"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var test = new Harness.Platform.GcpCloudCostConnector("test", new()
{
Identifier = "identifier",
Name = "name",
Description = "test",
Tags = new[]
{
"foo:bar",
},
FeaturesEnableds = new[]
{
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
},
GcpProjectId = "gcp_project_id",
ServiceAccountEmail = "service_account_email",
BillingExportSpec = new Harness.Platform.Inputs.GcpCloudCostConnectorBillingExportSpecArgs
{
DataSetId = "data_set_id",
TableId = "table_id",
},
});
});
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()
.identifier("identifier")
.name("name")
.description("test")
.tags("foo:bar")
.featuresEnableds(
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE")
.gcpProjectId("gcp_project_id")
.serviceAccountEmail("service_account_email")
.billingExportSpec(GcpCloudCostConnectorBillingExportSpecArgs.builder()
.dataSetId("data_set_id")
.tableId("table_id")
.build())
.build());
}
}
resources:
test:
type: harness:platform:GcpCloudCostConnector
properties:
identifier: identifier
name: name
description: test
tags:
- foo:bar
featuresEnableds:
- BILLING
- VISIBILITY
- OPTIMIZATION
- GOVERNANCE
gcpProjectId: gcp_project_id
serviceAccountEmail: service_account_email
billingExportSpec:
dataSetId: data_set_id
tableId: table_id
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.
Constructor 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={
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GcpCloudCostConnector resource accepts the following input properties:
- Features
Enableds List<string> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- Gcp
Project stringId - GCP Project Id.
- Identifier string
- Unique identifier of the resource.
- Service
Account stringEmail - Email corresponding to the Service Account.
- Billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Features
Enableds []string - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- Gcp
Project stringId - GCP Project Id.
- Identifier string
- Unique identifier of the resource.
- Service
Account stringEmail - Email corresponding to the Service Account.
- Billing
Export GcpSpec Cloud Cost Connector Billing Export Spec Args - Returns billing details.
- Description string
- Description of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- features
Enableds List<String> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project StringId - GCP Project Id.
- identifier String
- Unique identifier of the resource.
- service
Account StringEmail - Email corresponding to the Service Account.
- billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- description String
- Description of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- features
Enableds string[] - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project stringId - GCP Project Id.
- identifier string
- Unique identifier of the resource.
- service
Account stringEmail - Email corresponding to the Service Account.
- billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- description string
- Description of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- features_
enableds Sequence[str] - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp_
project_ strid - GCP Project Id.
- identifier str
- Unique identifier of the resource.
- service_
account_ stremail - Email corresponding to the Service Account.
- billing_
export_ Gcpspec Cloud Cost Connector Billing Export Spec Args - 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.
- Sequence[str]
- Tags to associate with the resource.
- features
Enableds List<String> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project StringId - GCP Project Id.
- identifier String
- Unique identifier of the resource.
- service
Account StringEmail - Email corresponding to the Service Account.
- billing
Export Property MapSpec - Returns billing details.
- description String
- Description of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- 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.
- Billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- Description string
- Description of the resource.
- Features
Enableds List<string> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- Gcp
Project stringId - GCP Project Id.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Service
Account stringEmail - Email corresponding to the Service Account.
- List<string>
- Tags to associate with the resource.
- Billing
Export GcpSpec Cloud Cost Connector Billing Export Spec Args - Returns billing details.
- Description string
- Description of the resource.
- Features
Enableds []string - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- Gcp
Project stringId - GCP Project Id.
- Identifier string
- Unique identifier of the resource.
- Name string
- Name of the resource.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Service
Account stringEmail - Email corresponding to the Service Account.
- []string
- Tags to associate with the resource.
- billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- description String
- Description of the resource.
- features
Enableds List<String> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project StringId - GCP Project Id.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- service
Account StringEmail - Email corresponding to the Service Account.
- List<String>
- Tags to associate with the resource.
- billing
Export GcpSpec Cloud Cost Connector Billing Export Spec - Returns billing details.
- description string
- Description of the resource.
- features
Enableds string[] - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project stringId - GCP Project Id.
- identifier string
- Unique identifier of the resource.
- name string
- Name of the resource.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- service
Account stringEmail - Email corresponding to the Service Account.
- string[]
- Tags to associate with the resource.
- billing_
export_ Gcpspec Cloud Cost Connector Billing Export Spec Args - Returns billing details.
- description str
- Description of the resource.
- features_
enableds Sequence[str] - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp_
project_ strid - 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_ stremail - Email corresponding to the Service Account.
- Sequence[str]
- Tags to associate with the resource.
- billing
Export Property MapSpec - Returns billing details.
- description String
- Description of the resource.
- features
Enableds List<String> - Indicates which features to enable among Billing, Optimization, Visibility and Governance.
- gcp
Project StringId - GCP Project Id.
- identifier String
- Unique identifier of the resource.
- name String
- Name of the resource.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- service
Account StringEmail - Email corresponding to the Service Account.
- List<String>
- Tags to associate with the resource.
Supporting Types
GcpCloudCostConnectorBillingExportSpec, GcpCloudCostConnectorBillingExportSpecArgs
- data_
set_ strid - Data Set Id.
- table_
id str - 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 pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.