{"id":32115326,"url":"https://github.com/deliveredtechnologies/terraform-maven","last_synced_at":"2025-10-20T15:54:09.876Z","repository":{"id":38847354,"uuid":"182813463","full_name":"deliveredtechnologies/terraform-maven","owner":"deliveredtechnologies","description":"Terraform Maven Plugin","archived":false,"fork":false,"pushed_at":"2025-10-05T07:00:51.000Z","size":711,"stargazers_count":43,"open_issues_count":52,"forks_count":13,"subscribers_count":11,"default_branch":"develop","last_synced_at":"2025-10-20T15:53:49.627Z","etag":null,"topics":["cloud","cloud-computing","iac","maven","maven-plugin","terraform"],"latest_commit_sha":null,"homepage":null,"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/deliveredtechnologies.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-22T15:16:15.000Z","updated_at":"2025-08-28T14:18:44.000Z","dependencies_parsed_at":"2023-01-19T16:46:47.448Z","dependency_job_id":"f843c5fc-ea0e-4f4f-aa3d-fe482c987cbf","html_url":"https://github.com/deliveredtechnologies/terraform-maven","commit_stats":{"total_commits":132,"total_committers":9,"mean_commits":"14.666666666666666","dds":0.3939393939393939,"last_synced_commit":"a95f18a0bb483d68da59208d39c3a1766d8157fc"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/deliveredtechnologies/terraform-maven","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deliveredtechnologies%2Fterraform-maven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deliveredtechnologies%2Fterraform-maven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deliveredtechnologies%2Fterraform-maven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deliveredtechnologies%2Fterraform-maven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deliveredtechnologies","download_url":"https://codeload.github.com/deliveredtechnologies/terraform-maven/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deliveredtechnologies%2Fterraform-maven/sbom","scorecard":{"id":333131,"data":{"date":"2025-08-11","repo":{"name":"github.com/deliveredtechnologies/terraform-maven","commit":"a95f18a0bb483d68da59208d39c3a1766d8157fc"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":7,"reason":"Found 23/29 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: tf-build-tools/.mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"76 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-3x8x-79m2-3w2w","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-7r82-7xv7-xcpj","Warn: Project is vulnerable to: GHSA-rcjj-h6gh-jf3r","Warn: Project is vulnerable to: GHSA-264p-99wq-f4j6","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-6phf-73q6-gh87","Warn: Project is vulnerable to: GHSA-wxr5-93ph-8wr9","Warn: Project is vulnerable to: GHSA-6pcc-3rfx-4gpm","Warn: Project is vulnerable to: GHSA-hwj3-m3p6-hj38","Warn: Project is vulnerable to: GHSA-4265-ccf5-phj5","Warn: Project is vulnerable to: GHSA-4g9r-vxhx-9pgx","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-59j4-wjwp-mw9m","Warn: Project is vulnerable to: GHSA-fh63-4r66-jc7v","Warn: Project is vulnerable to: GHSA-wh3p-fphp-9h2m","Warn: Project is vulnerable to: GHSA-8wh2-6qhj-h7j9","Warn: Project is vulnerable to: GHSA-288c-cq4h-88gq","Warn: Project is vulnerable to: GHSA-4gq5-ch57-c2mg","Warn: Project is vulnerable to: GHSA-4w82-r329-3q67","Warn: Project is vulnerable to: GHSA-5949-rw7g-wx7w","Warn: Project is vulnerable to: GHSA-5r5r-6hpj-8gg9","Warn: Project is vulnerable to: GHSA-5ww9-j83m-q7qx","Warn: Project is vulnerable to: GHSA-645p-88qh-w398","Warn: Project is vulnerable to: GHSA-6fpp-rgj9-8rwc","Warn: Project is vulnerable to: GHSA-6wqp-v4v6-c87c","Warn: Project is vulnerable to: GHSA-85cw-hj65-qqv9","Warn: Project is vulnerable to: GHSA-89qr-369f-5m5x","Warn: Project is vulnerable to: GHSA-8c4j-34r4-xr8g","Warn: Project is vulnerable to: GHSA-8w26-6f25-cm9x","Warn: Project is vulnerable to: GHSA-9gph-22xh-8x98","Warn: Project is vulnerable to: GHSA-9m6f-7xcq-8vf8","Warn: Project is vulnerable to: GHSA-9mxf-g3x6-wv74","Warn: Project is vulnerable to: GHSA-c8hm-7hpq-7jhg","Warn: Project is vulnerable to: GHSA-cf6r-3wgc-h863","Warn: Project is vulnerable to: GHSA-cggj-fvv3-cqwv","Warn: Project is vulnerable to: GHSA-cjjf-94ff-43w7","Warn: Project is vulnerable to: GHSA-cmfg-87vq-g5g4","Warn: Project is vulnerable to: GHSA-cvm9-fjm9-3572","Warn: Project is vulnerable to: GHSA-f3j5-rmmp-3fc5","Warn: Project is vulnerable to: GHSA-f9hv-mg5h-xcw9","Warn: Project is vulnerable to: GHSA-f9xh-2qgp-cq57","Warn: Project is vulnerable to: GHSA-fmmc-742q-jg75","Warn: Project is vulnerable to: GHSA-fqwf-pjwf-7vqv","Warn: Project is vulnerable to: GHSA-gjmw-vf9h-g25v","Warn: Project is vulnerable to: GHSA-gwp4-hfv6-p7hw","Warn: Project is vulnerable to: GHSA-gww7-p5w4-wrfv","Warn: Project is vulnerable to: GHSA-h3cw-g4mq-c5x2","Warn: Project is vulnerable to: GHSA-h592-38cm-4ggp","Warn: Project is vulnerable to: GHSA-h822-r4r5-v8jg","Warn: Project is vulnerable to: GHSA-m6x4-97wx-4q27","Warn: Project is vulnerable to: GHSA-mph4-vhrx-mv67","Warn: Project is vulnerable to: GHSA-mx7p-6679-8g3q","Warn: Project is vulnerable to: GHSA-mx9v-gmh4-mgqw","Warn: Project is vulnerable to: GHSA-p43x-xfjf-5jhr","Warn: Project is vulnerable to: GHSA-q93h-jc49-78gg","Warn: Project is vulnerable to: GHSA-qjw2-hr98-qgfh","Warn: Project is vulnerable to: GHSA-qr7j-h6gg-jmgc","Warn: Project is vulnerable to: GHSA-qxxx-2pp7-5hmx","Warn: Project is vulnerable to: GHSA-r3gr-cxrf-hg25","Warn: Project is vulnerable to: GHSA-r695-7vr9-jgc2","Warn: Project is vulnerable to: GHSA-rfx6-vp9g-rh7v","Warn: Project is vulnerable to: GHSA-rpr3-cw39-3pxh","Warn: Project is vulnerable to: GHSA-v585-23hc-c647","Warn: Project is vulnerable to: GHSA-vfqx-33qm-g869","Warn: Project is vulnerable to: GHSA-w3f4-3q6j-rh82","Warn: Project is vulnerable to: GHSA-wh8g-3j2c-rqj5","Warn: Project is vulnerable to: GHSA-x2w5-5m2g-7h5m","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T04:03:31.420Z","repository_id":38847354,"created_at":"2025-08-18T04:03:31.420Z","updated_at":"2025-08-18T04:03:31.420Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280118753,"owners_count":26275307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-20T02:00:06.978Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cloud","cloud-computing","iac","maven","maven-plugin","terraform"],"created_at":"2025-10-20T15:54:07.289Z","updated_at":"2025-10-20T15:54:09.869Z","avatar_url":"https://github.com/deliveredtechnologies.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[tf-maven-plugin]:https://search.maven.org/artifact/com.deliveredtechnologies/tf-maven-plugin/0.12/maven-plugin\n[tf-cmd-api]:https://search.maven.org/artifact/com.deliveredtechnologies/tf-cmd-api/0.12/jar\n[tf-s3-archetype]:https://search.maven.org/artifact/com.deliveredtechnologies/tf-s3-archetype/0.12/jar\n[tf-maven-plugin-snapshot]:https://oss.sonatype.org/content/repositories/snapshots/com/deliveredtechnologies/tf-maven-plugin/\n[tf-cmd-api-snapshot]:https://oss.sonatype.org/content/repositories/snapshots/com/deliveredtechnologies/tf-cmd-api/\n[tf-s3-archetype-snapshot]:https://oss.sonatype.org/content/repositories/snapshots/com/deliveredtechnologies/tf-s3-archetype/\n[maven-badge]:https://img.shields.io/badge/maven%20central-0.12-green.svg\n[maven-snapshot-badge]:https://img.shields.io/badge/SNAPSHOT-0.13-green.svg\n\n![terraform-maven](.docs/MavenTerraform.png)\n\n---\n\n\n![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)\n[![Build Status](https://codezero.bluflametech.com/badge/project-63-develop.svg)](https://codezero.bluflametech.com/projects/63)\n[![Coverage Status](https://coveralls.io/repos/github/deliveredtechnologies/terraform-maven/badge.svg?branch=develop)](https://coveralls.io/github/deliveredtechnologies/terraform-maven?branch=develop)\n[![Maven Central][maven-badge]][tf-maven-plugin]\n\n# Terraform Maven Plugin\n\nThe Terraform Maven Plugin brings Maven to Terraform, which greatly enhances Terraform’s project lifecycle and dependency management capability. \nMaven, in some form has been the standard for Java project management for over a decade. Now, all of that Maven goodness can be used with Terraform!\n\nIntegrate automtated tests (Spock, JUnit, TestNG) into your Terraform projects, use Maven's dependency management functionality with Terraform, combine Java and Terraform into the same project, and more! \n\n\u003chr\u003e\n\n### Contents\n\n* [Artifacts in This Repository](#artifacts-in-this-repository)\n* [Repository Directory Structure](#repo-directory-structure)\n* [Benefits of the Terraform Maven Plugin](#benefits-of-the-terraform-maven-plugin)\n* [Maven Goals](#maven-goals)\n  * [tf:get](#tfget)\n  * [tf:init](#tfinit)\n  * [tf:plan](#tfplan)\n  * [tf:apply](#tfapply)\n  * [tf:destroy](#tfdestroy)\n  * [tf:package](#tfpackage)\n  * [tf:deploy](#tfdeploy)\n  * [tf:clean](#tfclean)\n  * [tf:wrapper](#tfwrapper)\n* [How Commands Are Delegated to Terraform](#how-commands-are-delegated-to-terraform)\n  * [*nix-based Operating Systems](#nix-based-operating-systems)\n  * [Windows Operating Systems](#windows-operating-systems)\n* [Getting Started](https://github.com/deliveredtechnologies/terraform-maven/wiki/Getting-Started)\n* [Setting Up a Terraform Maven Project](#setting-up-a-terraform-maven-project)\n* [Setting Up a Terraform Maven Project Using an ArcheType](#setting-up-a-terraform-maven-project-using-an-archetype)\n* [How to Use Terraform Maven Projects](#how-to-use-terraform-maven-projects)\n* [Articles](#articles)\n\nNot finding what you are looking for? [Try the Wiki!](https://github.com/deliveredtechnologies/terraform-maven/wiki)\n\n\u003chr\u003e\n\n### Artifacts in This Repository\n\n| Artifact Name    | Version | Latest Snapshot | Description |\n|------------------|---------|-----------------|-------------|\n| tf-maven-plugin  | [![Maven Central][maven-badge]][tf-maven-plugin]  | [![Maven Snapshot][maven-snapshot-badge]][tf-maven-plugin-snapshot]  | Terraform Maven Plugin       |\n| tf-cmd-api       | [![Maven Central][maven-badge]][tf-cmd-api]       | [![Maven Snapshot][maven-snapshot-badge]][tf-cmd-api-snapshot]       | Terraform Command API        |\n| tf-s3-archetype  | [![Maven Central][maven-badge]][tf-s3-archetype]  | [![Maven Snapshot][maven-snapshot-badge]][tf-s3-archetype-snapshot]  | Maven Terraform S3 Archetype |\n\n### Repository Directory Structure\n* examples - Terraform Maven example projects\n  * tf-s3 - A Terraform Maven s3 example project\n  * tf-s3-consumer - An example project that consumes the tf-s3 project as a dependency\n* tf-build-tools - The parent project of the tf-maven-plugin and tf-cmd-api projects\n  * tf-maven-plugin - The Terraform Maven Plugin project\n  * tf-cmd-api - A Java API for Terraform project\n  * tf-test-groovy - A Java library that assists with Testing Terraform using Groovy (e.g. Spock)\n  * tf-s3-archetype - An Archetype for a S3 Terraform Project\n\n### Benefits of the Terraform Maven Plugin\n* Dependency Management\n  * Terraform really has no dependency management to speak of. Even when you use Terraform Cloud, Terraform Enterprise or some other private\n    Terraform module registry, a version update to a module means editing the Terraform code in each and every place\n    that module is sourced. The Terraform Maven Plugin allows you to specify your dependencies for Terraform the same way\n    you specify your dependencies with Java: in an external [Maven POM file](https://maven.apache.org/pom.html). And\n    because it's Maven, Terraform modules sourced from Maven repos can also take advantage of version ranges and \n    Maven's SNAPSHOT functionality. It also resolves transitive dependencies. No more modifying code for version updates! No more sourcing obscure URLs!\n    Hooray, Maven! \n* Packaging as Part of the Build Lifecycle\n  * The [package goal](#tfpackage) can package a Terraform root module for deployment into a Maven repo\n    or it can package that same Terraform root module with its dependencies for deployment into an isolated environment\n    or Terraform Enterprise. It's all part of a single Maven goal/command.\n* Deploying Terraform Artifacts to a Maven Repo with an Attached POM is a Snap\n  * By default, the [deploy goal](#tfdeploy) deploys a zip artifact packaged by the [package goal](#tfpackage) to a Maven repo\n    along with the POM of the current Maven Terraform project. But if you want to point to a differnt POM or a different\n    artifact for deployment, it can do that too. Easy peasy.\n* Terraform support for Java testing frameworks\n  * The tf-cmd-api artifact provides Java support for Terraform, which can be used to easily integrate\n    mature Java testing frameworks, like Spock, JUnit or TestNG. One example of this is the [[tf-s3 example in this repo]](examples/tf-s3).\n* Simple Integration with CI Tools\n  * Get rid of hundreds of lines of untested code in your CI tool and replace it with tested build lifecycle management\n    using Maven! Most CI tools either have Maven included or have a Maven plugin available. Less Terraform build logic \n    in your CI tool means more reliable builds and less CI code to maintain. \n* Build Terraform Maven Projects or Standalone Terraform Configurations and Anything In Between\n  * You can use the Terraform Maven plugin for building any Terraform, not just Terraform Maven projects!\n    The default configuration is opinionated around the Maven project structure. But that's available to override.\n    Do you have a different folder containing Terraform modules that you want packaged into a Fat Zip? No problem.\n    What about just running a Terraform configuration in some directory that you specify? That works too. You don't lose\n    anything with the Terraform Maven plugin. You just gain a whole lot of packaged functionality and the build lifecycle\n    power of Maven with Terraform!\n    \n### Maven Goals\n\n#### tf:get\n\nDescription:\n\nDownloads Maven artifacts into a common modules directory and extracts each artifacts\ncontents into a folder named for the artifact (version agnostic). \n\nOptional Parameters:\n\n| Name         | Type   | Description                                                                                        |\n| ------------ | ------ | -------------------------------------------------------------------------------------------------- |\n| tfModulesDir | String | The directory location where Terraform modules will be expanded; defaults to `src/main/.tfmodules` |\n\n---\n\n#### tf:init\n\nDescription:\n\nExecutes the `terraform init` command. See [https://www.terraform.io/docs/commands/init.html](https://www.terraform.io/docs/commands/init.html).\n\nOptional Parameters:\n\n| Name          | Type    | Description                                                                                                                |\n| ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |\n| tfRootDir     | String  | The root module directory location where terraform will be initialized; defaults to `src/main/tf/{first dir found}`        |\n| pluginDir     | String  | Skips plugin installation and loads plugins only from the specified directory                                              |\n| getPlugins    | Boolean | Skips plugin installation                                                                                                  |\n| backendConfig | String  | A comma delimited string of optional backend config (e.g. backendConfig=\"region=us-east-1,bucket=mybucket,key=/some/path\") | \n| verifyPlugins | Boolean | Skips release signature validation when installing downloaded plugins (not recommended)                                    |\n| skipTfGet     | Boolean | If set to true, tf:init is done without running tf:get                                                                     |\n| artifact      | String  | Supplied in form {groupId}:{artifactId}:{versionId}; if present, the maven artifact is treated like a root module          |\n| backendType   | String  | The terraform backend types (e.g. s3). When supplied, maven creates partial backend file (backend.generated.tf.json) with the given backend type. |\n\n---\n \n#### tf:plan\n\nDescription:\n\nExecutes the `terraform plan` command. See [https://www.terraform.io/docs/commands/plan.html](https://www.terraform.io/docs/commands/plan.html).\n\nOptional Parameters:\n\n| Name           | Type    | Description                                                                                                                                   |\n| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |\n| tfVarFiles     | String  | A comma delimited string of tfvars files (e.g. -var-file=foo)                                                                                 |\n| tfVars         | String  | A comma delimited string of tfvars (e.g. -var 'name=value')                                                                                   |\n| lockTimeout    | Number  | Duration to retry a state lock                                                                                                                |\n| target         | String  | A resource address to target                                                                                                                  |\n| planInput      | Boolean | If set to \"true\", input variables not directly set will be requested; otherwise, the plan will fail                                           |\n| noColor        | Any     | If this property exists, the -no-color flag is set                                                                                            |\n| destroyPlan    | Any     | If this property exists, a destroy plan is outputted                                                                                          | \n| planOutputFile | String  | The path to save the generated execution plan. To upload plan to S3 (e.g. -DplanOutputFile=s3://\u003cbucket-name\u003e/\u003ckey-prefix\u003e/\u003cplan-file-name\u003e)  |\n| kmsKeyId       | String  | To Upload plan to s3 with kms encrypted (e.g. -DkmsKeyId=\u003ckms-Key-ID\u003e)                                                                        | \n| tfRootDir      | String  | A terraform config directory to apply; defaults to `src/main/tf/{first dir found}`, then current directory                                    |\n| timeout        | Number  | The maximum time in milliseconds that the terraform apply command can run; defaults to 10min                                                  |\n| refreshState   | Boolean | If set to \"true\" then Terraform will refresh the state before generating the plan                                                             |\n| tfState        | String  | The path to the state file; defaults to `terraform.tfstate`                                                                                   |\n| artifact       | String  | Supplied in form {groupId}:{artifactId}:{versionId}; if present, the maven artifact is treated like a root module                             |\n\n---\n\n#### tf:apply\n\nDescription:\n\nExecutes the `terraform apply` command. See [https://www.terraform.io/docs/commands/apply.html](https://www.terraform.io/docs/commands/apply.html).\n\nOptional Parameters:\n\n| Name        | Type   | Description                                                                                                        |\n| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------ |\n| tfVarFiles  | String | A comma delimited string of tfvars files (e.g. -var-file=foo)                                                      |\n| tfVars      | String | A comma delimited string of tfvars (e.g. -var 'name=value')                                                        |\n| lockTimeout | Number | Duration to retry a state lock                                                                                     |\n| target      | String | A resource address to target                                                                                       |\n| noColor     | Any    | If this property exists, the -no-color flag is set                                                                 |\n| plan        | String | A terraform plan to apply; if both plan and tfRootDir are specified, only plan is used. To get plan file from s3 (e.g. -Dplan=s3://\u003cbucket-name\u003e/\u003ckey-prefix\u003e/\u003cplan-file-name\u003e)                             |\n| tfRootDir   | String | A terraform config directory to apply; defaults to `src/main/tf/{first dir found}`, then current directory         |\n| refreshState | Boolean | If set to \"true\" then Terraform will refresh the state before apply                                              |\n| timeout     | Number | The maximum time in milliseconds that the terraform apply command can run; defaults to 10min                       |\n| artifact    | String  | Supplied in form {groupId}:{artifactId}:{versionId}; if present, the maven artifact is treated like a root module |\n\n---\n\n#### tf:destroy\n\nDescription:\n\nExecutes the `terraform destroy` command. See [https://www.terraform.io/docs/commands/destroy.html](https://www.terraform.io/docs/commands/destroy.html).\n\nOptional Parameters:\n\n| Name        | Type   | Description                                                                                                        |\n| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------ |\n| lockTimeout | Number | Duration to retry a state lock                                                                                     |\n| tfVarFiles  | String | A comma delimited string of tfvars files (e.g. -var-file=foo)                                                      |\n| tfVars      | String | A comma delimited string of tfvars (e.g. -var 'name=value')                                                        |\n| target      | Number | A resource address to target                                                                                       |\n| noColor     | Any    | If this property exists, the -no-color flag is set                                                                 |\n| tfRootDir   | String | A terraform config directory to destroy; defaults to current directory                         |\n| refreshState | Boolean | If set to \"true\" then Terraform will refresh the state before apply                                              |\n| timeout     | Number | The maximum time in milliseconds that the terraform destroy command can run; defaults to 10min                     |\n| artifact    | String  | Supplied in form {groupId}:{artifactId}:{versionId}; if present, the maven artifact is treated like a root module |\n\n---\n\n#### tf:package\n\nDescription:\n\nRecursively packages the Terraform files from the root module directory as target/{artifact-id}-{version}.zip.\nOptionally, a fat compressed package can be created instead, which also includes the Terraform module dependencies if available; see the [tf:get goal](#tfget) above.\n\n_Note: Within the fat compressed package, module source paths are updated accordingly so that the pacakge is a wholly contained working module that can be consumed as a module,\nextracted, initialized and applied as-is or submitted to Terraform Enterprise._\n\n| Name         | Type    | Description                                                                                                                                       |\n| ------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------|\n| tfRootDir    | String  | The terraform root module directory location; defaults to src/main/tf/{first directory found} or src/main/tf if there are multiple source modules |\n| tfModulesDir | String  | The directory that contains the Terraform module depenencies; defaults to src/main/.tfmodules                                                     |\n| tfVarFiles   | String  | A comma delimited string of tfvars files in relation to tfRootDir (e.g., variables/dev1.tfvars,variables/dev2.tfvars)                             | \n| fatTar       | Boolean | Set to true if a fat compressed tar.gz package should be created, otherwise false; defaults to false                                              |\n\n---\n\n#### tf:deploy\n\nDescription:\n\nDeploys a packaged Terraform zip artifact ([see tf:package](#tfpackage)) with a POM to the specified Maven repo.\n\n| Name         | Type   | Description                                                                                                       |\n| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------- |\n| file         | String | The name of the Terraform zip file to deploy; defaults to target/{artifactId}-{version}.zip                       |\n| url          | String | The url of the Maven repo to which the zip file artifact will be deployed; defaults to {HOME}/.m2/repository      |\n| pomFile      | String | The path to the pom.xml file to attach to the artifact; defaults to .flattened-pom.xml in the root of the project |\n| generatePom  | String | If set to \"true\" then a POM will be generated and attached to the deployment                                      |\n| groupId      | String | The groupId for the generated POM (only used if generatePom=true                                                  |\n| artifactId   | String | The artifactId for the generated POM (only used if generatePom=true                                               |\n| version      | String | The version for the generated POM (only used if generatePom=true                                                  |\n| repositoryId | String | The server id to map on the \u003cid\u003e under \u003cserver\u003e section of settings.xml; typically for authentication             |\n\n---\n\n#### tf:clean\n\nDescription:\n\nDeletes all 'terraform' files from terraform configurations along with the Terraform modules directory.\n\n| Name         | Type    | Description                                                                                   |\n| ------------ | ------- | --------------------------------------------------------------------------------------------- |\n| tfRootDir    | String  | The terraform root module directory location; defaults to src/main/tf/{first directory found} |\n| tfModulesDir | String  | The directory that contains the Terraform module depenencies; defaults to src/main/.tfmodules |\n\n#### tf:wrapper\n\nDescription:\n\nBinds the Maven project to a specific Terraform binary version (think [Maven Wrapper](https://github.com/takari/maven-wrapper), but for Terraform).\n\nThe format of the URL from which to fetch the Terraform binary is modeled after HashiCorp's distribution URL.\n\n```{distributionSite}/{releaseDir}/{releaseVer}/{releaseName}_{releaseVer}_{releaseOS}_{releaseSuffix}```\n\nThe default location is \n\n| Name             | Type   | Description                                                                                        |\n| ---------------- | ------ | -------------------------------------------------------------------------------------------------- |\n| distributionSite | String | The baseUrl from which to fetch the Terraform binary; defaults to _https://releases.hashicorp.com_ |\n| releaseDir       | String | The name of the release project; defaults to _terraform_                                           |\n| releaseVer       | String | The version of the Terraform binary to bind to the project                                         |\n| releaseName      | String | The name of the release artifact; defaults to _terraform_                                          |\n| releaseSuffix    | String | The suffix of the artifact, including extension; defaults to _amd64.zip_                           |\n\n### How Commands Are Delegated to Terraform\n\nTerraform commands are executed in a forked shell that is joined to the Maven process. This has important implications\nbased on the operating system being used.\n\n#### *nix-based Operating Systems\n\nTerraform commands executed on *nix-based systems are forked into a bash shell that is joined to the Maven process.\n\n#### Windows Operating Systems\n\nTerraform commands executed on Windows operating systems by default use the Windows default command line (cmd.exe),\nwhich is not strictly compatible with Terraform as of Terraform v0.12 (e.g. -var parameters fail).\n\nHowever, Git Bash can be used in place of the default Windows command line to improve compatibility with Terraform \ncommands. To enable Git Bash, either set a Java system property `shellPath` or an environment variable `SHELL_PATH` to \nthe absolute path of the Git Bash executable.    \n\n### Setting Up a Terraform Maven Project\n\nInstead of doing all the above steps you can simply build the module/project by running the [Maven Archetype Plugin](https://maven.apache.org/guides/mini/guide-creating-archetypes.html) which creates project from an archetype.\n\nAn example on how to generate the project using an archetype is shown below.\n\n```bash\nmvn archetype:generate -B -DarchetypeGroupId=com.deliveredtechnologies -DarchetypeArtifactId=\"tf-s3-archetype\" -DarchetypeVersion=0.12 -DgroupId=\u003ccustom_group_name\u003e -DartifactId=\u003ccustom-artifact_name\u003e\n```\n\nMaven Non-Interactive mode creates a project with the name that you passed in \u003ccustom_articatId_name\u003e under \u003ccustom_groupId_name\u003e.\n\nor\n\n```bash\nmvn archetype:generate -DarchetypeGroupId=com.deliveredtechnologies -DarchetypeArtifactId=\"tf-s3-archetype\" -DarchetypeVersion=0.12\n``` \n\nAfter running the above command mvn interactive console prompts for the required arguments (ex: groupId and artifactId) and creates the project accordingly.\n\n### How to Use Terraform Maven Projects\n\nIf you used the above configuration, the following Terraform Maven goals are mapped to the project's Maven phases.\n\n| Maven Phase | Terraform Maven Goals |\n|-------------|-----------------------|\n| install     | deploy                |\n| validate    | get\n| clean       | init, destroy, clean  |\n| package     | package               |\n| deploy      | deploy                |\n\nUse the plugin or update the plugin configuration in the POM to call terraform specific commands (e.g. _mvn tf:init tf:apply_).\n\n### Articles\n\n* [Making Terraform Testing Groovy: Part 1 - Pre-provision Testing](https://medium.com/deliveredtechnologies/making-terraform-testing-groovy-6a9278bdce1)\n* [Unit Testing Terraform](https://medium.com/deliveredtechnologies/unit-testing-terraform-e592a5c3777f)\n* [Maven Gives Terraform a Big Boost](https://dzone.com/articles/maven-gives-terraform-a-big-boost)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeliveredtechnologies%2Fterraform-maven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeliveredtechnologies%2Fterraform-maven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeliveredtechnologies%2Fterraform-maven/lists"}