From 8e636394b36b739eb25760d3b2669b4fee91b9d6 Mon Sep 17 00:00:00 2001 From: Kevon Mayers Date: Sat, 13 May 2023 15:47:10 -0400 Subject: [PATCH] Add .gitignore --- .gitignore | 29 +++++++++++++++++++ text.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .gitignore create mode 100644 text.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..397af32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Local .terraform directories +**/.terraform/* + +# Terraform lockfile +.terraform.lock.hcl + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log + +# Exclude all .tfvars files, which are likely to contain sentitive data, such as +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject +# to change depending on the environment. +*.tfvars + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Ignore CLI configuration files +.terraformrc +terraform.rc diff --git a/text.md b/text.md new file mode 100644 index 0000000..9719c4a --- /dev/null +++ b/text.md @@ -0,0 +1,82 @@ +## Basic Usage - CodeCommit Repo with Automatic Branch Creation + +```go +// This is a template file for a basic deployment. +// Modify the parameters below with actual values +module "sample-qs" { + // location of the module - can be local or git repo + source = "./modules/novekm-static-website-amplify" + + + app_name = "my-app" + create_codecommit_repo = true + lookup_existing_codecommit_repo = false + path_to_build_spec = "../amplify.yml" + // buildspec = "" + + + // Auto Branch Creation + enable_auto_branch_creation = true + enable_auto_branch_deletion = true + auto_branch_creation_patterns = ["main"] + enable_auto_build = true + enable_app_pr_preview = true + app_framework = "Something bloated and hard to maintain" + + + // - Custom Domain - + create_domain_associations = false + domain_name = "yourdomain.com" + domain_associations = { + core = { + branch_name = "main" + prefix = "" + }, + www = { + branch_name = "main" + prefix = "www" + }, + // redirect_to_www = { + // source = "https://yourdomain.com" + // status = "302" + // target = "https://www.yourdomain.com" / + // }, + // dev = { + // branch_name = "dev" + // prefix = "dev" + // } + } + + + // custom_rewrite_and_redirect = { + // static_site = { + // source = "/<*>" + // status = "404" + // target = "/index.html" + // } + // single_page_app = { + // source = "" + // status = "200" + // target = "/index.html" + // } + // app2 = { + // source = "/app2" + // status = "302" + // target = "https://yourotherdomain.com" + // } + // } +} +``` + +# Examples + +- [CodeCommit Repo with Auto Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/codecommit-deployment/auto-branch-creation/main.tf) +- [CodeCommit Repo with Manual Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/codecommit-deployment/manual-branch-creation/main.tf) +- [GitHub Repo with Auto Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/github-deployment/auto-branch-creation/main.tf) +- [GitHub Repo with Manual Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/github-deployment/auto-branch-creation/main.tf) +- [GitLab Repo with Auto Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/gitlab-deployment/auto-branch-creation/main.tf) +- [GitLab Repo with Manual Branch Creation](https://github.com/novekm/terraform-aws-amplify-app/examples/gitlab-deployment/auto-branch-creation/main.tf) + +# Contributing + +Report issues/questions/feature requests on the [issues] page. Reach out to me if you'd like to be a contributor!