A custom-built terraform module, leveraging terraform's aws provider to spawn supplemental infrastructure that supports Wordpress environments. This includes:
- AWS S3 Buckets used for uploads and static media files
- AWS IAM Roles for these S3 Buckets
- AWS RDS Aurora MySQL/Postgres databases
- AWS EFS drives
(TBC) - in the meantime, feel free to have a look at examples/full-wordpress
Code formatting and documentation for variables and outputs is generated using pre-commit-terraform hooks.
Follow these instructions to install pre-commit locally, which is required as a git pre-commit hook.
Created by Aaron Baideme - aaron.baideme@advancedtechnologies.com.hk
| Name | Version |
|---|---|
| terraform | >= 1.0 |
| aws | ~> 3.10 |
| Name | Version |
|---|---|
| aws | 3.48.0 |
| local | 2.1.0 |
| random | 3.1.0 |
| Name | Source | Version |
|---|---|---|
| aurora | terraform-aws-modules/rds-aurora/aws | ~> 5.2 |
| efs-provisioning | ./submodules/efs | n/a |
| iam_user | terraform-aws-modules/iam/aws//modules/iam-user | ~> 3.0 |
| iam_user_ro | terraform-aws-modules/iam/aws//modules/iam-user | ~> 3.0 |
| s3_website_bucket | terraform-aws-modules/s3-bucket/aws | ~> 1.22 |
| Name | Type |
|---|---|
| aws_db_parameter_group.default_wordpress | resource |
| aws_db_subnet_group.default_eks | resource |
| aws_iam_policy.s3_access_policy | resource |
| aws_iam_policy.s3_access_policy_ro | resource |
| aws_iam_role_policy_attachment.s3_attach_roles | resource |
| aws_iam_role_policy_attachment.s3_attach_roles_ro | resource |
| aws_iam_user_policy_attachment.s3_attach_user | resource |
| aws_iam_user_policy_attachment.s3_attach_user_ro | resource |
| aws_kms_key.rds_encryption | resource |
| aws_rds_cluster_parameter_group.default_wordpress | resource |
| random_password.master | resource |
| aws_iam_policy_document.policy_data | data source |
| aws_iam_policy_document.policy_data_ro | data source |
| aws_subnet.cluster_vpc_private_subnets | data source |
| aws_subnet_ids.cluster_vpc_private_subnet_ids | data source |
| aws_vpc.cluster_vpc | data source |
| local_file.terraform-module-version | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| allowed_origin_urls | A list of specific FE urls that should be allowed via CORS to access resources in S3 | list(string) |
[] |
no |
| app_slug | Application Slug | any |
n/a | yes |
| aws_region | Region for the VPC | any |
n/a | yes |
| billingcustomer | Which BILLINGCUSTOMER is setup in AWS | any |
n/a | yes |
| component_provisioning | Component Provisioning for this Wordpress environment: S3, RDS, EFS Filesystem Name(s)? | object({ |
{ |
no |
| environment | Environment | any |
n/a | yes |
| namespace | Application Namespace used for this infrastructure | any |
n/a | yes |
| product | Specific product/application used for this terraform provisioning | string |
"wordpress-website" |
no |
| rds_config | RDS Configuration Parameters | object({ |
{ |
no |
| rds_database_config | Provision initial database and user credentials | object({ |
{ |
no |
| s3_config | S3 Configuration Parameters | object({ |
{ |
no |
| subnet_name | Full Subnet name or prefix of name, required for the system to find the necessary subnets to configure any additional networking components, if left null, it will try to search via VPC Name | any |
null |
no |
| vpc_name | Full VPC name or prefix of name, required for the system to find the VPC to configure any additional networking components | any |
n/a | yes |
| Name | Description |
|---|---|
| provisioned_efs_filesystems | AWS EFS IDs for all filesystems provisioned |
| this_iam_ro_user_access_key_id | Access Key ID for Provisioned IAM User for S3 |
| this_iam_ro_user_access_key_secret | Access Secret for Provisioned IAM User for S3 |
| this_iam_user_access_key_id | Access Key ID for Provisioned IAM User for S3 |
| this_iam_user_access_key_secret | Access Secret for Provisioned IAM User for S3 |
| this_rds_cluster_endpoint | The cluster endpoint |
| this_rds_cluster_instance_endpoints | A list of all cluster instance endpoints |
| this_rds_cluster_instance_root_password | RDS Cluster Master Password |
| this_rds_cluster_reader_endpoint | The cluster reader endpoint |
| this_s3_bucket_id | AWS S3 Bucket |