Skip to content

docs: Update import commands for state changes section#49

Merged
bryantbiggs merged 1 commit intoterraform-aws-modules:masterfrom
john-terraform:docs/upgrade-20
Dec 3, 2025
Merged

docs: Update import commands for state changes section#49
bryantbiggs merged 1 commit intoterraform-aws-modules:masterfrom
john-terraform:docs/upgrade-20

Conversation

@john-terraform
Copy link
Contributor

Description

Update terraform import example commands in UPGRADE-2.0.md.

Current terraform import commands in the State Changes example snippet suggest importing SG rules, created via pre 2.0 module versions, using the pattern of an SG rule ID that belongs to aws_security_group_rule resource (i.e. sg-xxx).
Meanwhile, the aws_vpc_security_group_ingress_rule resource ID for import is slightly different (i.e. sgr-xxx).

Motivation and Context

  • Accurate documentation is nice

Breaking Changes

  • N/A

How Has This Been Tested?

  • I have executed pre-commit run -a on my pull request

@john-terraform john-terraform changed the title docs: updated import commands for state changes section Updated import commands for state changes section Dec 3, 2025
@john-terraform john-terraform changed the title Updated import commands for state changes section docs: Updated import commands for state changes section in UPGRADE-2.0.md Dec 3, 2025
@bryantbiggs bryantbiggs changed the title docs: Updated import commands for state changes section in UPGRADE-2.0.md docs: Update import commands for state changes section Dec 3, 2025
@bryantbiggs
Copy link
Member

actually, this is wrong - security group IDs start with sg-*. Either way, its just a reference for what users need to provide since we cannot tell them what their security group ID is

@bryantbiggs bryantbiggs closed this Dec 3, 2025
@john-terraform
Copy link
Contributor Author

@bryantbiggs, you are right about the security group IDs. In this particular case, the reference is made for importing existing security group rules, not the security group resources, due to migration from a single aws_security_group_rule resource to instances of aws_vpc_security_group_ingress_rule within the module in 2.0.0.

In this PR, I adjusted the import reference for aws_vpc_security_group_ingress_rule accordingly, which should include the security group rule ID [Resource: aws_vpc_security_group_ingress_rule].

Came across this document today, while upgrading to the EFS module 2.0.0, noticed this minor mistake (probably someone's typo), and decided to correct it.

@bryantbiggs bryantbiggs reopened this Dec 3, 2025
@bryantbiggs bryantbiggs merged commit 07c13f3 into terraform-aws-modules:master Dec 3, 2025
11 of 13 checks passed
@john-terraform john-terraform deleted the docs/upgrade-20 branch December 4, 2025 19:41
@antonbabenko
Copy link
Member

This PR is included in version 2.1.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants