Coder Social home page Coder Social logo

politician / template-terraform Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 281 KB

Repository template for a basic (cloud-agnostic) Terraform module.

License: Apache License 2.0

TypeScript 6.78% Ruby 0.44% Makefile 65.39% HCL 18.87% Go 8.52%
terraform terraform-module github

template-terraform's Introduction

USING THIS TEMPLATE

  1. Search/replace for these variables:

    • {{repo_owner}} - GitHub repository username
    • {{repo_name}} - GitHub repository name
    • {{project_name}} - Project name
    • {{project_tagline}} - Project tagline
    • {{security_email}} - Email to send vulnerabilities add -noreply before the @
    • {{author_name}} - Your name
    • {{docs_base_url}} - Base URL to the documentation (no trailing slash). It could be:
      • https://<repo_owner>.github.io/<repo_name> (GitHub Pages default)
      • https://<your_domain> (GitHub Pages with CNAME file)
      • https://github.com/<repo_owner>/<repo_name>/blob/main (if you removed/don't want the documentation site)
    • {{docs_extension}} - Should be html if you use the documentation site, otherwise md
    • {{forum_url}} - URL to your forum for users to ask questions. It could be:
      • https://github.com/<repo_owner>/<repo_name>/discussions (if you enabled the discussions feature on your repo)
      • https://github.com/orgs/<repo_owner>/discussions (if you enabled the discussions feature at your org level)
      • https://<your_domain> (if you maintain a separate discussion forum, or a link to your community on Slack, Discord, etc.)

    For any decent-sized project, it is better to own your brand and use your own domain rather than GitHub links.

  2. Remove this README.md and move docs/README.md to the root

GitHub Actions

Some GitHub Actions bundled in this template require a personal access token (PAT). This can be sourced either from an app (recommended) or from a user.

From an app

  1. Create an app with the minimum permissions or add the following permissions to an existing app:

    • Contents: Read and write
    • Issues: Read and write
    • Pull requests: Read and write
  2. Set the GH_APP_ID and GH_APP_PRIVATE_KEY repository secrets.

  3. Install the app to your repository (click Install App on the left menu of the app page)

From a user

  1. Create a personal access token with the repo permissions.

  2. Set the GH_PERSONAL_TOKEN repository secret.

  3. Look into each file in .github/workflows:

    • Remove every step called Generate app token
    • Replace ${{ steps.generate_token.outputs.token }} with ${{ secrets.GH_PERSONAL_TOKEN }}

Dependency updates

You can pick between Renovate (recommended) or Dependabot for your dependency updates.

Dependabot won't keep your pre-commit hooks up to date as opposed to Renovate.

Renovate

  1. Install it
  2. Remove the file .github/dependabot.yaml

Dependabot

Just remove the file .github/renovate.json.

Tests

Unit tests

This template comes with two types of unit tests: static code analysis and runtime tests using various tools.

Unit tests are performed on the main module and on each example (eg. ./examples/minimal)

Integration tests

This template comes with two ways to test your module actually running terraform apply (and terraform destroy). Pick the one you prefer and delete the other one:

No actual terraform apply is run on the ./examples/* because the two ways above are more suited for actually testing the output.

template-terraform's People

Contributors

politician avatar renovate[bot] avatar

Stargazers

 avatar

Watchers

 avatar  avatar Ahmed Qazi avatar

template-terraform's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/deploy-docs.yaml
  • peter-murray/workflow-application-token-action v1
  • actions/checkout v3
.github/workflows/issue-voting.yaml
  • peter-murray/workflow-application-token-action v1
  • aidan-mundy/react-to-issue b189f43a4686d4183c80c957dbcec07a720be261
  • peter-evans/create-or-update-comment v2
  • peter-evans/create-or-update-comment v2
.github/workflows/leaked-secrets.yaml
  • actions/checkout v3
  • trufflesecurity/trufflehog v3.6.1
.github/workflows/lint.yaml
  • actions/checkout v3
  • github/super-linter v4
.github/workflows/pr-helper.yaml
  • peter-murray/workflow-application-token-action v1
  • peter-evans/create-or-update-comment v2
.github/workflows/rebase.yaml
  • peter-murray/workflow-application-token-action v1
  • actions/checkout v3
  • cirrus-actions/rebase 1.7
.github/workflows/release.yaml
  • peter-murray/workflow-application-token-action v1
  • google-github-actions/release-please-action v3
.github/workflows/stale.yaml
  • peter-murray/workflow-application-token-action v1
  • actions/stale v5
  • actions/stale v5
  • actions/stale v5
  • actions/stale v5
.github/workflows/test-dev-workflow.yaml
  • actions/checkout v3
.github/workflows/test.yaml
  • actions/checkout v3
  • clowdhaus/terraform-min-max v1.0.8
  • actions/checkout v3
  • hashicorp/setup-terraform v2
  • terraform-linters/setup-tflint v1
  • actions/checkout v3
  • hashicorp/setup-terraform v2
  • actions/setup-go v3
.github/workflows/tfsec.yaml
  • actions/checkout v3
  • aquasecurity/tfsec-sarif-action v0.1.3
  • github/codeql-action v2
npm
package.json
  • vitepress 1.0.0-alpha.1
pre-commit
.pre-commit-config.yaml
  • pre-commit/pre-commit-hooks v4.2.0
  • compilerla/conventional-pre-commit v1.3.0
  • sirosen/check-jsonschema 0.16.0
  • gruntwork-io/pre-commit v0.1.17
  • terraform-docs/terraform-docs v0.16.0
terraform
_providers.tf
  • hashicorp/terraform >= 1.2.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.