[!NOTE] > Public Preview - This provider is currently in public preview.
We'd love your feedback! Please test the provider with your use cases and report any issues you encounter. Your input will help us build a better stable release.
[!IMPORTANT] > Built for Seqera Organizations — This provider targets admins managing shared resources within a Seqera organization. Personal-workspace use isn't part of our supported scope and some resources will not work in that context.
[!CAUTION] > Deprecated Resources - Resources marked as deprecated should be avoided in new configurations, as they will be removed in the future release. Please migrate to their recommended replacements.
Terraform Provider for the Seqera Platform API.
Seqera API: The Seqera Platform Terraform Provider enables infrastructure-as-code management of Seqera Platform resources. This provider allows you to programmatically create, configure, and manage organizations, workspaces, compute environments, pipelines, credentials, and other Seqera Platform components using Terraform.
To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init.
terraform {
required_providers {
seqera = {
source = "seqeralabs/seqera"
version = "0.40.0-RC4"
}
}
}
provider "seqera" {
server_url = "..." # Optional
}This provider supports authentication configuration via environment variables and provider configuration.
The configuration precedence is:
- Provider configuration
- Environment variables
Available configuration:
| Provider Attribute | Description |
|---|---|
bearer_auth |
HTTP Bearer. Configurable via environment variable TOWER_ACCESS_TOKEN. |
- seqera_aws_batch_ce
- seqera_aws_compute_env
- seqera_aws_credential
- seqera_action
- seqera_aws_cloud_ce
- seqera_azure_batch_ce
- seqera_azure_cloud_ce
- seqera_azure_cloud_credential
- seqera_azure_credential
- seqera_azure_entra_credential
- seqera_bitbucket_credential
- seqera_codecommit_credential
- seqera_compute_env
- seqera_container_registry_credential
- seqera_credential
- seqera_custom_role
- seqera_data_link
- seqera_datasets
- seqera_gcp_batch_ce
- seqera_gcp_cloud_ce
- seqera_gitea_credential
- seqera_github_credential
- seqera_gitlab_credential
- seqera_google_credential
- seqera_kubernetes_credential
- seqera_labels
- seqera_managed_compute_ce
- seqera_orgs
- seqera_pipeline
- seqera_pipeline_secret
- seqera_primary_compute_env
- seqera_ssh_credential
- seqera_studios
- seqera_teams
- seqera_tokens
- seqera_tower_agent_credential
- seqera_workflows
- seqera_workspace
The examples/terraform-examples directory contains comprehensive Terraform configurations demonstrating how to use the Seqera Platform provider across different cloud platforms. Each example includes a complete setup from organization to running nf-core/rnaseq.
- AWS Example (
examples/terraform-examples/aws/) - Complete AWS Batch setup with nf-core/rnaseq pipeline - Azure Example (
examples/terraform-examples/azure/) - Complete Azure Batch setup with nf-core/rnaseq pipeline - GCP Example (
examples/terraform-examples/gcp/) - Complete Google Batch setup with genomics-optimized instances
- Choose your cloud platform from
examples/terraform-examples/aws/,examples/terraform-examples/azure/, orexamples/terraform-examples/gcp/ - Copy the example tfvars:
cp terraform.tfvars.example terraform.tfvars - Configure your credentials and settings in
terraform.tfvars - Amend any variable/resource names or values ,ensure you update your organization name as that has to be unique.
- Initialize Terraform:
terraform init - Review the plan:
terraform plan - Apply when ready:
terraform apply
Each example includes detailed variable descriptions and validation rules to help you configure the resources correctly for your environment.
Should you want to validate a change locally, the --debug flag allows you to execute the provider against a terraform instance locally.
This also allows for debuggers (e.g. delve) to be attached to the provider.
go run main.go --debug
# Copy the TF_REATTACH_PROVIDERS env var
# In a new terminal
cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform applyTerraform allows you to use local provider builds by setting a dev_overrides block in a configuration file called .terraformrc. This block overrides all other configured installation methods.
- Execute
go buildto construct a binary calledterraform-provider-seqera - Ensure that the
.terraformrcfile is configured with adev_overridessection such that your local copy of terraform can see the provider binary
Terraform searches for the .terraformrc file in your home directory and applies any configuration settings you set.
provider_installation {
dev_overrides {
"registry.terraform.io/seqeralabs/seqera" = "<PATH>"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
While we value open-source contributions to this terraform provider, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.