1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. TerraformCloudConnector
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

harness.platform.TerraformCloudConnector

Explore with Pulumi AI

Example Usage

Create TerraformCloudConnector Resource

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

Constructor syntax

new TerraformCloudConnector(name: string, args: TerraformCloudConnectorArgs, opts?: CustomResourceOptions);
@overload
def TerraformCloudConnector(resource_name: str,
                            args: TerraformCloudConnectorArgs,
                            opts: Optional[ResourceOptions] = None)

@overload
def TerraformCloudConnector(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            credentials: Optional[TerraformCloudConnectorCredentialsArgs] = None,
                            identifier: Optional[str] = None,
                            url: Optional[str] = None,
                            delegate_selectors: Optional[Sequence[str]] = None,
                            description: Optional[str] = None,
                            execute_on_delegate: Optional[bool] = None,
                            name: Optional[str] = None,
                            org_id: Optional[str] = None,
                            project_id: Optional[str] = None,
                            tags: Optional[Sequence[str]] = None)
func NewTerraformCloudConnector(ctx *Context, name string, args TerraformCloudConnectorArgs, opts ...ResourceOption) (*TerraformCloudConnector, error)
public TerraformCloudConnector(string name, TerraformCloudConnectorArgs args, CustomResourceOptions? opts = null)
public TerraformCloudConnector(String name, TerraformCloudConnectorArgs args)
public TerraformCloudConnector(String name, TerraformCloudConnectorArgs args, CustomResourceOptions options)
type: harness:platform:TerraformCloudConnector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. TerraformCloudConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. TerraformCloudConnectorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. TerraformCloudConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. TerraformCloudConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. TerraformCloudConnectorArgs
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 terraformCloudConnectorResource = new Harness.Platform.TerraformCloudConnector("terraformCloudConnectorResource", new()
{
    Credentials = new Harness.Platform.Inputs.TerraformCloudConnectorCredentialsArgs
    {
        ApiToken = new Harness.Platform.Inputs.TerraformCloudConnectorCredentialsApiTokenArgs
        {
            ApiTokenRef = "string",
        },
    },
    Identifier = "string",
    Url = "string",
    DelegateSelectors = new[]
    {
        "string",
    },
    Description = "string",
    ExecuteOnDelegate = false,
    Name = "string",
    OrgId = "string",
    ProjectId = "string",
    Tags = new[]
    {
        "string",
    },
});
Copy
example, err := platform.NewTerraformCloudConnector(ctx, "terraformCloudConnectorResource", &platform.TerraformCloudConnectorArgs{
	Credentials: &platform.TerraformCloudConnectorCredentialsArgs{
		ApiToken: &platform.TerraformCloudConnectorCredentialsApiTokenArgs{
			ApiTokenRef: pulumi.String("string"),
		},
	},
	Identifier: pulumi.String("string"),
	Url:        pulumi.String("string"),
	DelegateSelectors: pulumi.StringArray{
		pulumi.String("string"),
	},
	Description:       pulumi.String("string"),
	ExecuteOnDelegate: pulumi.Bool(false),
	Name:              pulumi.String("string"),
	OrgId:             pulumi.String("string"),
	ProjectId:         pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var terraformCloudConnectorResource = new TerraformCloudConnector("terraformCloudConnectorResource", TerraformCloudConnectorArgs.builder()
    .credentials(TerraformCloudConnectorCredentialsArgs.builder()
        .apiToken(TerraformCloudConnectorCredentialsApiTokenArgs.builder()
            .apiTokenRef("string")
            .build())
        .build())
    .identifier("string")
    .url("string")
    .delegateSelectors("string")
    .description("string")
    .executeOnDelegate(false)
    .name("string")
    .orgId("string")
    .projectId("string")
    .tags("string")
    .build());
Copy
terraform_cloud_connector_resource = harness.platform.TerraformCloudConnector("terraformCloudConnectorResource",
    credentials={
        "api_token": {
            "api_token_ref": "string",
        },
    },
    identifier="string",
    url="string",
    delegate_selectors=["string"],
    description="string",
    execute_on_delegate=False,
    name="string",
    org_id="string",
    project_id="string",
    tags=["string"])
Copy
const terraformCloudConnectorResource = new harness.platform.TerraformCloudConnector("terraformCloudConnectorResource", {
    credentials: {
        apiToken: {
            apiTokenRef: "string",
        },
    },
    identifier: "string",
    url: "string",
    delegateSelectors: ["string"],
    description: "string",
    executeOnDelegate: false,
    name: "string",
    orgId: "string",
    projectId: "string",
    tags: ["string"],
});
Copy
type: harness:platform:TerraformCloudConnector
properties:
    credentials:
        apiToken:
            apiTokenRef: string
    delegateSelectors:
        - string
    description: string
    executeOnDelegate: false
    identifier: string
    name: string
    orgId: string
    projectId: string
    tags:
        - string
    url: string
Copy

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

Credentials This property is required. TerraformCloudConnectorCredentials
Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
Url This property is required. string
DelegateSelectors List<string>
Connect only using delegates with these tags.
Description string
Description of the resource.
ExecuteOnDelegate bool
Enable this flag to execute on delegate (default: true).
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.
Credentials This property is required. TerraformCloudConnectorCredentialsArgs
Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
Url This property is required. string
DelegateSelectors []string
Connect only using delegates with these tags.
Description string
Description of the resource.
ExecuteOnDelegate bool
Enable this flag to execute on delegate (default: true).
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.
credentials This property is required. TerraformCloudConnectorCredentials
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
url This property is required. String
delegateSelectors List<String>
Connect only using delegates with these tags.
description String
Description of the resource.
executeOnDelegate Boolean
Enable this flag to execute on delegate (default: true).
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.
credentials This property is required. TerraformCloudConnectorCredentials
identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
url This property is required. string
delegateSelectors string[]
Connect only using delegates with these tags.
description string
Description of the resource.
executeOnDelegate boolean
Enable this flag to execute on delegate (default: true).
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.
credentials This property is required. TerraformCloudConnectorCredentialsArgs
identifier
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the resource.
url This property is required. str
delegate_selectors Sequence[str]
Connect only using delegates with these tags.
description str
Description of the resource.
execute_on_delegate bool
Enable this flag to execute on delegate (default: true).
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.
credentials This property is required. Property Map
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
url This property is required. String
delegateSelectors List<String>
Connect only using delegates with these tags.
description String
Description of the resource.
executeOnDelegate Boolean
Enable this flag to execute on delegate (default: true).
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 TerraformCloudConnector 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 TerraformCloudConnector Resource

Get an existing TerraformCloudConnector 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?: TerraformCloudConnectorState, opts?: CustomResourceOptions): TerraformCloudConnector
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        credentials: Optional[TerraformCloudConnectorCredentialsArgs] = None,
        delegate_selectors: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        execute_on_delegate: Optional[bool] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        url: Optional[str] = None) -> TerraformCloudConnector
func GetTerraformCloudConnector(ctx *Context, name string, id IDInput, state *TerraformCloudConnectorState, opts ...ResourceOption) (*TerraformCloudConnector, error)
public static TerraformCloudConnector Get(string name, Input<string> id, TerraformCloudConnectorState? state, CustomResourceOptions? opts = null)
public static TerraformCloudConnector get(String name, Output<String> id, TerraformCloudConnectorState state, CustomResourceOptions options)
resources:  _:    type: harness:platform:TerraformCloudConnector    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Credentials TerraformCloudConnectorCredentials
DelegateSelectors List<string>
Connect only using delegates with these tags.
Description string
Description of the resource.
ExecuteOnDelegate bool
Enable this flag to execute on delegate (default: true).
Identifier Changes to this property will trigger replacement. 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.
Tags List<string>
Tags to associate with the resource.
Url string
Credentials TerraformCloudConnectorCredentialsArgs
DelegateSelectors []string
Connect only using delegates with these tags.
Description string
Description of the resource.
ExecuteOnDelegate bool
Enable this flag to execute on delegate (default: true).
Identifier Changes to this property will trigger replacement. 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.
Tags []string
Tags to associate with the resource.
Url string
credentials TerraformCloudConnectorCredentials
delegateSelectors List<String>
Connect only using delegates with these tags.
description String
Description of the resource.
executeOnDelegate Boolean
Enable this flag to execute on delegate (default: true).
identifier Changes to this property will trigger replacement. 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.
tags List<String>
Tags to associate with the resource.
url String
credentials TerraformCloudConnectorCredentials
delegateSelectors string[]
Connect only using delegates with these tags.
description string
Description of the resource.
executeOnDelegate boolean
Enable this flag to execute on delegate (default: true).
identifier Changes to this property will trigger replacement. 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.
tags string[]
Tags to associate with the resource.
url string
credentials TerraformCloudConnectorCredentialsArgs
delegate_selectors Sequence[str]
Connect only using delegates with these tags.
description str
Description of the resource.
execute_on_delegate bool
Enable this flag to execute on delegate (default: true).
identifier Changes to this property will trigger replacement. 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.
tags Sequence[str]
Tags to associate with the resource.
url str
credentials Property Map
delegateSelectors List<String>
Connect only using delegates with these tags.
description String
Description of the resource.
executeOnDelegate Boolean
Enable this flag to execute on delegate (default: true).
identifier Changes to this property will trigger replacement. 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.
tags List<String>
Tags to associate with the resource.
url String

Supporting Types

TerraformCloudConnectorCredentials
, TerraformCloudConnectorCredentialsArgs

ApiToken This property is required. TerraformCloudConnectorCredentialsApiToken
API token credentials to use for authentication.
ApiToken This property is required. TerraformCloudConnectorCredentialsApiToken
API token credentials to use for authentication.
apiToken This property is required. TerraformCloudConnectorCredentialsApiToken
API token credentials to use for authentication.
apiToken This property is required. TerraformCloudConnectorCredentialsApiToken
API token credentials to use for authentication.
api_token This property is required. TerraformCloudConnectorCredentialsApiToken
API token credentials to use for authentication.
apiToken This property is required. Property Map
API token credentials to use for authentication.

TerraformCloudConnectorCredentialsApiToken
, TerraformCloudConnectorCredentialsApiTokenArgs

ApiTokenRef This property is required. string
Reference to a secret containing the API token to use for authentication. 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}.
ApiTokenRef This property is required. string
Reference to a secret containing the API token to use for authentication. 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}.
apiTokenRef This property is required. String
Reference to a secret containing the API token to use for authentication. 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}.
apiTokenRef This property is required. string
Reference to a secret containing the API token to use for authentication. 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}.
api_token_ref This property is required. str
Reference to a secret containing the API token to use for authentication. 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}.
apiTokenRef This property is required. String
Reference to a secret containing the API token to use for authentication. 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 Terraform Cloud provider connector

$ pulumi import harness:platform/terraformCloudConnector:TerraformCloudConnector example <connector_id>
Copy

Import org level Terraform Cloud provider connector

$ pulumi import harness:platform/terraformCloudConnector:TerraformCloudConnector example <ord_id>/<connector_id>
Copy

Import project level Terraform Cloud provider connector

$ pulumi import harness:platform/terraformCloudConnector:TerraformCloudConnector example <org_id>/<project_id>/<connector_id>
Copy

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.