Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename the exported security_group_inputs.tf file to security-group-inputs.tf #30

Merged
merged 11 commits into from
Dec 29, 2021
2 changes: 1 addition & 1 deletion .github/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ template: |

replacers:
# Remove irrelevant information from Renovate bot
- search: '/(?<=---\s+)+^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
- search: '/(?<=---\s)\s*^#.*(Renovate configuration|Configuration)(?:.|\n)*?This PR has been generated .*/gm'
replace: ''
# Remove Renovate bot banner image
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 Cloud Posse, LLC
Copyright 2021-2022 Cloud Posse, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,18 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
### Contributors

<!-- markdownlint-disable -->
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] |
|---|---|
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] | [![RB][nitrocode_avatar]][nitrocode_homepage]<br/>[RB][nitrocode_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] |
|---|---|---|---|
<!-- markdownlint-restore -->

[osterman_homepage]: https://github.com/osterman
[osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
[SweetOps_homepage]: https://github.com/SweetOps
[SweetOps_avatar]: https://img.cloudposse.com/150x150/https://github.com/SweetOps.png
[nitrocode_homepage]: https://github.com/nitrocode
[nitrocode_avatar]: https://img.cloudposse.com/150x150/https://github.com/nitrocode.png
[aknysh_homepage]: https://github.com/aknysh
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png

[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]
Expand Down
4 changes: 4 additions & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,7 @@ contributors:
github: "osterman"
- name: "Vladimir"
github: "SweetOps"
- name: "RB"
github: "nitrocode"
- name: "Andriy Knysh"
github: "aknysh"
5 changes: 5 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ output "disabled_sg_name" {
description = "The disabled Security Group Name (should be empty)"
value = module.disabled_security_group.name == null ? "" : module.disabled_security_group.name
}

output "rules_terraform_ids" {
description = "List of Terraform IDs of created `security_group_rule` resources"
value = module.new_security_group.rules_terraform_ids
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# security_group_inputs Version: 2
# security-group-inputs Version: 2
#
# Copy this file from https://github.com/cloudposse/terraform-aws-security-group/blob/master/exports/security_group_inputs.tf
# Copy this file from https://github.com/cloudposse/terraform-aws-security-group/blob/master/exports/security-group-inputs.tf
# and EDIT IT TO SUIT YOUR PROJECT. Update the version number above if you update this file from a later version.
# Unlike null-label context.tf, this file cannot be automatically updated
# because of the tight integration with the module using it.
Expand Down
23 changes: 12 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,18 @@ resource "aws_security_group" "cbd" {
resource "aws_security_group_rule" "keyed" {
for_each = local.keyed_resource_rules

type = each.value.type
from_port = each.value.from_port
to_port = each.value.to_port
protocol = each.value.protocol
description = each.value.description
cidr_blocks = length(each.value.cidr_blocks) == 0 ? null : each.value.cidr_blocks
ipv6_cidr_blocks = length(each.value.ipv6_cidr_blocks) == 0 ? null : each.value.ipv6_cidr_blocks
prefix_list_ids = length(each.value.prefix_list_ids) == 0 ? [] : each.value.prefix_list_ids
self = each.value.self

security_group_id = local.security_group_id
security_group_id = local.security_group_id

type = each.value.type
from_port = each.value.from_port
to_port = each.value.to_port
protocol = each.value.protocol
description = each.value.description

cidr_blocks = length(each.value.cidr_blocks) == 0 ? null : each.value.cidr_blocks
ipv6_cidr_blocks = length(each.value.ipv6_cidr_blocks) == 0 ? null : each.value.ipv6_cidr_blocks
prefix_list_ids = length(each.value.prefix_list_ids) == 0 ? [] : each.value.prefix_list_ids
self = each.value.self
source_security_group_id = each.value.source_security_group_id

depends_on = [aws_security_group.cbd, aws_security_group.default]
Expand Down
2 changes: 0 additions & 2 deletions normalize.tf
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,3 @@ locals {
all_resource_rules = concat(local.norm_rules, local.self_rules, local.sg_exploded_rules, local.other_rules, local.extra_rules)
keyed_resource_rules = { for r in local.all_resource_rules : r.key => r }
}


1 change: 0 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

output "id" {
description = "The created or target Security Group ID"
value = local.security_group_id
Expand Down