Skip to content

Commit

Permalink
feat: added draft for gh-pages support (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanfreitag committed Jul 23, 2023
1 parent 1751b47 commit 1d716db
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 32 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish_gh_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- main

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v2

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
schedule: UpgradeDependenciesSchedule.MONTHLY,
},
},
keywords: ['aws', 'backend', 's3', 'terraform'],
stability: Stability.EXPERIMENTAL,
publishToMaven: {
javaPackage: 'io.github.stefanfreitag.cdk.terraformstatebackend',
Expand Down
25 changes: 8 additions & 17 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,11 @@ of
- S3 bucket
- DynamoDB table.

## Features
## Contributing

- Versioning is enabled
[[S3.14] S3 buckets should use versioning](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-14)
- All public access is blocked
[[S3.1] S3 Block Public Access setting should be enabled](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-1)
- Enforce SSL for requests
[[S3.5] S3 buckets should require requests to use Secure Socket Layer](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-1)
- A lifecycle policy for non-current versions of objects
[[S3.10] S3 buckets with versioning enabled should have lifecycle policies configured
](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-10)
- Enforcing that the bucket owner owns every object in the bucket.
We welcome community contributions and pull requests. See [CONTRIBUTING.md](./CONTRIBUTING.md) for
details.

## Links
## License

- [Amazon Simple Storage Service controls](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html)
- [Controlling ownership of objects and disabling ACLs for your bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
This project is licensed under Apache 2.0 - see the [LICENSE](./LICENSE) file for details.
8 changes: 8 additions & 0 deletions docs/features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Features

- [[S3.1] S3 Block Public Access setting should be enabled](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-1)
- [[S3.5] S3 buckets should require requests to use Secure Socket Layer](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-1)
- [[S3.14] S3 buckets should use versioning](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-14)
- A lifecycle policy for non-current versions of objects
[[S3.10] S3 buckets with versioning enabled should have lifecycle policies configured](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html#s3-10)
- Enforcing that the bucket owner owns every object in the bucket.
11 changes: 11 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Introduction

Terraform supports remote state management using S3 and DynamoDB services from AWS.
This CDK construct provides an implementation following recommended practices, e.g.

- state locking and consistency checking via Dynamo DB
- encryption of state files at rest
- versioning on the S3 bucket
Allowing state recovery in the case of accidental deletions and human error

A full list of features is available in the [here](features.md).
7 changes: 7 additions & 0 deletions docs/links.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Links

- [AWS Cloud Development Kit](https://aws.amazon.com/cdk)
- [AWS DynamoDB](https://aws.amazon.com/dynamodb/)
- [AWS Simple Storage Service](https://aws.amazon.com/s3/)
- [Amazon Simple Storage Service controls](https://docs.aws.amazon.com/securityhub/latest/userguide/s3-controls.html)
- [Controlling ownership of objects and disabling ACLs for your bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html)
24 changes: 24 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
site_name: Terraform Remote State S3 Backend
site_description: 'Documentation for the Terraform Remote State S3 Backend'
site_author: 'Stefan Freitag'
docs_dir: docs/
repo_name: 'stefanfreitag/terraform-backend-s3-bucket'
repo_url: 'https://github.com/stefanfreitag/terraform-backend-s3-bucket'
edit_uri: blob/main/docs/
nav:
- Home: index.md
- Features: features.md
- Links: links.md
theme:
name: 'material'
palette:
scheme: default

markdown_extensions:
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
6 changes: 5 additions & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1d716db

Please sign in to comment.