page_title | subcategory | description |
---|---|---|
zenml_service_connector Resource - terraform-provider-zenml |
Manages a ZenML service connector. |
Manages a ZenML service connector, which provides a way to connect to external services and resources.
resource "zenml_service_connector" "gcp_connector" {
name = "my-gcp-connector"
type = "gcp"
auth_method = "service-account"
workspace = "default"
configuration = {
project_id = "my-gcp-project"
service_account_json = jsonencode({
"type": "service-account",
"project_id": "my-gcp-project",
"private_key_id": "key-id",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"client_email": "[email protected]",
"client_id": "client-id",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token"
})
}
labels = {
environment = "production"
team = "ml-ops"
}
}
name
- (Required) The name of the service connector.type
- (Required, Forces new resource) The type of the service connector. Valid values include:aws
,gcp
,azure
, and others depending on your ZenML version. You can runzenml service-connector list-types
to get the list of available types or take a look at the ZenML documentation for more information.auth_method
- (Required, Forces new resource) The authentication method used by the connector. Valid values include:- AWS:
iam-role
,secret-key
,implicit
,sts-token
,session-token
orfederation-token
. Runzenml service-connector describe-type aws
or visit the AWS Service Connector ZenML documentation page for more information. - GCP:
service-account
,external-account
,user-account
,implicit
,oauth2-token
orimpersonation
. Runzenml service-connector describe-type gcp
or visit the GCP Service Connector ZenML documentation page for more information. - Azure:
service-principal
,access-token
orimplicit
. Runzenml service-connector describe-type azure
or visit the Azure Service Connector ZenML documentation page for more information. - Kubernetes:
password
ortoken
. Runzenml service-connector describe-type kubernetes
or visit the Kubernetes Service Connector ZenML documentation page for more information.
- AWS:
workspace
- (Optional) The workspace this connector belongs to. Defaults to "default". Forces new resource if changed.resource_type
- (Optional) A resource type this connector can be used for (e.g.,s3-bucket
,kubernetes-cluster
,docker-registry
). To find out which resource types are supported by a connector, runzenml service-connector describe-type <connector-type>
.configuration
- (Required, Sensitive) A map of configuration key-value pairs for the connector. Every authentication method has its own set of required and optional configuration parameters. To find out which parameters are required and optional for a given authentication method, runzenml service-connector describe-type <connector-type> -a <auth-method>
or visit the Service Connector ZenML documentation page for the connector type and authentication method for more information.labels
- (Optional) A map of labels to associate with the connector.
In addition to all arguments above, the following attributes are exported:
id
- The ID of the service connector.
Service connectors can be imported using the id
, e.g.
$ terraform import zenml_service_connector.example 12345678-1234-1234-1234-123456789012