diff --git a/Makefile b/Makefile deleted file mode 100644 index dc7415e9..00000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -SHELL := /bin/bash - -# List of targets the `readme` target should call before generating the readme -export README_DEPS ?= docs/github-action.md - --include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness) - -## Lint terraform code -lint: - $(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate \ No newline at end of file diff --git a/README.yaml b/README.yaml index 9e851537..0d50d880 100644 --- a/README.yaml +++ b/README.yaml @@ -20,17 +20,15 @@ github_repo: cloudposse/github-action-terraform-plan-storage # Badges to display badges: - - name: "Latest Release" - image: "https://img.shields.io/github/release/cloudposse/github-action-terraform-plan-storage.svg" - url: "https://github.com/cloudposse/github-action-terraform-plan-storage/releases/latest" - - name: "Slack Community" - image: "https://slack.cloudposse.com/badge.svg" - url: "https://slack.cloudposse.com" - - name: "Discourse Forum" - image: "https://img.shields.io/discourse/https/ask.sweetops.com/posts.svg" - url: "https://ask.sweetops.com/" - -# Short description of this project + - name: Latest Release + image: https://img.shields.io/github/release/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge + url: https://github.com/cloudposse/github-action-terraform-plan-storage/releases/latest + - name: Last Updated + image: https://img.shields.io/github/last-commit/cloudposse/github-action-terraform-plan-storage.svg?style=for-the-badge + url: https://github.com/cloudposse/github-action-terraform-plan-storage/commits + - name: Slack Community + image: https://slack.cloudposse.com/for-the-badge.svg + url: https://cloudposse.com/slack description: |- A GitHub Action to securely store Terraform plan files in a cloud storage (S3 or Azure Blob Storage) with metadata storage in cloud document database (DynamoDB or CosmosDB). @@ -41,10 +39,10 @@ introduction: |- the plan files when a feature branch is opened and applied when merged. # How to use this module. Should be an easy example to copy and paste. -usage: |- +usage: |2- ## AWS (default) - + Standard usage for this action is with AWS. In AWS, we store Terraform plan files in a S3 Bucket and store metadata in DynamoDB. Specify the DynamoDB table name and S3 bucket name with `tableName` and `bucketName` respectively. The filepath in S3 and the attributes in DynamoDB will use the given `component` and `stack` values to update or create a unique target for each Terraform plan file. @@ -78,7 +76,7 @@ usage: |- ``` ## Azure - + This action also supports Azure. In Azure, we store Terraform plan files with Blob Storage and store metadata in Cosmos DB. To use the Azure implementation rather than the default AWS implementation, specify `planRepositoryType` as `azureblob` and `metadataRepositoryType` as `cosmos`. Then pass the Blob Account and Container names with `blobAccountName` and `blobContainerName` and the Cosmos Container name, Database name, and Endpoint with `cosmosContainerName`, `cosmosDatabaseName`, and `cosmosEndpoint`. @@ -160,9 +158,9 @@ usage: |- ``` # Other files to include in this README from the project folder -include: - - "docs/github-action.md" +include: [] +# List any related terraform modules that this module may be used with or that this module depends on. related: - name: "github-action-atmos-terraform-plan" description: "This Github Action is used to run Terraform plan for a single, Atmos-supported component and save the given planfile to S3 and DynamoDB." diff --git a/atmos.yaml b/atmos.yaml new file mode 100644 index 00000000..b5a4a8f8 --- /dev/null +++ b/atmos.yaml @@ -0,0 +1,12 @@ +# Atmos Configuration — powered by https://atmos.tools +# +# This configuration enables centralized, DRY, and consistent project scaffolding using Atmos. +# +# Included features: +# - Organizational custom commands: https://atmos.tools/core-concepts/custom-commands +# - Automated README generation: https://atmos.tools/cli/commands/docs/generate +# + +# Import shared configuration used by all modules +import: + - https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/terraform-module.yaml diff --git a/docs/github-action.md b/docs/github-action.md deleted file mode 100644 index 3ac886a1..00000000 --- a/docs/github-action.md +++ /dev/null @@ -1,32 +0,0 @@ - - -## Inputs - -| Name | Description | Default | Required | -|------|-------------|---------|----------| -| action | which action to perform. Valid values are: 'storePlan', 'getPlan', 'taintPlan' | storePlan | true | -| blobAccountName | the name of the Azure Blob Storage account to store the plan file | N/A | false | -| blobContainerName | the name of the Azure Blob Storage container to store the plan file | N/A | false | -| bucketName | the name of the S3 or GCS bucket to store the plan file | terraform-plan-storage | false | -| commitSHA | Commit SHA to use for fetching plan | | false | -| component | the name of the component corresponding to the plan file | N/A | false | -| cosmosConnectionString | the connection string to the CosmosDB account to store the metadata | N/A | false | -| cosmosContainerName | the name of the CosmosDB container to store the metadata | N/A | false | -| cosmosDatabaseName | the name of the CosmosDB database to store the metadata | N/A | false | -| cosmosEndpoint | the endpoint of the CosmosDB account to store the metadata | N/A | false | -| failOnMissingPlan | Fail if plan is missing | true | false | -| gcpFirestoreCollectionName | the name of the Firestore collection to store the metadata | terraform-plan-storage | false | -| gcpFirestoreDatabaseName | the name of the Firestore database to store the metadata | (default) | false | -| gcpProjectId | the Google Cloud project ID for GCP services (GCS, Firestore) | N/A | false | -| metadataRepositoryType | the type of repository where the plan file is stored. Valid values are: 'dynamo', 'cosmodb', 'firestore' | dynamo | false | -| planPath | path to the Terraform plan file. Required for 'storePlan' and 'getPlan' actions | N/A | false | -| planRepositoryType | the type of repository where the metadata is stored. Valid values are: 's3', 'azureblob', 'gcs' | s3 | false | -| stack | the name of the stack corresponding to the plan file | N/A | false | -| tableName | the name of the dynamodb table to store metadata | terraform-plan-storage | false | - - -## Outputs - -| Name | Description | -|------|-------------| -