Skip to content

Commit a8b75b3

Browse files
author
amanravi-squareops
committed
run lint command
1 parent aa63d18 commit a8b75b3

File tree

5 files changed

+68
-10
lines changed

5 files changed

+68
-10
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ The required IAM permissions to create resources from this module can be found [
196196
| <a name="output_db_instance_name"></a> [db\_instance\_name](#output\_db\_instance\_name) | Name of the database instance |
197197
| <a name="output_db_instance_password"></a> [db\_instance\_password](#output\_db\_instance\_password) | Password for accessing the database. |
198198
| <a name="output_db_instance_username"></a> [db\_instance\_username](#output\_db\_instance\_username) | Master username for accessing the database. |
199+
| <a name="output_db_name"></a> [db\_name](#output\_db\_name) | The database name used in the RDS module |
199200
| <a name="output_db_parameter_group_id"></a> [db\_parameter\_group\_id](#output\_db\_parameter\_group\_id) | ID of the parameter group associated with the RDS instance. |
200201
| <a name="output_db_subnet_group_id"></a> [db\_subnet\_group\_id](#output\_db\_subnet\_group\_id) | ID of the subnet group associated with the RDS instance. |
201202
| <a name="output_master_credential_secret_arn"></a> [master\_credential\_secret\_arn](#output\_master\_credential\_secret\_arn) | The ARN of the master user secret (Only available when manage\_master\_user\_password is set to true) |

examples/complete/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This example will be very useful for users who are new to a module and want to q
2727
| Name | Source | Version |
2828
|------|--------|---------|
2929
| <a name="module_kms"></a> [kms](#module\_kms) | terraform-aws-modules/kms/aws | ~> 1.0 |
30-
| <a name="module_rds-pg"></a> [rds-pg](#module\_rds-pg) | squareops/rds-postgresql/aws | n/a |
30+
| <a name="module_rds-pg"></a> [rds-pg](#module\_rds-pg) | squareops/rds-postgresql/aws | 2.0.0 |
3131
| <a name="module_vpc"></a> [vpc](#module\_vpc) | squareops/vpc/aws | n/a |
3232

3333
## Resources
@@ -47,6 +47,7 @@ No inputs.
4747

4848
| Name | Description |
4949
|------|-------------|
50+
| <a name="output_db_name"></a> [db\_name](#output\_db\_name) | Database name |
5051
| <a name="output_instance_endpoint"></a> [instance\_endpoint](#output\_instance\_endpoint) | Connection endpoint of the RDS instance. |
5152
| <a name="output_instance_name"></a> [instance\_name](#output\_instance\_name) | Name of the database instance. |
5253
| <a name="output_instance_password"></a> [instance\_password](#output\_instance\_password) | Password for accessing the database (Note: Terraform does not track this password after initial creation). |

examples/complete/main.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ module "vpc" {
104104
module "rds-pg" {
105105
source = "squareops/rds-postgresql/aws"
106106
version = "2.0.0"
107-
name = local.name
108-
db_name = "test"
109-
multi_az = false
110-
family = local.family
107+
name = local.name
108+
db_name = "test"
109+
multi_az = false
110+
family = local.family
111111
vpc_id = module.vpc.vpc_id
112-
allowed_security_groups = local.allowed_security_groups
112+
allowed_security_groups = local.allowed_security_groups
113113
subnet_ids = module.vpc.database_subnets
114-
environment = local.environment
114+
environment = local.environment
115115
kms_key_arn = module.kms.key_arn
116116
storage_type = local.storage_type
117117
engine_version = local.engine_version
@@ -141,7 +141,7 @@ module "rds-pg" {
141141
create_namespace = local.create_namespace
142142
postgresdb_backup_enabled = false
143143
postgresdb_backup_config = {
144-
postgres_database_name = "" # Specify the database name or Leave empty if you wish to backup all databases
144+
postgres_database_name = "" # Specify the database name or Leave empty if you wish to backup all databases
145145
cron_for_full_backup = "*/2 * * * *" # set cronjob for backup
146146
bucket_uri = "s3://my-backup-dumps-databases" # s3 bucket uri
147147
}
@@ -151,4 +151,3 @@ module "rds-pg" {
151151
backup_file_name = "atmosly_db1.sql" #Give .sql or .zip file for restore
152152
}
153153
}
154-

modules/db-backup-restore/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# db-backup-restore
2+
3+
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
4+
## Requirements
5+
6+
No requirements.
7+
8+
## Providers
9+
10+
| Name | Version |
11+
|------|---------|
12+
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
13+
| <a name="provider_helm"></a> [helm](#provider\_helm) | n/a |
14+
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | n/a |
15+
16+
## Modules
17+
18+
No modules.
19+
20+
## Resources
21+
22+
| Name | Type |
23+
|------|------|
24+
| [aws_iam_role.postgres_backup_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
25+
| [aws_iam_role.postgres_restore_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
26+
| [helm_release.postgresdb_backup](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
27+
| [helm_release.postgresdb_restore](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
28+
| [kubernetes_namespace.postgresdb](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) | resource |
29+
| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |
30+
| [aws_eks_cluster.kubernetes_cluster](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/eks_cluster) | data source |
31+
32+
## Inputs
33+
34+
| Name | Description | Type | Default | Required |
35+
|------|-------------|------|---------|:--------:|
36+
| <a name="input_azure_container_name"></a> [azure\_container\_name](#input\_azure\_container\_name) | Azure container name | `string` | `""` | no |
37+
| <a name="input_azure_storage_account_key"></a> [azure\_storage\_account\_key](#input\_azure\_storage\_account\_key) | Azure storage account key | `string` | `""` | no |
38+
| <a name="input_azure_storage_account_name"></a> [azure\_storage\_account\_name](#input\_azure\_storage\_account\_name) | Azure storage account name | `string` | `""` | no |
39+
| <a name="input_bucket_provider_type"></a> [bucket\_provider\_type](#input\_bucket\_provider\_type) | Choose what type of provider you want (s3, gcs) | `string` | `"s3"` | no |
40+
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Specifies the name of the EKS cluster to deploy the MySQL application on. | `string` | `""` | no |
41+
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Specify whether or not to create the namespace if it does not already exist. Set it to true to create the namespace. | `string` | `false` | no |
42+
| <a name="input_iam_role_arn_backup"></a> [iam\_role\_arn\_backup](#input\_iam\_role\_arn\_backup) | IAM role ARN for backup (AWS) | `string` | `""` | no |
43+
| <a name="input_iam_role_arn_restore"></a> [iam\_role\_arn\_restore](#input\_iam\_role\_arn\_restore) | IAM role ARN for restore (AWS) | `string` | `""` | no |
44+
| <a name="input_name"></a> [name](#input\_name) | Name identifier for module to be added as suffix to resources | `string` | `"test"` | no |
45+
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Name of the Kubernetes namespace where the MYSQL deployment will be deployed. | `string` | `"postgresdb"` | no |
46+
| <a name="input_postgresdb_backup_config"></a> [postgresdb\_backup\_config](#input\_postgresdb\_backup\_config) | configuration options for MySQL database backups. It includes properties such as the S3 bucket URI, the S3 bucket region, and the cron expression for full backups. | `map(string)` | <pre>{<br/> "bucket_uri": "",<br/> "cron_for_full_backup": "",<br/> "postgres_database_name": "",<br/> "s3_bucket_region": ""<br/>}</pre> | no |
47+
| <a name="input_postgresdb_backup_enabled"></a> [postgresdb\_backup\_enabled](#input\_postgresdb\_backup\_enabled) | Specifies whether to enable backups for MySQL database. | `bool` | `false` | no |
48+
| <a name="input_postgresdb_permission"></a> [postgresdb\_permission](#input\_postgresdb\_permission) | access | `bool` | `false` | no |
49+
| <a name="input_postgresdb_restore_config"></a> [postgresdb\_restore\_config](#input\_postgresdb\_restore\_config) | Configuration options for restoring dump to the MySQL database. | `any` | <pre>{<br/> "DB_NAME": "",<br/> "backup_file_name": "",<br/> "bucket_uri": "",<br/> "file_name": ""<br/>}</pre> | no |
50+
| <a name="input_postgresdb_restore_enabled"></a> [postgresdb\_restore\_enabled](#input\_postgresdb\_restore\_enabled) | Specifies whether to enable restoring dump to the MySQL database. | `bool` | `false` | no |
51+
| <a name="input_service_account_backup"></a> [service\_account\_backup](#input\_service\_account\_backup) | Service account for backup (GCP) | `string` | `""` | no |
52+
| <a name="input_service_account_restore"></a> [service\_account\_restore](#input\_service\_account\_restore) | Service account for restore (GCP) | `string` | `""` | no |
53+
54+
## Outputs
55+
56+
No outputs.
57+
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

modules/db-backup-restore/roles.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ resource "aws_iam_role" "postgres_backup_role" {
5858

5959
resource "aws_iam_role" "postgres_restore_role" {
6060
count = var.postgresdb_restore_enabled ? 1 : 0
61-
name = format("%s-%s-%s", var.cluster_name, var.name, "postgres-restore")
61+
name = format("%s-%s-%s", var.cluster_name, var.name, "postgres-restore")
6262
assume_role_policy = jsonencode({
6363
Version = "2012-10-17",
6464
Statement = [

0 commit comments

Comments
 (0)