harness.platform.GcpConnector
Explore with Pulumi AI
Resource for creating a Gcp connector.
Create GcpConnector Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GcpConnector(name: string, args: GcpConnectorArgs, opts?: CustomResourceOptions);
@overload
def GcpConnector(resource_name: str,
args: GcpConnectorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GcpConnector(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
description: Optional[str] = None,
execute_on_delegate: Optional[bool] = None,
force_delete: Optional[bool] = None,
inherit_from_delegates: Optional[Sequence[GcpConnectorInheritFromDelegateArgs]] = None,
manual: Optional[GcpConnectorManualArgs] = None,
name: Optional[str] = None,
oidc_authentications: Optional[Sequence[GcpConnectorOidcAuthenticationArgs]] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
func NewGcpConnector(ctx *Context, name string, args GcpConnectorArgs, opts ...ResourceOption) (*GcpConnector, error)
public GcpConnector(string name, GcpConnectorArgs args, CustomResourceOptions? opts = null)
public GcpConnector(String name, GcpConnectorArgs args)
public GcpConnector(String name, GcpConnectorArgs args, CustomResourceOptions options)
type: harness:platform:GcpConnector
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 GcpConnectorArgs
- 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 GcpConnectorArgs
- 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 GcpConnectorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GcpConnectorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GcpConnectorArgs
- 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 gcpConnectorResource = new Harness.Platform.GcpConnector("gcpConnectorResource", new()
{
Identifier = "string",
Description = "string",
ExecuteOnDelegate = false,
ForceDelete = false,
InheritFromDelegates = new[]
{
new Harness.Platform.Inputs.GcpConnectorInheritFromDelegateArgs
{
DelegateSelectors = new[]
{
"string",
},
},
},
Manual = new Harness.Platform.Inputs.GcpConnectorManualArgs
{
SecretKeyRef = "string",
DelegateSelectors = new[]
{
"string",
},
},
Name = "string",
OidcAuthentications = new[]
{
new Harness.Platform.Inputs.GcpConnectorOidcAuthenticationArgs
{
DelegateSelectors = new[]
{
"string",
},
GcpProjectId = "string",
ProviderId = "string",
ServiceAccountEmail = "string",
WorkloadPoolId = "string",
},
},
OrgId = "string",
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewGcpConnector(ctx, "gcpConnectorResource", &platform.GcpConnectorArgs{
Identifier: pulumi.String("string"),
Description: pulumi.String("string"),
ExecuteOnDelegate: pulumi.Bool(false),
ForceDelete: pulumi.Bool(false),
InheritFromDelegates: platform.GcpConnectorInheritFromDelegateArray{
&platform.GcpConnectorInheritFromDelegateArgs{
DelegateSelectors: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Manual: &platform.GcpConnectorManualArgs{
SecretKeyRef: pulumi.String("string"),
DelegateSelectors: pulumi.StringArray{
pulumi.String("string"),
},
},
Name: pulumi.String("string"),
OidcAuthentications: platform.GcpConnectorOidcAuthenticationArray{
&platform.GcpConnectorOidcAuthenticationArgs{
DelegateSelectors: pulumi.StringArray{
pulumi.String("string"),
},
GcpProjectId: pulumi.String("string"),
ProviderId: pulumi.String("string"),
ServiceAccountEmail: pulumi.String("string"),
WorkloadPoolId: pulumi.String("string"),
},
},
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var gcpConnectorResource = new GcpConnector("gcpConnectorResource", GcpConnectorArgs.builder()
.identifier("string")
.description("string")
.executeOnDelegate(false)
.forceDelete(false)
.inheritFromDelegates(GcpConnectorInheritFromDelegateArgs.builder()
.delegateSelectors("string")
.build())
.manual(GcpConnectorManualArgs.builder()
.secretKeyRef("string")
.delegateSelectors("string")
.build())
.name("string")
.oidcAuthentications(GcpConnectorOidcAuthenticationArgs.builder()
.delegateSelectors("string")
.gcpProjectId("string")
.providerId("string")
.serviceAccountEmail("string")
.workloadPoolId("string")
.build())
.orgId("string")
.projectId("string")
.tags("string")
.build());
gcp_connector_resource = harness.platform.GcpConnector("gcpConnectorResource",
identifier="string",
description="string",
execute_on_delegate=False,
force_delete=False,
inherit_from_delegates=[{
"delegate_selectors": ["string"],
}],
manual={
"secret_key_ref": "string",
"delegate_selectors": ["string"],
},
name="string",
oidc_authentications=[{
"delegate_selectors": ["string"],
"gcp_project_id": "string",
"provider_id": "string",
"service_account_email": "string",
"workload_pool_id": "string",
}],
org_id="string",
project_id="string",
tags=["string"])
const gcpConnectorResource = new harness.platform.GcpConnector("gcpConnectorResource", {
identifier: "string",
description: "string",
executeOnDelegate: false,
forceDelete: false,
inheritFromDelegates: [{
delegateSelectors: ["string"],
}],
manual: {
secretKeyRef: "string",
delegateSelectors: ["string"],
},
name: "string",
oidcAuthentications: [{
delegateSelectors: ["string"],
gcpProjectId: "string",
providerId: "string",
serviceAccountEmail: "string",
workloadPoolId: "string",
}],
orgId: "string",
projectId: "string",
tags: ["string"],
});
type: harness:platform:GcpConnector
properties:
description: string
executeOnDelegate: false
forceDelete: false
identifier: string
inheritFromDelegates:
- delegateSelectors:
- string
manual:
delegateSelectors:
- string
secretKeyRef: string
name: string
oidcAuthentications:
- delegateSelectors:
- string
gcpProjectId: string
providerId: string
serviceAccountEmail: string
workloadPoolId: string
orgId: string
projectId: string
tags:
- string
GcpConnector 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 GcpConnector resource accepts the following input properties:
- Identifier string
- Unique identifier of the resource.
- Description string
- Description of the resource.
- Execute
On boolDelegate - Enable this flag to execute on Delegate
- Force
Delete bool - Enable this flag for force deletion of connector
- Inherit
From List<GcpDelegates Connector Inherit From Delegate> - Inherit configuration from delegate.
- Manual
Gcp
Connector Manual - Manual credential configuration.
- Name string
- Name of the resource.
- Oidc
Authentications List<GcpConnector Oidc Authentication> - Authentication using harness oidc.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource.
- Description string
- Description of the resource.
- Execute
On boolDelegate - Enable this flag to execute on Delegate
- Force
Delete bool - Enable this flag for force deletion of connector
- Inherit
From []GcpDelegates Connector Inherit From Delegate Args - Inherit configuration from delegate.
- Manual
Gcp
Connector Manual Args - Manual credential configuration.
- Name string
- Name of the resource.
- Oidc
Authentications []GcpConnector Oidc Authentication Args - Authentication using harness oidc.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- description String
- Description of the resource.
- execute
On BooleanDelegate - Enable this flag to execute on Delegate
- force
Delete Boolean - Enable this flag for force deletion of connector
- inherit
From List<GcpDelegates Connector Inherit From Delegate> - Inherit configuration from delegate.
- manual
Gcp
Connector Manual - Manual credential configuration.
- name String
- Name of the resource.
- oidc
Authentications List<GcpConnector Oidc Authentication> - Authentication using harness oidc.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource.
- description string
- Description of the resource.
- execute
On booleanDelegate - Enable this flag to execute on Delegate
- force
Delete boolean - Enable this flag for force deletion of connector
- inherit
From GcpDelegates Connector Inherit From Delegate[] - Inherit configuration from delegate.
- manual
Gcp
Connector Manual - Manual credential configuration.
- name string
- Name of the resource.
- oidc
Authentications GcpConnector Oidc Authentication[] - Authentication using harness oidc.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- identifier str
- Unique identifier of the resource.
- description str
- Description of the resource.
- execute_
on_ booldelegate - Enable this flag to execute on Delegate
- force_
delete bool - Enable this flag for force deletion of connector
- inherit_
from_ Sequence[Gcpdelegates Connector Inherit From Delegate Args] - Inherit configuration from delegate.
- manual
Gcp
Connector Manual Args - Manual credential configuration.
- name str
- Name of the resource.
- oidc_
authentications Sequence[GcpConnector Oidc Authentication Args] - Authentication using harness oidc.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource.
- description String
- Description of the resource.
- execute
On BooleanDelegate - Enable this flag to execute on Delegate
- force
Delete Boolean - Enable this flag for force deletion of connector
- inherit
From List<Property Map>Delegates - Inherit configuration from delegate.
- manual Property Map
- Manual credential configuration.
- name String
- Name of the resource.
- oidc
Authentications List<Property Map> - Authentication using harness oidc.
- 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 GcpConnector 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 GcpConnector Resource
Get an existing GcpConnector 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?: GcpConnectorState, opts?: CustomResourceOptions): GcpConnector
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
execute_on_delegate: Optional[bool] = None,
force_delete: Optional[bool] = None,
identifier: Optional[str] = None,
inherit_from_delegates: Optional[Sequence[GcpConnectorInheritFromDelegateArgs]] = None,
manual: Optional[GcpConnectorManualArgs] = None,
name: Optional[str] = None,
oidc_authentications: Optional[Sequence[GcpConnectorOidcAuthenticationArgs]] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> GcpConnector
func GetGcpConnector(ctx *Context, name string, id IDInput, state *GcpConnectorState, opts ...ResourceOption) (*GcpConnector, error)
public static GcpConnector Get(string name, Input<string> id, GcpConnectorState? state, CustomResourceOptions? opts = null)
public static GcpConnector get(String name, Output<String> id, GcpConnectorState 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.
- Description string
- Description of the resource.
- Execute
On boolDelegate - Enable this flag to execute on Delegate
- Force
Delete bool - Enable this flag for force deletion of connector
- Identifier string
- Unique identifier of the resource.
- Inherit
From List<GcpDelegates Connector Inherit From Delegate> - Inherit configuration from delegate.
- Manual
Gcp
Connector Manual - Manual credential configuration.
- Name string
- Name of the resource.
- Oidc
Authentications List<GcpConnector Oidc Authentication> - Authentication using harness oidc.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- List<string>
- Tags to associate with the resource.
- Description string
- Description of the resource.
- Execute
On boolDelegate - Enable this flag to execute on Delegate
- Force
Delete bool - Enable this flag for force deletion of connector
- Identifier string
- Unique identifier of the resource.
- Inherit
From []GcpDelegates Connector Inherit From Delegate Args - Inherit configuration from delegate.
- Manual
Gcp
Connector Manual Args - Manual credential configuration.
- Name string
- Name of the resource.
- Oidc
Authentications []GcpConnector Oidc Authentication Args - Authentication using harness oidc.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- []string
- Tags to associate with the resource.
- description String
- Description of the resource.
- execute
On BooleanDelegate - Enable this flag to execute on Delegate
- force
Delete Boolean - Enable this flag for force deletion of connector
- identifier String
- Unique identifier of the resource.
- inherit
From List<GcpDelegates Connector Inherit From Delegate> - Inherit configuration from delegate.
- manual
Gcp
Connector Manual - Manual credential configuration.
- name String
- Name of the resource.
- oidc
Authentications List<GcpConnector Oidc Authentication> - Authentication using harness oidc.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
- description string
- Description of the resource.
- execute
On booleanDelegate - Enable this flag to execute on Delegate
- force
Delete boolean - Enable this flag for force deletion of connector
- identifier string
- Unique identifier of the resource.
- inherit
From GcpDelegates Connector Inherit From Delegate[] - Inherit configuration from delegate.
- manual
Gcp
Connector Manual - Manual credential configuration.
- name string
- Name of the resource.
- oidc
Authentications GcpConnector Oidc Authentication[] - Authentication using harness oidc.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- string[]
- Tags to associate with the resource.
- description str
- Description of the resource.
- execute_
on_ booldelegate - Enable this flag to execute on Delegate
- force_
delete bool - Enable this flag for force deletion of connector
- identifier str
- Unique identifier of the resource.
- inherit_
from_ Sequence[Gcpdelegates Connector Inherit From Delegate Args] - Inherit configuration from delegate.
- manual
Gcp
Connector Manual Args - Manual credential configuration.
- name str
- Name of the resource.
- oidc_
authentications Sequence[GcpConnector Oidc Authentication Args] - Authentication using harness oidc.
- org_
id str - Unique identifier of the organization.
- project_
id str - Unique identifier of the project.
- Sequence[str]
- Tags to associate with the resource.
- description String
- Description of the resource.
- execute
On BooleanDelegate - Enable this flag to execute on Delegate
- force
Delete Boolean - Enable this flag for force deletion of connector
- identifier String
- Unique identifier of the resource.
- inherit
From List<Property Map>Delegates - Inherit configuration from delegate.
- manual Property Map
- Manual credential configuration.
- name String
- Name of the resource.
- oidc
Authentications List<Property Map> - Authentication using harness oidc.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- List<String>
- Tags to associate with the resource.
Supporting Types
GcpConnectorInheritFromDelegate, GcpConnectorInheritFromDelegateArgs
- Delegate
Selectors List<string> - The delegates to inherit the credentials from.
- Delegate
Selectors []string - The delegates to inherit the credentials from.
- delegate
Selectors List<String> - The delegates to inherit the credentials from.
- delegate
Selectors string[] - The delegates to inherit the credentials from.
- delegate_
selectors Sequence[str] - The delegates to inherit the credentials from.
- delegate
Selectors List<String> - The delegates to inherit the credentials from.
GcpConnectorManual, GcpConnectorManualArgs
- Secret
Key stringRef - Reference to the Harness secret containing the secret key. 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}.
- Delegate
Selectors List<string> - The delegates to connect with.
- Secret
Key stringRef - Reference to the Harness secret containing the secret key. 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}.
- Delegate
Selectors []string - The delegates to connect with.
- secret
Key StringRef - Reference to the Harness secret containing the secret key. 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}.
- delegate
Selectors List<String> - The delegates to connect with.
- secret
Key stringRef - Reference to the Harness secret containing the secret key. 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}.
- delegate
Selectors string[] - The delegates to connect with.
- secret_
key_ strref - Reference to the Harness secret containing the secret key. 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}.
- delegate_
selectors Sequence[str] - The delegates to connect with.
- secret
Key StringRef - Reference to the Harness secret containing the secret key. 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}.
- delegate
Selectors List<String> - The delegates to connect with.
GcpConnectorOidcAuthentication, GcpConnectorOidcAuthenticationArgs
- Delegate
Selectors List<string> - The delegates to inherit the credentials from.
- Gcp
Project stringId - The project number of the GCP project that is used to create the workload identity.
- Provider
Id string - The OIDC provider ID value configured in GCP.
- Service
Account stringEmail - The service account linked to workload identity pool while setting GCP workload identity provider.
- Workload
Pool stringId - The workload pool ID value created in GCP.
- Delegate
Selectors []string - The delegates to inherit the credentials from.
- Gcp
Project stringId - The project number of the GCP project that is used to create the workload identity.
- Provider
Id string - The OIDC provider ID value configured in GCP.
- Service
Account stringEmail - The service account linked to workload identity pool while setting GCP workload identity provider.
- Workload
Pool stringId - The workload pool ID value created in GCP.
- delegate
Selectors List<String> - The delegates to inherit the credentials from.
- gcp
Project StringId - The project number of the GCP project that is used to create the workload identity.
- provider
Id String - The OIDC provider ID value configured in GCP.
- service
Account StringEmail - The service account linked to workload identity pool while setting GCP workload identity provider.
- workload
Pool StringId - The workload pool ID value created in GCP.
- delegate
Selectors string[] - The delegates to inherit the credentials from.
- gcp
Project stringId - The project number of the GCP project that is used to create the workload identity.
- provider
Id string - The OIDC provider ID value configured in GCP.
- service
Account stringEmail - The service account linked to workload identity pool while setting GCP workload identity provider.
- workload
Pool stringId - The workload pool ID value created in GCP.
- delegate_
selectors Sequence[str] - The delegates to inherit the credentials from.
- gcp_
project_ strid - The project number of the GCP project that is used to create the workload identity.
- provider_
id str - The OIDC provider ID value configured in GCP.
- service_
account_ stremail - The service account linked to workload identity pool while setting GCP workload identity provider.
- workload_
pool_ strid - The workload pool ID value created in GCP.
- delegate
Selectors List<String> - The delegates to inherit the credentials from.
- gcp
Project StringId - The project number of the GCP project that is used to create the workload identity.
- provider
Id String - The OIDC provider ID value configured in GCP.
- service
Account StringEmail - The service account linked to workload identity pool while setting GCP workload identity provider.
- workload
Pool StringId - The workload pool ID value created in GCP.
Import
Import account level gcp connector
$ pulumi import harness:platform/gcpConnector:GcpConnector example <connector_id>
Import org level gcp connector
$ pulumi import harness:platform/gcpConnector:GcpConnector example <ord_id>/<connector_id>
Import project level gcp connector
$ pulumi import harness:platform/gcpConnector:GcpConnector 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.