You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28-7Lines changed: 28 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,28 @@ in your module definition.
210
210
Gentle reminder that no backup options are currently bundled with this module - the most effective means would be to
211
211
generate and retain a backup from within Wordpress for maximum flexibility. We recommend the UpdraftPlus plugin.
212
212
213
+
## Permanent Redirects
214
+
215
+
Basic url path based permanent redirects are supported via the CloudFront function. The variable `cloudfront_function_301_redirects` can be set with a custom map of match to destination mappings.
216
+
217
+
Some aspects that need to be taken into consideration for the match:
218
+
219
+
* It's a regular expression
220
+
* Group replacements are supported
221
+
* Runs in a Javascript function, escaping needs to be taken into consideration
222
+
* Passed through a TF var, so escaping that needs to be taking into account as well
223
+
224
+
An example to match a path like `/category-name`, a suitable match would be `"^\\/(category-name)$"`. Breaking down the `\\/` part, the first `\` tells TF to escape the second `\`, which is the Regex escape for the `/` character.
225
+
226
+
An example:
227
+
228
+
```
229
+
cloudfront_function_301_redirects = {
230
+
# Redirects /travel to /category/travel/
231
+
"^\\/(travel)$": "/category/$1/",
232
+
}
233
+
```
234
+
213
235
## Troubleshooting
214
236
215
237
If you experience issues with the publish element of WP2Static, you can retry. It can be more reliable to proceed to
@@ -223,13 +245,6 @@ that generates this file and the crawl job can fail fast if it cannot locate it.
223
245
relating to WP2Static, [raise an issue on their repo](https://github.com/leonstafford/wp2static/issues).
224
246
For any issues relating to this module, [raise an issue against this repo.](https://github.com/TechToSpeech/terraform-aws-serverless-static-wordpress/issues)
225
247
226
-
227
-
### Connecting to container with ECS Exec
228
-
229
-
ECS Exec is supported to help troubleshooting container issues. Read to [AWS Docs](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) for usage instructions.
230
-
231
-
It's recommended that the `ecs_healthcheck_enabled` variable is set to `false` to prevent the container from being terminated and replaced while troubleshooting.
232
-
233
248
## Inputs
234
249
235
250
| Name | Description | Type | Default | Required |
@@ -239,6 +254,7 @@ It's recommended that the `ecs_healthcheck_enabled` variable is set to `false` t
239
254
| <aname="input_cloudfront_class"></a> [cloudfront\_class](#input\_cloudfront\_class)| The [price class](https://aws.amazon.com/cloudfront/pricing/) for the distribution. One of: PriceClass\_All, PriceClass\_200, PriceClass\_100 |`string`|`"PriceClass_All"`| no |
240
255
| <aname="input_cloudfront_function_301_redirects"></a> [cloudfront\_function\_301\_redirects](#input\_cloudfront\_function\_301\_redirects)| A list of key value pairs of Regex match and destination for 301 redirects at CloudFront. |`map(any)`| <pre>{<br> "^(.*)index\\.php$": "$1"<br>}</pre> | no |
241
256
| <aname="input_ecs_cpu"></a> [ecs\_cpu](#input\_ecs\_cpu)| The CPU limit password to the Wordpress container definition. |`number`|`256`| no |
257
+
| <aname="input_ecs_healthcheck_enabled"></a> [ecs\_healthcheck\_enabled](#input\_ecs\_healthcheck\_enabled)| Runs an healtchcheck against the container. |`bool`|`true`| no |
242
258
| <aname="input_ecs_memory"></a> [ecs\_memory](#input\_ecs\_memory)| The memory limit password to the Wordpress container definition. |`number`|`512`| no |
243
259
| <aname="input_graviton_codebuild_enabled"></a> [graviton\_codebuild\_enabled](#input\_graviton\_codebuild\_enabled)| Flag that controls whether CodeBuild should use Graviton-based build agents in [supported regions](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html). |`bool`|`false`| no |
244
260
| <aname="input_graviton_fargate_enabled"></a> [graviton\_fargate\_enabled](#input\_graviton\_fargate\_enabled)| Flag that controls whether ECS Fargate should use Graviton-based containers in [supported regions]https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate-Regions.html).|`bool`|`false`| no |
@@ -259,6 +275,8 @@ It's recommended that the `ecs_healthcheck_enabled` variable is set to `false` t
259
275
| <aname="input_wordpress_admin_user"></a> [wordpress\_admin\_user](#input\_wordpress\_admin\_user)| The username of the default wordpress admin user. |`string`|`"supervisor"`| no |
260
276
| <aname="input_wordpress_memory_limit"></a> [wordpress\_memory\_limit](#input\_wordpress\_memory\_limit)| The memory to allow the Wordpress process to use (in M) |`string`|`"256M"`| no |
261
277
| <aname="input_wordpress_subdomain"></a> [wordpress\_subdomain](#input\_wordpress\_subdomain)| The subdomain used for the Wordpress container. |`string`|`"wordpress"`| no |
278
+
| <aname="input_wp2static_s3_addon_version"></a> [wp2static\_s3\_addon\_version](#input\_wp2static\_s3\_addon\_version)| Version of the WP2Static S3 Add-on to use from https://github.com/leonstafford/wp2static-addon-s3/releases/|`string`|`"1.0"`| no |
279
+
| <aname="input_wp2static_version"></a> [wp2static\_version](#input\_wp2static\_version)| Version of WP2Static to use from https://github.com/WP2Static/wp2static/releases|`string`|`"7.1.7"`| no |
262
280
## Modules
263
281
264
282
| Name | Source | Version |
@@ -300,8 +318,10 @@ It's recommended that the `ecs_healthcheck_enabled` variable is set to `false` t
|[aws_iam_policy_document.ecs_assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
324
344
|[aws_iam_policy_document.wordpress_bucket_access](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
345
+
|[aws_iam_policy_document.wordpress_ecs_exec](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document)| data source |
325
346
|[aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region)| data source |
Copy file name to clipboardExpand all lines: modules/codebuild/README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ This module sets up the build to take a vanilla Wordpress image and bake customi
16
16
| <aname="input_site_name"></a> [site\_name](#input\_site\_name)| The unique name for this instance of the module. Required to deploy multiple wordpress instances to the same AWS account (if desired). |`string`| n/a | yes |
17
17
| <aname="input_wordpress_ecr_repository"></a> [wordpress\_ecr\_repository](#input\_wordpress\_ecr\_repository)| The ECR repository where the Wordpress image is stored. |`string`| n/a | yes |
18
18
| <aname="input_wp2static_s3_addon_version"></a> [wp2static\_s3\_addon\_version](#input\_wp2static\_s3\_addon\_version)| Version of the WP2Static S3 Add-on to use from https://github.com/leonstafford/wp2static-addon-s3/releases/|`string`|`"1.0"`| no |
19
-
| <aname="input_wp2static_version"></a> [wp2static\_version](#input\_wp2static\_version)| Version of WP2Static to use from https://github.com/leonstafford/wp2static/releases|`string`|`"7.1.7"`| no |
19
+
| <aname="input_wp2static_version"></a> [wp2static\_version](#input\_wp2static\_version)| Version of WP2Static to use from https://github.com/WP2Static/wp2static/releases|`string`|`"7.1.7"`| no |
0 commit comments