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

fix: Set correct port values for all-all #317

Closed
wants to merge 1 commit into from

Conversation

robinbowes
Copy link
Contributor

@robinbowes robinbowes commented Mar 18, 2024

Description

Set the correct values for from_port and to_port when protocol is -1, as per the Terraform documentation.

Motivation and Context

Breaking Changes

The Terraform aws provider documentation for the protocol argument for the ingress block of the aws_security_group resource states:

If you select a protocol of -1 (semantically equivalent to all, which is not a valid value here), you must specify a from_port and to_port equal to 0

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
    • the complete example already uses -the all-all rule
  • I have tested and validated these changes using one or more of the provided examples/* projects
    • I applied + destroyed the "complete" example
  • I have executed pre-commit run -a on my pull request

@robinbowes robinbowes changed the title Set correct port values for all-all fix: set correct port values for all-all Mar 18, 2024
@robinbowes robinbowes changed the title fix: set correct port values for all-all fix: Set correct port values for all-all Mar 18, 2024
@robinbowes
Copy link
Contributor Author

Not really related to this PR, but I notice that when I run terraform init (using Terraform v1.0.11), Terraform creates a lock file (.terraform.lock.hcl) with this content:

# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.

provider "registry.terraform.io/hashicorp/aws" {
  version     = "5.41.0"
  constraints = ">= 3.29.0, >= 5.30.0"
  hashes = [
    "h1:SgIWBDBA1uNB/Y7CaLFeNX/Ju2xboSSQmRv35Vbi46M=",
  ]
}

I'm curious - where does the >= 5.30.0 constraint come from? The >= 3.29.0 constraint is in versions.tf but I can't find any reference to 5.30.0 anywhere.

Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Apr 19, 2024
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Apr 29, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant