{"id":24388149,"url":"https://github.com/masterpointio/terraform-aws-amplify-app","last_synced_at":"2025-09-29T18:30:59.347Z","repository":{"id":51252758,"uuid":"265131208","full_name":"masterpointio/terraform-aws-amplify-app","owner":"masterpointio","description":"A Terraform module for building simple Amplify apps.","archived":false,"fork":false,"pushed_at":"2022-07-07T05:26:01.000Z","size":37,"stargazers_count":22,"open_issues_count":0,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-11T02:54:34.428Z","etag":null,"topics":["amplify","aws","aws-amplify","opentofu","opentofu-module","terraform","terraform-aws","terraform-module"],"latest_commit_sha":null,"homepage":"https://masterpoint.io","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/masterpointio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-19T03:19:46.000Z","updated_at":"2024-12-30T14:37:58.000Z","dependencies_parsed_at":"2022-08-27T21:23:55.633Z","dependency_job_id":null,"html_url":"https://github.com/masterpointio/terraform-aws-amplify-app","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-aws-amplify-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-aws-amplify-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-aws-amplify-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/masterpointio%2Fterraform-aws-amplify-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/masterpointio","download_url":"https://codeload.github.com/masterpointio/terraform-aws-amplify-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234647394,"owners_count":18865692,"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","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":["amplify","aws","aws-amplify","opentofu","opentofu-module","terraform","terraform-aws","terraform-module"],"created_at":"2025-01-19T13:56:30.985Z","updated_at":"2025-09-29T18:30:53.926Z","avatar_url":"https://github.com/masterpointio.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Masterpoint Logo](https://i.imgur.com/RDLnuQO.png)](https://masterpoint.io)\n\n# NOTE! This module is no longer maintained.\n\nThis module is old and the good folks at [Cloud Posse](https://cloudposse.com/) have built a better module, so we're sunsetting this module in favor of using that one. Check it out here: https://github.com/cloudposse/terraform-aws-amplify-app\n\nReach out if you have any issues - Thanks!\n\n# terraform-aws-amplify-app (Archived)\n\nA Terraform module for building simple Amplify apps. This creates the `master` and `develop` branches, sets up the domain association, and creates webhooks for both branches.\n\n## Usage\n\n```hcl\nmodule \"amplify\" {\n  source = \"git::https://github.com/masterpointio/terraform-aws-amplify-app.git?ref=tags/0.1.0\"\n\n  namespace                    = var.namespace\n  stage                        = var.stage\n  name                         = \"mattgowie\"\n  organization                 = \"Gowiem\"\n  repo                         = \"mattgowie.com\"\n  gh_access_token              = var.gh_access_token\n  domain_name                  = \"mattgowie.com\"\n  description                  = \"The Personal site of Matt Gowie.\"\n  enable_basic_auth_on_master  = false\n  enable_basic_auth_on_develop = true\n  basic_auth_username          = var.basic_auth_username\n  basic_auth_password          = var.basic_auth_password\n  develop_pull_request_preview = true\n\n  custom_rules = [{\n    source    = \"https://www.mattgowie.com\"\n    target    = \"https://mattgowie.com\"\n    status    = \"301\"\n    condition = null\n  }, {\n    source    = \"/\u003c*\u003e\"\n    target    = \"/index.html\"\n    status    = \"404\"\n    condition = null\n  }]\n}\n```\n\n## Credits\n\n1. [@k24d](https://github.com/k24d)'s creation of the Amplify Resources for the AWS Provider!\n1. [cloudposse/terraform-null-label](https://github.com/cloudposse/terraform-null-label)\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.14.0 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | ~\u003e 3.32 |\n| \u003ca name=\"requirement_local\"\u003e\u003c/a\u003e [local](#requirement\\_local) | ~\u003e 2.1 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | ~\u003e 3.32 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_develop_branch_label\"\u003e\u003c/a\u003e [develop\\_branch\\_label](#module\\_develop\\_branch\\_label) | cloudposse/label/null | 0.24.1 |\n| \u003ca name=\"module_master_branch_label\"\u003e\u003c/a\u003e [master\\_branch\\_label](#module\\_master\\_branch\\_label) | cloudposse/label/null | 0.24.1 |\n| \u003ca name=\"module_this\"\u003e\u003c/a\u003e [this](#module\\_this) | cloudposse/label/null | 0.24.1 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_amplify_app.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_app) | resource |\n| [aws_amplify_backend_environment.develop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_backend_environment) | resource |\n| [aws_amplify_backend_environment.master](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_backend_environment) | resource |\n| [aws_amplify_branch.develop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_branch) | resource |\n| [aws_amplify_branch.master](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_branch) | resource |\n| [aws_amplify_domain_association.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_domain_association) | resource |\n| [aws_amplify_webhook.develop](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_webhook) | resource |\n| [aws_amplify_webhook.master](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/amplify_webhook) | resource |\n| [aws_iam_role.default](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |\n| [aws_iam_policy_document.assume_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_additional_tag_map\"\u003e\u003c/a\u003e [additional\\_tag\\_map](#input\\_additional\\_tag\\_map) | Additional tags for appending to tags\\_as\\_list\\_of\\_maps. Not added to `tags`. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_amplify_service_role_enabled\"\u003e\u003c/a\u003e [amplify\\_service\\_role\\_enabled](#input\\_amplify\\_service\\_role\\_enabled) | Whether to enable the IAM Service Role for Amplify or not. See https://docs.aws.amazon.com/amplify/latest/userguide/how-to-service-role-amplify-console.html for full details. | `bool` | `false` | no |\n| \u003ca name=\"input_attributes\"\u003e\u003c/a\u003e [attributes](#input\\_attributes) | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |\n| \u003ca name=\"input_basic_auth_password\"\u003e\u003c/a\u003e [basic\\_auth\\_password](#input\\_basic\\_auth\\_password) | The password to use for the basic auth configuration. | `string` | n/a | yes |\n| \u003ca name=\"input_basic_auth_username\"\u003e\u003c/a\u003e [basic\\_auth\\_username](#input\\_basic\\_auth\\_username) | The username to use for the basic auth configuration. | `string` | n/a | yes |\n| \u003ca name=\"input_build_spec_content\"\u003e\u003c/a\u003e [build\\_spec\\_content](#input\\_build\\_spec\\_content) | Your build spec file contents. If not provided then it will use the `amplify.yml` at the root of your project / branch. | `string` | `\"\"` | no |\n| \u003ca name=\"input_context\"\u003e\u003c/a\u003e [context](#input\\_context) | Single object for setting entire context at once.\u003cbr\u003eSee description of individual variables for details.\u003cbr\u003eLeave string and numeric variables as `null` to use default value.\u003cbr\u003eIndividual variable settings (non-null) override settings in context object,\u003cbr\u003eexcept for attributes, tags, and additional\\_tag\\_map, which are merged. | \u003cpre\u003eobject({\u003cbr\u003e    enabled             = bool\u003cbr\u003e    namespace           = string\u003cbr\u003e    environment         = string\u003cbr\u003e    stage               = string\u003cbr\u003e    name                = string\u003cbr\u003e    delimiter           = string\u003cbr\u003e    attributes          = list(string)\u003cbr\u003e    tags                = map(string)\u003cbr\u003e    additional_tag_map  = map(string)\u003cbr\u003e    regex_replace_chars = string\u003cbr\u003e    label_order         = list(string)\u003cbr\u003e    id_length_limit     = number\u003cbr\u003e  })\u003c/pre\u003e | \u003cpre\u003e{\u003cbr\u003e  \"additional_tag_map\": {},\u003cbr\u003e  \"attributes\": [],\u003cbr\u003e  \"delimiter\": null,\u003cbr\u003e  \"enabled\": true,\u003cbr\u003e  \"environment\": null,\u003cbr\u003e  \"id_length_limit\": null,\u003cbr\u003e  \"label_order\": [],\u003cbr\u003e  \"name\": null,\u003cbr\u003e  \"namespace\": null,\u003cbr\u003e  \"regex_replace_chars\": null,\u003cbr\u003e  \"stage\": null,\u003cbr\u003e  \"tags\": {}\u003cbr\u003e}\u003c/pre\u003e | no |\n| \u003ca name=\"input_custom_rules\"\u003e\u003c/a\u003e [custom\\_rules](#input\\_custom\\_rules) | The custom rules to apply to the Amplify App. | \u003cpre\u003elist(object({\u003cbr\u003e    source    = string # Required\u003cbr\u003e    target    = string # Required\u003cbr\u003e    status    = any    # Use null if not passing\u003cbr\u003e    condition = any    # Use null if not passing\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_delimiter\"\u003e\u003c/a\u003e [delimiter](#input\\_delimiter) | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.\u003cbr\u003eDefaults to `-` (hyphen). Set to `\"\"` to use no delimiter at all. | `string` | `null` | no |\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description) | The description to associate with the Amplify App. | `string` | n/a | yes |\n| \u003ca name=\"input_develop_backend_environment_enabled\"\u003e\u003c/a\u003e [develop\\_backend\\_environment\\_enabled](#input\\_develop\\_backend\\_environment\\_enabled) | Whether to create the backend environment for develop or not. | `bool` | `false` | no |\n| \u003ca name=\"input_develop_branch_name\"\u003e\u003c/a\u003e [develop\\_branch\\_name](#input\\_develop\\_branch\\_name) | The name of the 'develop'-like branch that you'd like to use. | `string` | `\"develop\"` | no |\n| \u003ca name=\"input_develop_environment_variables\"\u003e\u003c/a\u003e [develop\\_environment\\_variables](#input\\_develop\\_environment\\_variables) | Environment variables for the develop branch. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_develop_pull_request_preview\"\u003e\u003c/a\u003e [develop\\_pull\\_request\\_preview](#input\\_develop\\_pull\\_request\\_preview) | Whether to enable preview on PR's into develop. | `bool` | `true` | no |\n| \u003ca name=\"input_domain_name\"\u003e\u003c/a\u003e [domain\\_name](#input\\_domain\\_name) | The Custom Domain Name to associate with this Amplify App. | `string` | `\"\"` | no |\n| \u003ca name=\"input_enable_basic_auth_globally\"\u003e\u003c/a\u003e [enable\\_basic\\_auth\\_globally](#input\\_enable\\_basic\\_auth\\_globally) | To enable basic auth for all branches or not. | `bool` | `false` | no |\n| \u003ca name=\"input_enable_basic_auth_on_develop\"\u003e\u003c/a\u003e [enable\\_basic\\_auth\\_on\\_develop](#input\\_enable\\_basic\\_auth\\_on\\_develop) | To enable basic auth on the develop branch subdomain or not. | `bool` | `true` | no |\n| \u003ca name=\"input_enable_basic_auth_on_master\"\u003e\u003c/a\u003e [enable\\_basic\\_auth\\_on\\_master](#input\\_enable\\_basic\\_auth\\_on\\_master) | To enable basic auth the root subdomain or not. | `bool` | `false` | no |\n| \u003ca name=\"input_enabled\"\u003e\u003c/a\u003e [enabled](#input\\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |\n| \u003ca name=\"input_environment\"\u003e\u003c/a\u003e [environment](#input\\_environment) | Environment, e.g. 'uw2', 'us-west-2', OR 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no |\n| \u003ca name=\"input_gh_access_token\"\u003e\u003c/a\u003e [gh\\_access\\_token](#input\\_gh\\_access\\_token) | Personal Access token for 3rd party source control system for an Amplify App, used to create webhook and read-only deploy key. Token is not stored. | `string` | n/a | yes |\n| \u003ca name=\"input_global_environment_variables\"\u003e\u003c/a\u003e [global\\_environment\\_variables](#input\\_global\\_environment\\_variables) | Environment variables that are set across all branches. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_id_length_limit\"\u003e\u003c/a\u003e [id\\_length\\_limit](#input\\_id\\_length\\_limit) | Limit `id` to this many characters.\u003cbr\u003eSet to `0` for unlimited length.\u003cbr\u003eSet to `null` for default, which is `0`.\u003cbr\u003eDoes not affect `id_full`. | `number` | `null` | no |\n| \u003ca name=\"input_label_order\"\u003e\u003c/a\u003e [label\\_order](#input\\_label\\_order) | The naming order of the id output and Name tag.\u003cbr\u003eDefaults to [\"namespace\", \"environment\", \"stage\", \"name\", \"attributes\"].\u003cbr\u003eYou can omit any of the 5 elements, but at least one must be present. | `list(string)` | `null` | no |\n| \u003ca name=\"input_master_backend_environment_enabled\"\u003e\u003c/a\u003e [master\\_backend\\_environment\\_enabled](#input\\_master\\_backend\\_environment\\_enabled) | Whether to create the backend environment for master or not. | `bool` | `false` | no |\n| \u003ca name=\"input_master_branch_name\"\u003e\u003c/a\u003e [master\\_branch\\_name](#input\\_master\\_branch\\_name) | The name of the 'master'-like branch that you'd like to use. | `string` | `\"master\"` | no |\n| \u003ca name=\"input_master_environment_variables\"\u003e\u003c/a\u003e [master\\_environment\\_variables](#input\\_master\\_environment\\_variables) | Environment variables for the master branch. | `map(string)` | `{}` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Solution name, e.g. 'app' or 'jenkins' | `string` | `null` | no |\n| \u003ca name=\"input_namespace\"\u003e\u003c/a\u003e [namespace](#input\\_namespace) | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | `string` | `null` | no |\n| \u003ca name=\"input_organization\"\u003e\u003c/a\u003e [organization](#input\\_organization) | The GitHub organization or user where the repo lives. | `string` | n/a | yes |\n| \u003ca name=\"input_regex_replace_chars\"\u003e\u003c/a\u003e [regex\\_replace\\_chars](#input\\_regex\\_replace\\_chars) | Regex to replace chars with empty string in `namespace`, `environment`, `stage` and `name`.\u003cbr\u003eIf not set, `\"/[^a-zA-Z0-9-]/\"` is used to remove all characters other than hyphens, letters and digits. | `string` | `null` | no |\n| \u003ca name=\"input_repo\"\u003e\u003c/a\u003e [repo](#input\\_repo) | The name of the repo that the Amplify App will be created around. | `string` | n/a | yes |\n| \u003ca name=\"input_stage\"\u003e\u003c/a\u003e [stage](#input\\_stage) | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | `string` | `null` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | Additional tags (e.g. `map('BusinessUnit','XYZ')` | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_arn\"\u003e\u003c/a\u003e [arn](#output\\_arn) | The ARN of the main Amplify resource. |\n| \u003ca name=\"output_custom_domains\"\u003e\u003c/a\u003e [custom\\_domains](#output\\_custom\\_domains) | List of custom domains that are associated with this resource (if any). |\n| \u003ca name=\"output_default_domain\"\u003e\u003c/a\u003e [default\\_domain](#output\\_default\\_domain) | The amplify domain (non-custom). |\n| \u003ca name=\"output_develop_webhook_arn\"\u003e\u003c/a\u003e [develop\\_webhook\\_arn](#output\\_develop\\_webhook\\_arn) | The ARN of the develop webhook. |\n| \u003ca name=\"output_develop_webhook_url\"\u003e\u003c/a\u003e [develop\\_webhook\\_url](#output\\_develop\\_webhook\\_url) | The URL of the develop webhook. |\n| \u003ca name=\"output_domain_association_arn\"\u003e\u003c/a\u003e [domain\\_association\\_arn](#output\\_domain\\_association\\_arn) | The ARN of the domain association resource. |\n| \u003ca name=\"output_master_webhook_arn\"\u003e\u003c/a\u003e [master\\_webhook\\_arn](#output\\_master\\_webhook\\_arn) | The ARN of the master webhook. |\n| \u003ca name=\"output_master_webhook_url\"\u003e\u003c/a\u003e [master\\_webhook\\_url](#output\\_master\\_webhook\\_url) | The URL of the master webhook. |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Fterraform-aws-amplify-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmasterpointio%2Fterraform-aws-amplify-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmasterpointio%2Fterraform-aws-amplify-app/lists"}