{"id":42486109,"url":"https://github.com/eclipse-xpanse/terra-boot","last_synced_at":"2026-01-28T11:28:28.572Z","repository":{"id":187165558,"uuid":"676032325","full_name":"eclipse-xpanse/terra-boot","owner":"eclipse-xpanse","description":"RESTful APIs for executing Terraform commands. ","archived":false,"fork":false,"pushed_at":"2025-05-23T10:22:33.000Z","size":608,"stargazers_count":4,"open_issues_count":6,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-23T13:13:35.543Z","etag":null,"topics":["rest-api","spring-boot","terraform"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eclipse-xpanse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-08T09:25:03.000Z","updated_at":"2025-05-23T10:22:31.000Z","dependencies_parsed_at":"2023-08-09T08:15:10.377Z","dependency_job_id":"de8537c2-a559-4a1c-94e4-05a022b1a961","html_url":"https://github.com/eclipse-xpanse/terra-boot","commit_stats":null,"previous_names":["eclipse-xpanse/terraform-boot","eclipse-xpanse/terra-boot"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-xpanse/terra-boot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xpanse%2Fterra-boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xpanse%2Fterra-boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xpanse%2Fterra-boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xpanse%2Fterra-boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-xpanse","download_url":"https://codeload.github.com/eclipse-xpanse/terra-boot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xpanse%2Fterra-boot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rest-api","spring-boot","terraform"],"created_at":"2026-01-28T11:28:27.968Z","updated_at":"2026-01-28T11:28:28.567Z","avatar_url":"https://github.com/eclipse-xpanse.png","language":"Java","readme":"\u003cp align='center'\u003e\n\u003ca href=\"https://github.com/eclipse-xpanse/terra-boot/actions/workflows/ci.yml\" target=\"_blank\"\u003e\n\t\u003cimg src=\"https://github.com/eclipse-xpanse/terra-boot/actions/workflows/ci.yml/badge.svg\" alt=\"build\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://opensource.org/licenses/Apache-2.0\" target=\"_blank\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"coverage\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n# terra-boot\n\nA spring-boot-based project which aims to provide a RESTful API for Terraform CLI. It provides three different modes of\nexecution\n\n1. Scripts in a directory\n2. Scripts in REST request body\n3. Scripts in a GIT repo\n\n## Modes of Terraform Script Execution\n\n### Scripts in a Directory\n\nPass the terraform root folder name in the request and terra-boot will execute the requested Terraform method on\nthis directory.\n\n#### Terraform Root module Folder\n\nIf we intend to use this mode of script execution, then we must ensure the scripts root directory is\naccessible to terra-boot runtime.\n\nThe `terra-boot` application must have access to the root module folder under which each sub-folder is a module\nused per API request.\n\nThe default root folder where all module sub-folders will exist is the **temp** folder of the user running the server.\n\nThis configuration can be changed by updating the `terraform.root.module.directory` property.\n\n### Scripts in the Request Body\n\nAll files needed for terraform execution can be passed as strings to API and terra-boot will automatically execute\nthe files and return terraform execution result.\n\n### Scripts in GIT Repo\n\nIf the scripts are present in a GIT repo, then we can directly pass the details of the GIT repo. Terra-boot will\nclone the repo and execute the scripts and then return the result.\n\n\u003e [!NOTE]\n\u003e Currently supports only repos that can be cloned without authentication and also with HTTP(S) only.\n\n\n## Supported API Methods\n\n* deploy - This wraps the Terraform `plan` and `apply` methods.\n* destroy - This wraps the Terraform `destroy` method.\n* validate - This wraps the Terraform `validate` method.\n* plan - This wraps the Terraform 'plan' method.\n* healthCheck - This method returns the status of the terra-boot application\n\n\u003e [!NOTE]\n\u003e All terraform related methods above support both modes of operation mentioned in\n\u003e section [Modes of Terraform Script Execution](#modes-of-terraform-script-execution)\n\n## Supported Authentication Methods\n\n1. None - By default the API methods can be accessed without any authentication.\n2. oauth - This can be enabled by activating spring profile - `oauth`\n\n## Available Configurations\n\nThe below property names can be changed in the following ways\n\n1. passing the property values to the server startup command as ``--${property-name}=${property-value}``\n2. Setting corresponding environment variables before starting the server.\n\n| property name                              | environment variable                       | default value                                    | description                                                                                                                                   |\n|--------------------------------------------|--------------------------------------------|--------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| terraform_binary_path                      | TERRAFORM_BINARY_PATH                      | Terraform available on syspath                   | The path to the terraform binary                                                                                                              |\n| terraform.root.module.directory            | TERRAFORM_ROOT_MODULE_DIRECTORY            | /tmp on Linux\u003cbr/\u003e\\AppData\\Local\\Temp on Windows | The path to the parent directory where all terraform module directories will be stored at as subdirs                                          |\n| log.terraform.stdout.stderr                | LOG_TERRAFORM_STDOUT_STDERR                | true                                             | Controls if the command execution output must be logged. If disabled, the output is only returned in the API response                         |\n| terraform.log.level                        | TERRAFORM_LOG_LEVEL                        | INFO                                             | Controls the log level of the terraform binary. Allowed values are INFO, DEBUG, TRACE, WARN and ERROR                                         |\n| authorization.token.type                   | AUTHORIZATION_TOKEN_TYPE                   | JWT                                              | Authorization server authentication Type, allowed values: OpaqueToken or JWT                                                                  |\n| authorization.server.endpoint              | AUTHORIZATION_SERVER_ENDPOINT              |                                                  | The endpoint value of the authorization server                                                                                                |\n| authorization.api.client.id                | AUTHORIZATION_API_CLIENT_ID                |                                                  | The ID value of the authorization server API client                                                                                           |\n| authorization.api.client.secret            | AUTHORIZATION_API_CLIENT_SECRET            |                                                  | The secret value of the authorization server API client                                                                                       |\n| authorization.swagger.ui.client.id         | AUTHORIZATION_SWAGGER_UI_CLIENT_ID         |                                                  | The ID value of the authorization server swagger-ui client                                                                                    |\n| otel.exporter.otlp.endpoint                | OTEL_EXPORTER_OTLP_ENDPOINT                | http://localhost:4317                            | URL of the OTEL collector                                                                                                                     |\n| clean.workspace.after.deployment.enabled   | CLEAN_WORKSPACE_AFTER_DEPLOYMENT_ENABLED   | true                                             | Whether to clean up the workspace after deployment is done,allowed values: true or false. Default value is true                               |\n| terra.boot.webhook.request.signing.enabled | TERRA_BOOT_WEBHOOK_REQUEST_SIGNING_ENABLED | true                                             | Whether to sign webhook requests initiated from terra-boot. The values must be agreed with the consumer application. Default value is true    |\n\n\n\n## Run Application\n\n### Local Development\n\nServer can be compiled and started as below\n\nIf you have a fully configured OAuth instance running on your local system, then you can use the below way to\nstart the application. The variables and their descriptions that need to be passed during oauth startup are recorded in\nthe Available Configurations table.\n\n### dev profile\n\nUse the spring boot's dev profile to use default values that are just for non-production environments.\n\n#### From Command Line\n\n1. Start with oauth profile\n\n```shell\n./mvmw clean install -DskipTests\n$ java -jar target/terra-boot-*.jar\\\n--spring.profiles.active=oauth,dev \\\n--authorization.token.type=${token-type} \\\n--authorization.server.endpoint=${server-endpoint} \\\n--authorization.api.client.id=${client-id} \\\n--authorization.api.client.secret=${client-secret} \\\n--authorization.swagger.ui.client.id=${swagger-ui-cleint-id}\n```\n\n2.Start without oauth\n\n```shell\n./mvmw clean install -DskipTests\n$ java -jar --spring.profiles.active=dev target/terra-boot-*.jar\n```\n\n#### From IDE\n\n1.Start with oauth\n\n\t1.Set values for the authorization related variables in the application-oauth-properties configuration file,\n\tand specify the configuration file for loading oauth in the application-properties configuration file,\n\tstart the main application.\n\t2.Or the oauth related variables configuration can be added to IDE and the main application can be executed directly\n\tto launch the application.\n\n2.Start without oauth\n\n\tSimply start the main application.\n\nAPI can be accessed using the following URLs\n\n```html\nhttp://localhost:9090\nhttp://localhost:9090/swagger-ui/index.html\n```\n\n### AMQP support\n#### Start AMQP Broker\n\nUse RabbitMQ as the default provider for AMQP. Start the broker and create queues using the following command:\n\n```shell\nmkdir -p ~/docker/rabbitmq/data\ndocker run -d \\\n--user 1000:1000 \\\n--name xpanse-rabbitmq \\\n-p 5672:5672 \\\n-p 15672:15672 \\\n-v ~/docker/rabbitmq/data:/var/lib/rabbitmq \\\n-e RABBITMQ_DEFAULT_USER=xpanse \\\n-e RABBITMQ_DEFAULT_PASS=Xpanse@2023 \\\nrabbitmq:4.0.7-management\n```\nAccess the RabbitMQ management console at http://localhost:15672 with username `xpanse` and password `Xpanse@2023` after the container is started.\n\n#### Enable AMQP\nStart the application with the `amqp` profile.\n\n```shell\n./mvmw clean install -DskipTests\n$ java -jar --spring.profiles.active=dev,amqp target/terra-boot-*.jar\n```\n\n#### AsyncApi Docs and UI\n\nWhen the application started with the `amqp` profile, the AsyncApi docs and UI Console are enabled.\nThe AsyncApi docs can be accessed at http://localhost:9090/queues/docs.\nThe AsyncApi UI can be accessed at http://localhost:9090/queues/asyncapi-ui.html.\n\n### Production\n\n#### Docker Image\n\nThis is the recommended way. Docker images can be pulled from GitHub Packages as\nmentioned [here](https://github.com/eclipse-xpanse/terra-boot/pkgs/container/terra-boot).\nAll configuration parameters can be passed as environment variables to the container.\n\n#### Run Jar\n\nWe also deliver a jar for each release and can be found in the asests list of each\nrelease [here](https://github.com/eclipse-xpanse/terra-boot/releases).\nThe jar can be started as mentioned in the same way we do for local development.\n\n### Observability\n\n`terra-boot` provides an option to enable observability using [openTelemetry](https://opentelemetry.io/). This can\nbe enabled by starting the runtime with profile `opentelemetry`.\n\nBy enabling this profile, the application forwards metrics, traces and logs to the `otel-collector`.\n\nBy default, the application sends all telemetry data to `http://localhost:4317` and this can be changed by updating the\nvalue of `otel.exporter.otlp.endpoint` configuration property.\n\n## Dependencies File\n\nAll third-party related content is listed in the [DEPENDENCIES](DEPENDENCIES) file.\n\n## Code Formatter\n\nThe project follows [google-code-format](https://github.com/google/google-java-format).\nWe use the [spotless plugin](https://github.com/diffplug/spotless/tree/main/plugin-maven#google-java-format) to format code and to validate code format.\nWe can automatically format the code using the command below.\n\n```shell\nmvn spotless:apply\n```\n\nTo validate errors we can run the command below.\n\n```shell\nmvn spotless:check \u0026\u0026  mvn checkstyle:check\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xpanse%2Fterra-boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-xpanse%2Fterra-boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xpanse%2Fterra-boot/lists"}