-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Updated behavior, features, and variable names #99
Comments
Standardized input names, part 1: provider inputs.
Standardized input names, part 2: other inputs.
Default Security Group
|
I agree with all changes.
Lets rename, but introduce the
It's painful, but yes. I think this long predated any of our conventions. The reason for the suffixed
Yes, though we should make it clear that they are deprecated. |
I think so. Let's rename, deprecate and alias.
I think it should be
I don't have enough experience to answer this.
I hate boolean explosion. I'd prefer then we have a new variable called |
Agree
No, I don't think we should muck with the default security group. However, maybe we add a feature flag that is
So I think this could be our defaults, for example, in the new VPC. Thus by deleting the default VPC and setting these secure defaults, we achieve the best practice.
Can we change what security group is the "default" to one we manage? |
Motivation
Cloud Posse is undertaking an effort to modernize and standardize its open source AWS Terraform modules with respect to handling AWS Security Groups, optional inputs, and certain other things. This module,
terraform-aws-vpc
is schedule for such modernization, and Cloud Posse is taking this opportunity to introduce breaking changes if needed. Changes that have been or would have been rejected earlier as nice but breaking are now being considered, and after this revision, this module will again go back to resisting breaking changes. This is the time to get those fixes in.Please propose or comment on proposed breaking changes you would like to advocate for or against.
Changes (with decisions in [brackets])
Standardized input names, part 1: provider inputs.
Cloud Posse standard is that boolean inputs have names that end with
_enabled
. However, Cloud Posse seeks to use the same input names as the related Terraform AWS Resource to provide consistency with the documentation. Thevpc
resource provides a challenge in this regard. The resource, and the current version of this module, provide inputs named:enable_dns_hostnames
enable_dns_support
enable_classiclink
enable_classiclink_dns_support
assign_generated_ipv6_cidr_block
Should we keep these variables with these name? [Yes, but mark them deprecated]
Should rename these variables according to Cloud Posse naming conventions: [Yes]
variables-deprecated.tf
and put deprecated variables in it.]Standardized input names, part 2: other inputs.
The input
enable_internet_gateway
is not a standard Terraform input, but follows the naming convention of the other inputs. Should we treat it like the above inputs and either leave it, rename it tointernet_gateway_enabled
, or alias it? [treat as above]There is a Feature Request (Egress only internet gateway #93) and a PR (feat[#93]: Added aws_egress_only_internet_gateway #94) requesting that we add to this module the ability to create an Egress-only Internet Gateway. Such a gateway provides the same general security benefit for IPv6 that a NAT gateway provides for IPv4, but does not actually do Network Address Translation. This is because there is no such thing in an AWS VPC as a "private" IPv6 subnet; all IPv6 addresses are public. Because the IPv6 address space is big enough, there is no need for Network Address Translation, but since all the addresses are public, there is still a need for a way to block initiation of inbound connections: that is what the Egress-Only Gateway does. If we implement the feature, what should we name the input, given the decisions above. Should it be
egress_only_internet_gateway_enabled
? Or, given that it is a mistake to provision both a bidirectional internet gateway an an egress-only gateway at the same time, should we create a flag likeinternet_gateway_is_egress_only
and have it toggle the kind of gateway created wheninternet_gateway_enabled
istrue
?[It is not necessarily a mistake to have both an internet gateway and an egress-only IPv6 network, since you can use routing tables and network ACLs to cordon off some servers to egress only. Add new flag
ipv6_egress_only_internet_gateway_enabled
]Default Security Group
The input
enable_default_security_group_with_custom_rules
should be replaced as part of the security group upgrade. Probably theterraform-aws-security-group
module should be enhanced to take the same rule sets and apply them to the default security group, so that we have consistent input formats for security group rules and no duplication of code parsing them. However, given the Bridegcrew recommendation that the default security group should prohibit all ingress and egress, perhaps we should just enforce that and encourage people to use non-default security groups.If we are going to allow custom configuration of the default security group, then we should do it by accepting rules in the format of
terraform-aws-security-group
and using that module to manage them.[Replace
enable_default_security_group_with_custom_rules
withdefault_security_group_deny_all
. When true (the default), manage the default security group and remove all rules, disabling all ingress and egress. When false, do not manage the default security group, allowing it to be managed by another component.]The text was updated successfully, but these errors were encountered: