tharsis-api

module
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2024 License: MPL-2.0

README

Tharsis API

Tharsis is a remote Terraform backend that provides state management and a full execution environment for running Terraform modules. It also includes additional capabilities to facilitate the management of Terraform workspaces within an organization.

  • Configurable job executor plugin.
  • Machine to Machine (M2M) authentication with service accounts.
  • Managed identity support to securely authenticate with cloud providers (no credential storage).
  • Users are not required to handle secrets.
  • Compatible with the Terraform CLI remote backend.
  • Ability to quickly cancel jobs.
  • Support for uploading and downloading Terraform modules.
  • Capable of being deployed as a Docker image.

Get started

Instructions on building a binary from source can be found here.

Installing locally (Requires Docker)

In order to use Tharsis locally, a docker-compose.yml file is available under the docker-compose directory. The use of this requires the installation of Docker. Learn more here.

1. Clone the repository and change to 'docker-compose' directory.
2. Use 'docker compose up' command to launch Tharsis using Docker. We could additionally, pass in a `-d` flag to the command to launch everything in the background like so 'docker compose up -d'.

At this point, Docker should begin pulling down all the images needed to provision Tharsis. Once this is complete, the Tharsis UI will be available at http://localhost:3000/.

Now, the Tharsis CLI can be used to interact with Tharsis. To configure the CLI, use the following command to create a profile and sign in using the KeyCloak identity provider (IDP):

tharsis configure --profile local --endpoint-url http://localhost:6560
tharsis -p local sso login

At the KeyCloak login screen use martian for both the username and password to complete authentication.

Congratulations! The Tharsis CLI is now ready to issue commands, use the -h flag for more info!

Running Tharsis API from local source

In order to run Tharsis API from local source we suggest you do the following:

1. Stop the tharsis-api docker container if it is running.
2. Copy the `env.example` file in the root folder and paste it as `.env`.
3. Open the Tharsis API folder in Visual Studio Code.
4. Install the recommended extensions.
5. Click the `Run and Debug` menu on the left hand side of Visual Studio Code.
6. Click the Start Debugging button next to Launch API.

At this point you can interact with the Tharsis UI at http://localhost:3000/ and it will be communicating with your local Tharsis API.

Documentation

Security

If you've discovered a security vulnerability in the Tharsis API, please let us know by creating a confidential issue in this project.

Statement of support

Please submit any bugs or feature requests for Tharsis. Of course, MR's are even better. :)

License

Tharsis API is distributed under Mozilla Public License v2.0.

Directories

Path Synopsis
cmd
apiserver
Package main package
Package main package
job
Package main package
Package main package
runner
Package main package
Package main package
internal
ansi
Package ansi contains ANSI color constants for coloring log output
Package ansi contains ANSI color constants for coloring log output
api
Package api package
Package api package
api/controllers
Package controllers package
Package controllers package
api/controllers/tfe
Package tfe package
Package tfe package
api/graphql
Package graphql package
Package graphql package
api/graphql/loader
Package loader package
Package loader package
api/graphql/resolver
Package resolver package
Package resolver package
api/graphql/schema
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
Package schema contains all of the Schema Definition Files (abbreviated SDL) which define this API.
api/middleware
Package middleware package
Package middleware package
api/response
Package response providers support for returning http responses
Package response providers support for returning http responses
apiserver
Package apiserver is used to initialize the api
Package apiserver is used to initialize the api
apiserver/config
Package config package
Package config package
asynctask
Package asynctask package
Package asynctask package
auth
Package auth package
Package auth package
auth/permissions
Package permissions contains the permission sets and other related functionalities that dictate the level of access a subject has to a Tharsis resource.
Package permissions contains the permission sets and other related functionalities that dictate the level of access a subject has to a Tharsis resource.
db
Package db package
Package db package
events
Package events package
Package events package
gid
Package gid package
Package gid package
http
Package http package
Package http package
jobexecutor
Package jobexecutor package
Package jobexecutor package
jobexecutor/jobclient
Package jobclient package
Package jobclient package
jobexecutor/joblogger
Package joblogger is used to handle job logs
Package joblogger is used to handle job logs
jobexecutor/managedidentity
Package managedidentity package
Package managedidentity package
jobexecutor/managedidentity/awsfederated
Package awsfederated package
Package awsfederated package
jobexecutor/managedidentity/azurefederated
Package azurefederated package
Package azurefederated package
jobexecutor/managedidentity/tharsisfederated
Package tharsisfederated package
Package tharsisfederated package
limits
Package limits package
Package limits package
logstream
Package logstream provides functionality for saving and retrieving logs
Package logstream provides functionality for saving and retrieving logs
maintenance
Package maintenance provides the maintenance mode monitor
Package maintenance provides the maintenance mode monitor
metric
Package metric package
Package metric package
models
Package models package
Package models package
module
Package module package
Package module package
plan
Package plan contains the logic for parsing a Terraform plan into a normalized diff
Package plan contains the logic for parsing a Terraform plan into a normalized diff
plan/action
Package action provider action constants and utilities.
Package action provider action constants and utilities.
plan/collections
Package collections provides utilities for working with collections inside of plan
Package collections provides utilities for working with collections inside of plan
plan/computed
Package computed contains types that represent the computed diffs for Terraform blocks, attributes, and outputs.
Package computed contains types that represent the computed diffs for Terraform blocks, attributes, and outputs.
plan/computed/node
Package node provides the rendered node types
Package node provides the rendered node types
plan/computed/renderers
Package renderers provides the rendering logic for computed diffs
Package renderers provides the rendering logic for computed diffs
plan/differ
Package differ provides the logic for converting a changed into a computed diff
Package differ provides the logic for converting a changed into a computed diff
plan/jsondiff
Package jsondiff provides utilities for working with JSON types
Package jsondiff provides utilities for working with JSON types
plan/structured
Package structured contains the structured representation of the JSON changes returned by the tjson package.
Package structured contains the structured representation of the JSON changes returned by the tjson package.
plan/structured/attributepath
Package attributepath provides a way to match paths for replace and sensitive attributes
Package attributepath provides a way to match paths for replace and sensitive attributes
plan/visitor
Package visitor provides a visitor pattern for traversing the plan and rendering the hcl diff
Package visitor provides a visitor pattern for traversing the plan and rendering the hcl diff
plugin
Package plugin package
Package plugin package
plugin/ratelimitstore
Package ratelimitstore package
Package ratelimitstore package
runner
Package runner package
Package runner package
runner/jobdispatcher
Package jobdispatcher package
Package jobdispatcher package
runner/jobdispatcher/docker
Package docker package
Package docker package
runner/jobdispatcher/ecs
Package ecs package
Package ecs package
runner/jobdispatcher/kubernetes
Package kubernetes package
Package kubernetes package
runner/jobdispatcher/kubernetes/configurer
Package configurer package
Package configurer package
Package eks package
runner/jobdispatcher/local
Package local package
Package local package
semver
Package semver package
Package semver package
services/activityevent
Package activityevent package
Package activityevent package
services/cli
Package cli package
Package cli package
services/gpgkey
Package gpgkey package
Package gpgkey package
services/group
Package group package
Package group package
services/job
Package job package
Package job package
services/maintenance
Package maintenance contains the service for enabling/disabling maintenance mode
Package maintenance contains the service for enabling/disabling maintenance mode
services/managedidentity
Package managedidentity package
Package managedidentity package
services/managedidentity/awsfederated
Package awsfederated package
Package awsfederated package
services/managedidentity/azurefederated
Package azurefederated package
Package azurefederated package
services/managedidentity/tharsisfederated
Package tharsisfederated package
Package tharsisfederated package
services/moduleregistry
Package moduleregistry package
Package moduleregistry package
services/namespacemembership
Package namespacemembership package
Package namespacemembership package
services/providermirror
Package providermirror implements the Terraform's Provider Network Mirror Protocol.
Package providermirror implements the Terraform's Provider Network Mirror Protocol.
services/providerregistry
Package providerregistry package
Package providerregistry package
services/resourcelimit
Package resourcelimit package
Package resourcelimit package
services/role
Package role implements the service layer functionality related to Tharsis roles.
Package role implements the service layer functionality related to Tharsis roles.
services/run
Package run package
Package run package
services/run/registry/addrs
Package addrs package
Package addrs package
services/run/registry/getmodules
Package getmodules package
Package getmodules package
services/run/rules
Package rules package
Package rules package
services/run/state
Package state package
Package state package
services/runner
Package runner package
Package runner package
services/scim
Package scim package
Package scim package
services/serviceaccount
Package serviceaccount package
Package serviceaccount package
services/team
Package team package
Package team package
services/user
Package user package
Package user package
services/variable
Package variable package
Package variable package
services/vcs
Package vcs package
Package vcs package
services/vcs/github
Package github package
Package github package
services/vcs/gitlab
Package gitlab package
Package gitlab package
services/vcs/types
Package types package
Package types package
services/workspace
Package workspace package
Package workspace package
tfe
Package tfe package
Package tfe package
tracing
Package tracing package
Package tracing package
pkg
errors
Package errors provides an interface for all errors returned from Tharsis.
Package errors provides an interface for all errors returned from Tharsis.
jws
Package jws package
Package jws package
jws/awskms
Package awskms package
Package awskms package
jws/memory
Package memory package
Package memory package
logger
Package logger provides context-aware and structured logging capabilities.
Package logger provides context-aware and structured logging capabilities.
objectstore
Package objectstore package
Package objectstore package
objectstore/aws
Package aws package
Package aws package
pagination
Package pagination provides functionalities related to cursor-based pagination.
Package pagination provides functionalities related to cursor-based pagination.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL