- Create a parameter group with the name provided:
```hcl
parameter_group_name="prod-instance-mysql-8.0"
parameter_group_use_name_prefix=false
```
- Create a parameter group using a unique prefix beginning with the name provided:
```hcl
parameter_group_name="prod-instance-mysql-8.0"
```
- Pass the name of a parameter group to use that has been created outside of the module:
```hcl
create_parameter_group=false
parameter_group_name="prod-instance-mysql-8.0"# must already exist in AWS
```
- Use a default parameter group provided by AWS
```hcl
create_parameter_group=false
```
## Examples
## Examples
-[Complete RDS example for MSSQL](https://github.com/terraform-aws-modules/terraform-aws-rds/tree/master/examples/complete-mssql)
-[Complete RDS example for MSSQL](https://github.com/terraform-aws-modules/terraform-aws-rds/tree/master/examples/complete-mssql)
...
@@ -206,7 +255,9 @@ No resources.
...
@@ -206,7 +255,9 @@ No resources.
| create\_db\_parameter\_group | Whether to create a database parameter group | `bool` | `true` | no |
| create\_db\_parameter\_group | Whether to create a database parameter group | `bool` | `true` | no |
| create\_db\_subnet\_group | Whether to create a database subnet group | `bool` | `true` | no |
| create\_db\_subnet\_group | Whether to create a database subnet group | `bool` | `true` | no |
| create\_monitoring\_role | Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. | `bool` | `false` | no |
| create\_monitoring\_role | Create IAM role with a defined name that permits RDS to send enhanced monitoring metrics to CloudWatch Logs. | `bool` | `false` | no |
| db\_subnet\_group\_description | Description of the DB subnet group to create | `string` | `""` | no |
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC | `string` | `""` | no |
| db\_subnet\_group\_name | Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC | `string` | `""` | no |
| db\_subnet\_group\_use\_name\_prefix | Determines whether to use `subnet_group_name` as is or create a unique name beginning with the `subnet_group_name` as the prefix | `bool` | `true` | no |
| delete\_automated\_backups | Specifies whether to remove automated backups immediately after the DB instance is deleted | `bool` | `true` | no |
| delete\_automated\_backups | Specifies whether to remove automated backups immediately after the DB instance is deleted | `bool` | `true` | no |
| deletion\_protection | The database can't be deleted when this value is set to true. | `bool` | `false` | no |
| deletion\_protection | The database can't be deleted when this value is set to true. | `bool` | `false` | no |
| domain | The ID of the Directory Service Active Directory domain to create the instance in | `string` | `""` | no |
| domain | The ID of the Directory Service Active Directory domain to create the instance in | `string` | `""` | no |
| create | Whether to create this resource or not? | `bool` | `true` | no |
| create | Whether to create this resource or not? | `bool` | `true` | no |
| identifier | The identifier of the resource | `string` | n/a | yes |
| description | The description of the DB subnet group | `string` | `""` | no |
| name\_prefix | Creates a unique name beginning with the specified prefix | `string` | n/a | yes |
| name | The name of the DB subnet group | `string` | `""` | no |
| subnet\_ids | A list of VPC subnet IDs | `list(string)` | `[]` | no |
| subnet\_ids | A list of VPC subnet IDs | `list(string)` | `[]` | no |
| tags | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
| tags | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
| use\_name\_prefix | Determines whether to use `name` as is or create a unique name beginning with `name` as the specified prefix | `bool` | `true` | no |
description="Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC"
type=string
default=""
}
variable"availability_zone"{
variable"availability_zone"{
description="The Availability Zone of the RDS instance"
description="The Availability Zone of the RDS instance"
type=string
type=string
...
@@ -223,6 +217,30 @@ variable "tags" {
...
@@ -223,6 +217,30 @@ variable "tags" {
}
}
# DB subnet group
# DB subnet group
variable"create_db_subnet_group"{
description="Whether to create a database subnet group"
type=bool
default=true
}
variable"db_subnet_group_name"{
description="Name of DB subnet group. DB instance will be created in the VPC associated with the DB subnet group. If unspecified, will be created in the default VPC"
type=string
default=""
}
variable"db_subnet_group_use_name_prefix"{
description="Determines whether to use `subnet_group_name` as is or create a unique name beginning with the `subnet_group_name` as the prefix"
type=bool
default=true
}
variable"db_subnet_group_description"{
description="Description of the DB subnet group to create"
type=string
default=""
}
variable"subnet_ids"{
variable"subnet_ids"{
description="A list of VPC subnet IDs"
description="A list of VPC subnet IDs"
type=list(string)
type=list(string)
...
@@ -303,12 +321,6 @@ variable "options" {
...
@@ -303,12 +321,6 @@ variable "options" {
default=[]
default=[]
}
}
variable"create_db_subnet_group"{
description="Whether to create a database subnet group"
type=bool
default=true
}
variable"create_db_instance"{
variable"create_db_instance"{
description="Whether to create a database instance"
description="Whether to create a database instance"