Skip to content

seqeralabs/terraform-provider-seqera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

174 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seqera Platform Terraform Provider

[!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.

Summary

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.

Table of Contents

Installation

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
}

Authentication

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.

Available Resources and Data Sources

Managed Resources

Data Sources

Examples

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.

Cloud Platform Examples

Getting Started with Examples

  1. Choose your cloud platform from examples/terraform-examples/aws/, examples/terraform-examples/azure/, or examples/terraform-examples/gcp/
  2. Copy the example tfvars: cp terraform.tfvars.example terraform.tfvars
  3. Configure your credentials and settings in terraform.tfvars
  4. Amend any variable/resource names or values ,ensure you update your organization name as that has to be unique.
  5. Initialize Terraform: terraform init
  6. Review the plan: terraform plan
  7. Apply when ready: terraform apply

Each example includes detailed variable descriptions and validation rules to help you configure the resources correctly for your environment.

Testing the provider locally

Local Provider

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 apply

Compiled Provider

Terraform 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.

  1. Execute go build to construct a binary called terraform-provider-seqera
  2. Ensure that the .terraformrc file is configured with a dev_overrides section 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 {}
}

Development

Contributions

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.

SDK Created by Speakeasy

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages