Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Dec 21, 2023
1 parent c91b630 commit abc9d12
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.terraform*
.DS_Store
terraform.*
terraform.*
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# batcave-tf-redis

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_elasticache_cluster.redis](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster) | resource |
| [aws_subnet.private](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/subnet) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | n/a | `string` | `""` | no |
| <a name="input_engine"></a> [engine](#input\_engine) | n/a | `string` | `""` | no |
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | n/a | `string` | `""` | no |
| <a name="input_node_type"></a> [node\_type](#input\_node\_type) | n/a | `string` | `""` | no |
| <a name="input_num_cache_nodes"></a> [num\_cache\_nodes](#input\_num\_cache\_nodes) | n/a | `number` | `1` | no |
| <a name="input_parameter_group_name"></a> [parameter\_group\_name](#input\_parameter\_group\_name) | n/a | `string` | `""` | no |
| <a name="input_port"></a> [port](#input\_port) | n/a | `number` | `6379` | no |
| <a name="input_security_group_ids"></a> [security\_group\_ids](#input\_security\_group\_ids) | n/a | `list(string)` | `[]` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | n/a | `map(string)` | <pre>{<br> "Owner": "Batcave"<br>}</pre> | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | n/a | `any` | n/a | yes |

## Outputs

No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
17 changes: 1 addition & 16 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


resource "aws_elasticache_cluster" "redis" {
cluster_id = var.cluster_id
cluster_id = var.cluster_id
engine = var.engine
engine_version = var.engine_version
node_type = var.node_type
Expand All @@ -28,13 +28,6 @@ resource "aws_subnet" "private" {
cidr_block = "10.202.196.0/23"
}

# private subnets
data "aws_subnets" "private" {
filter {
name = "tag:Name"
values = [ "${var.project}-*-${var.env}-private-*"]
}
}



Expand All @@ -44,11 +37,3 @@ data "aws_subnets" "private" {
// }
// )
// }








2 changes: 1 addition & 1 deletion output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// output "db_subnet_group_name" {
// description = "The db subnet group name"
// value = module.redis.subnet_group_namee
// }
// }
42 changes: 15 additions & 27 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
variable "env" {
default = "dev"
}

variable "project" {
default = "eppe"
}

variable "vpc_id" {}

variable "cluster_id" {
default = ""
type = string
default = ""
type = string
}

variable "engine" {
default = ""
type = string
default = ""
type = string
}

variable "engine_version" {
default = ""
type = string
default = ""
type = string
}

variable "node_type" {
default = ""
type = string
default = ""
type = string
}

variable "num_cache_nodes" {
default = 1
type = number
default = 1
type = number
}

variable "parameter_group_name" {
default = ""
type = string
default = ""
type = string
}

variable "security_group_ids" {
Expand All @@ -44,13 +37,8 @@ variable "security_group_ids" {
}

variable "port" {
default = 6379
type = number
}

variable "subnet_ids" {
type = list(string)
default = []
default = 6379
type = number
}

// variable "subnet_lookup_overrides" {
Expand All @@ -64,4 +52,4 @@ variable "tags" {
default = {
Owner = "Batcave"
}
}
}

0 comments on commit abc9d12

Please sign in to comment.