Skip to content

Commit

Permalink
docs(readme): update module usage
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and marwinbaumannsbp committed Oct 24, 2023
1 parent 9c9d81a commit 73e6d3b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ No modules.
| <a name="input_s3_key"></a> [s3\_key](#input\_s3\_key) | The S3 key of an object containing the function's deployment package | `string` | `null` | no |
| <a name="input_s3_object_version"></a> [s3\_object\_version](#input\_s3\_object\_version) | The object version containing the function's deployment package | `string` | `null` | no |
| <a name="input_security_group_egress_rules"></a> [security\_group\_egress\_rules](#input\_security\_group\_egress\_rules) | Security Group egress rules | <pre>list(object({<br> cidr_ipv4 = optional(string)<br> cidr_ipv6 = optional(string)<br> description = string<br> from_port = optional(number, 0)<br> ip_protocol = optional(string, "-1")<br> prefix_list_id = optional(string)<br> referenced_security_group_id = optional(string)<br> to_port = optional(number, 0)<br> }))</pre> | `[]` | no |
| <a name="input_sg_name_prefix"></a> [sg\_name\_prefix](#input\_sg\_name\_prefix) | An optional prefix to create a unique name of the security group. If not provided `var.name` will be used | `string` | `null` | no |
| <a name="input_source_code_hash"></a> [source\_code\_hash](#input\_source\_code\_hash) | Optional source code hash | `string` | `null` | no |
| <a name="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids) | The subnet ids where this lambda needs to run | `list(string)` | `null` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | A mapping of tags to assign to the bucket | `map(string)` | `{}` | no |
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ resource "aws_security_group" "default" {
#checkov:skip=CKV2_AWS_5: False positive finding, the security group is attached.
count = var.subnet_ids != null ? 1 : 0

name = var.sg_name_prefix == null ? var.name : null
name_prefix = var.sg_name_prefix != null ? var.sg_name_prefix : null
name = var.security_group__name_prefix == null ? var.name : null
name_prefix = var.security_group__name_prefix != null ? var.security_group__name_prefix : null
description = "Security group for lambda ${var.name}"
vpc_id = data.aws_subnet.selected[0].vpc_id
tags = var.tags
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ variable "security_group_egress_rules" {
}
}

variable "sg_name_prefix" {
variable "security_group_name_prefix" {
type = string
default = null
description = "An optional prefix to create a unique name of the security group. If not provided `var.name` will be used"
Expand Down

0 comments on commit 73e6d3b

Please sign in to comment.