harness.platform.AzureCloudCostConnector
Explore with Pulumi AI
Resource for creating an Azure Cloud Cost connector in Harness.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const example = new harness.platform.AzureCloudCostConnector("example", {
identifier: "identifier",
name: "name",
description: "example",
tags: ["foo:bar"],
featuresEnableds: [
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
],
tenantId: "tenant_id",
subscriptionId: "subscription_id",
billingExportSpec: {
storageAccountName: "storage_account_name",
containerName: "container_name",
directoryName: "directory_name",
reportName: "report_name",
subscriptionId: "subscription_id",
},
});
import pulumi
import pulumi_harness as harness
example = harness.platform.AzureCloudCostConnector("example",
identifier="identifier",
name="name",
description="example",
tags=["foo:bar"],
features_enableds=[
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
],
tenant_id="tenant_id",
subscription_id="subscription_id",
billing_export_spec={
"storage_account_name": "storage_account_name",
"container_name": "container_name",
"directory_name": "directory_name",
"report_name": "report_name",
"subscription_id": "subscription_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.NewAzureCloudCostConnector(ctx, "example", &platform.AzureCloudCostConnectorArgs{
Identifier: pulumi.String("identifier"),
Name: pulumi.String("name"),
Description: pulumi.String("example"),
Tags: pulumi.StringArray{
pulumi.String("foo:bar"),
},
FeaturesEnableds: pulumi.StringArray{
pulumi.String("BILLING"),
pulumi.String("VISIBILITY"),
pulumi.String("OPTIMIZATION"),
pulumi.String("GOVERNANCE"),
},
TenantId: pulumi.String("tenant_id"),
SubscriptionId: pulumi.String("subscription_id"),
BillingExportSpec: &platform.AzureCloudCostConnectorBillingExportSpecArgs{
StorageAccountName: pulumi.String("storage_account_name"),
ContainerName: pulumi.String("container_name"),
DirectoryName: pulumi.String("directory_name"),
ReportName: pulumi.String("report_name"),
SubscriptionId: pulumi.String("subscription_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 example = new Harness.Platform.AzureCloudCostConnector("example", new()
{
Identifier = "identifier",
Name = "name",
Description = "example",
Tags = new[]
{
"foo:bar",
},
FeaturesEnableds = new[]
{
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE",
},
TenantId = "tenant_id",
SubscriptionId = "subscription_id",
BillingExportSpec = new Harness.Platform.Inputs.AzureCloudCostConnectorBillingExportSpecArgs
{
StorageAccountName = "storage_account_name",
ContainerName = "container_name",
DirectoryName = "directory_name",
ReportName = "report_name",
SubscriptionId = "subscription_id",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.AzureCloudCostConnector;
import com.pulumi.harness.platform.AzureCloudCostConnectorArgs;
import com.pulumi.harness.platform.inputs.AzureCloudCostConnectorBillingExportSpecArgs;
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 example = new AzureCloudCostConnector("example", AzureCloudCostConnectorArgs.builder()
.identifier("identifier")
.name("name")
.description("example")
.tags("foo:bar")
.featuresEnableds(
"BILLING",
"VISIBILITY",
"OPTIMIZATION",
"GOVERNANCE")
.tenantId("tenant_id")
.subscriptionId("subscription_id")
.billingExportSpec(AzureCloudCostConnectorBillingExportSpecArgs.builder()
.storageAccountName("storage_account_name")
.containerName("container_name")
.directoryName("directory_name")
.reportName("report_name")
.subscriptionId("subscription_id")
.build())
.build());
}
}
resources:
example:
type: harness:platform:AzureCloudCostConnector
properties:
identifier: identifier
name: name
description: example
tags:
- foo:bar
featuresEnableds:
- BILLING
- VISIBILITY
- OPTIMIZATION
- GOVERNANCE
tenantId: tenant_id
subscriptionId: subscription_id
billingExportSpec:
storageAccountName: storage_account_name
containerName: container_name
directoryName: directory_name
reportName: report_name
subscriptionId: subscription_id
Create AzureCloudCostConnector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AzureCloudCostConnector(name: string, args: AzureCloudCostConnectorArgs, opts?: CustomResourceOptions);
@overload
def AzureCloudCostConnector(resource_name: str,
args: AzureCloudCostConnectorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AzureCloudCostConnector(resource_name: str,
opts: Optional[ResourceOptions] = None,
features_enableds: Optional[Sequence[str]] = None,
identifier: Optional[str] = None,
subscription_id: Optional[str] = None,
tenant_id: Optional[str] = None,
billing_export_spec: Optional[AzureCloudCostConnectorBillingExportSpecArgs] = 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 NewAzureCloudCostConnector(ctx *Context, name string, args AzureCloudCostConnectorArgs, opts ...ResourceOption) (*AzureCloudCostConnector, error)
public AzureCloudCostConnector(string name, AzureCloudCostConnectorArgs args, CustomResourceOptions? opts = null)
public AzureCloudCostConnector(String name, AzureCloudCostConnectorArgs args)
public AzureCloudCostConnector(String name, AzureCloudCostConnectorArgs args, CustomResourceOptions options)
type: harness:platform:AzureCloudCostConnector
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 AzureCloudCostConnectorArgs
- 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 AzureCloudCostConnectorArgs
- 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 AzureCloudCostConnectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AzureCloudCostConnectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AzureCloudCostConnectorArgs
- 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 azureCloudCostConnectorResource = new Harness.Platform.AzureCloudCostConnector("azureCloudCostConnectorResource", new()
{
FeaturesEnableds = new[]
{
"string",
},
Identifier = "string",
SubscriptionId = "string",
TenantId = "string",
BillingExportSpec = new Harness.Platform.Inputs.AzureCloudCostConnectorBillingExportSpecArgs
{
ContainerName = "string",
DirectoryName = "string",
ReportName = "string",
StorageAccountName = "string",
SubscriptionId = "string",
},
Description = "string",
Name = "string",
OrgId = "string",
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewAzureCloudCostConnector(ctx, "azureCloudCostConnectorResource", &platform.AzureCloudCostConnectorArgs{
FeaturesEnableds: pulumi.StringArray{
pulumi.String("string"),
},
Identifier: pulumi.String("string"),
SubscriptionId: pulumi.String("string"),
TenantId: pulumi.String("string"),
BillingExportSpec: &platform.AzureCloudCostConnectorBillingExportSpecArgs{
ContainerName: pulumi.String("string"),
DirectoryName: pulumi.String("string"),
ReportName: pulumi.String("string"),
StorageAccountName: pulumi.String("string"),
SubscriptionId: 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 azureCloudCostConnectorResource = new AzureCloudCostConnector("azureCloudCostConnectorResource", AzureCloudCostConnectorArgs.builder()
.featuresEnableds("string")
.identifier("string")
.subscriptionId("string")
.tenantId("string")
.billingExportSpec(AzureCloudCostConnectorBillingExportSpecArgs.builder()
.containerName("string")
.directoryName("string")
.reportName("string")
.storageAccountName("string")
.subscriptionId("string")
.build())
.description("string")
.name("string")
.orgId("string")
.projectId("string")
.tags("string")
.build());
azure_cloud_cost_connector_resource = harness.platform.AzureCloudCostConnector("azureCloudCostConnectorResource",
features_enableds=["string"],
identifier="string",
subscription_id="string",
tenant_id="string",
billing_export_spec={
"container_name": "string",
"directory_name": "string",
"report_name": "string",
"storage_account_name": "string",
"subscription_id": "string",
},
description="string",
name="string",
org_id="string",
project_id="string",
tags=["string"])
const azureCloudCostConnectorResource = new harness.platform.AzureCloudCostConnector("azureCloudCostConnectorResource", {
featuresEnableds: ["string"],
identifier: "string",
subscriptionId: "string",
tenantId: "string",
billingExportSpec: {
containerName: "string",
directoryName: "string",
reportName: "string",
storageAccountName: "string",
subscriptionId: "string",
},
description: "string",
name: "string",
orgId: "string",
projectId: "string",
tags: ["string"],
});
type: harness:platform:AzureCloudCostConnector
properties:
billingExportSpec:
containerName: string
directoryName: string
reportName: string
storageAccountName: string
subscriptionId: string
description: string
featuresEnableds:
- string
identifier: string
name: string
orgId: string
projectId: string
subscriptionId: string
tags:
- string
tenantId: string
AzureCloudCostConnector 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 AzureCloudCostConnector resource accepts the following input properties:
- Features
Enableds List<string> - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- Identifier string
- Unique identifier of the resource.
- Subscription
Id string - Subsription id.
- Tenant
Id string - Tenant id.
- Billing
Export AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- 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 feature to enable among Billing, Optimization, Visibility and Governance.
- Identifier string
- Unique identifier of the resource.
- Subscription
Id string - Subsription id.
- Tenant
Id string - Tenant id.
- Billing
Export AzureSpec Cloud Cost Connector Billing Export Spec Args - Returns billing details for the Azure account.
- 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 feature to enable among Billing, Optimization, Visibility and Governance.
- identifier String
- Unique identifier of the resource.
- subscription
Id String - Subsription id.
- tenant
Id String - Tenant id.
- billing
Export AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- 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 feature to enable among Billing, Optimization, Visibility and Governance.
- identifier string
- Unique identifier of the resource.
- subscription
Id string - Subsription id.
- tenant
Id string - Tenant id.
- billing
Export AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- 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 feature to enable among Billing, Optimization, Visibility and Governance.
- identifier str
- Unique identifier of the resource.
- subscription_
id str - Subsription id.
- tenant_
id str - Tenant id.
- billing_
export_ Azurespec Cloud Cost Connector Billing Export Spec Args - Returns billing details for the Azure account.
- 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 feature to enable among Billing, Optimization, Visibility and Governance.
- identifier String
- Unique identifier of the resource.
- subscription
Id String - Subsription id.
- tenant
Id String - Tenant id.
- billing
Export Property MapSpec - Returns billing details for the Azure account.
- 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 AzureCloudCostConnector 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 AzureCloudCostConnector Resource
Get an existing AzureCloudCostConnector 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?: AzureCloudCostConnectorState, opts?: CustomResourceOptions): AzureCloudCostConnector
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
billing_export_spec: Optional[AzureCloudCostConnectorBillingExportSpecArgs] = None,
description: Optional[str] = None,
features_enableds: Optional[Sequence[str]] = None,
identifier: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
subscription_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[str] = None) -> AzureCloudCostConnector
func GetAzureCloudCostConnector(ctx *Context, name string, id IDInput, state *AzureCloudCostConnectorState, opts ...ResourceOption) (*AzureCloudCostConnector, error)
public static AzureCloudCostConnector Get(string name, Input<string> id, AzureCloudCostConnectorState? state, CustomResourceOptions? opts = null)
public static AzureCloudCostConnector get(String name, Output<String> id, AzureCloudCostConnectorState 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 AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- Description string
- Description of the resource.
- Features
Enableds List<string> - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- Subscription
Id string - Subsription id.
- List<string>
- Tags to associate with the resource.
- Tenant
Id string - Tenant id.
- Billing
Export AzureSpec Cloud Cost Connector Billing Export Spec Args - Returns billing details for the Azure account.
- Description string
- Description of the resource.
- Features
Enableds []string - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- Subscription
Id string - Subsription id.
- []string
- Tags to associate with the resource.
- Tenant
Id string - Tenant id.
- billing
Export AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- description String
- Description of the resource.
- features
Enableds List<String> - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- subscription
Id String - Subsription id.
- List<String>
- Tags to associate with the resource.
- tenant
Id String - Tenant id.
- billing
Export AzureSpec Cloud Cost Connector Billing Export Spec - Returns billing details for the Azure account.
- description string
- Description of the resource.
- features
Enableds string[] - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- subscription
Id string - Subsription id.
- string[]
- Tags to associate with the resource.
- tenant
Id string - Tenant id.
- billing_
export_ Azurespec Cloud Cost Connector Billing Export Spec Args - Returns billing details for the Azure account.
- description str
- Description of the resource.
- features_
enableds Sequence[str] - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- subscription_
id str - Subsription id.
- Sequence[str]
- Tags to associate with the resource.
- tenant_
id str - Tenant id.
- billing
Export Property MapSpec - Returns billing details for the Azure account.
- description String
- Description of the resource.
- features
Enableds List<String> - Indicates which feature to enable among Billing, Optimization, Visibility and Governance.
- 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.
- subscription
Id String - Subsription id.
- List<String>
- Tags to associate with the resource.
- tenant
Id String - Tenant id.
Supporting Types
AzureCloudCostConnectorBillingExportSpec, AzureCloudCostConnectorBillingExportSpecArgs
- Container
Name string - Name of the container.
- Directory
Name string - Name of the directory.
- Report
Name string - Name of the report.
- Storage
Account stringName - Name of the storage account.
- Subscription
Id string - Subsription Id.
- Container
Name string - Name of the container.
- Directory
Name string - Name of the directory.
- Report
Name string - Name of the report.
- Storage
Account stringName - Name of the storage account.
- Subscription
Id string - Subsription Id.
- container
Name String - Name of the container.
- directory
Name String - Name of the directory.
- report
Name String - Name of the report.
- storage
Account StringName - Name of the storage account.
- subscription
Id String - Subsription Id.
- container
Name string - Name of the container.
- directory
Name string - Name of the directory.
- report
Name string - Name of the report.
- storage
Account stringName - Name of the storage account.
- subscription
Id string - Subsription Id.
- container_
name str - Name of the container.
- directory_
name str - Name of the directory.
- report_
name str - Name of the report.
- storage_
account_ strname - Name of the storage account.
- subscription_
id str - Subsription Id.
- container
Name String - Name of the container.
- directory
Name String - Name of the directory.
- report
Name String - Name of the report.
- storage
Account StringName - Name of the storage account.
- subscription
Id String - Subsription Id.
Import
Import account level azure cloud cost connector
$ pulumi import harness:platform/azureCloudCostConnector:AzureCloudCostConnector example <connector_id>
Import org level azure cloud cost connector
$ pulumi import harness:platform/azureCloudCostConnector:AzureCloudCostConnector example <ord_id>/<connector_id>
Import project level azure cloud cost connector
$ pulumi import harness:platform/azureCloudCostConnector:AzureCloudCostConnector 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.