You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to set up a pair of EC2 SGs in ec2-classic so they have rules that allow ingress to one another.
Here's an approximation:
resource "aws_security_group" "sg_classic_tier_saltmaster" {
name = "sg_classic_tier_saltmaster"
}
# Generic SGs not tied to a specific tier
resource "aws_security_group" "sg_classic_minion" {
name = "sg_classic_minion"
}
resource "aws_security_group_rule" "allow_salt_master_to_ssh_to_minions" {
type = "ingress"
from_port = 22
to_port = 22
protocol = "tcp"
security_group_id = "${aws_security_group.sg_classic_tier_saltmaster.id}"
source_security_group_id = "${aws_security_group.sg_classic_minion.name}"
}
Note that for source_security_group_id, the name needs to be used or else the SG won't get found in ec2 classic.
The effect here is that after creating a plan, then applying that plan, the changes are made (port 22 is permitted) but the crash happens before the state file is written. So upon the next run, it complains that the rules already exist.
Hey @pcn – sorry for the silence here. I think this is related to #4983 so I'm going to work on getting that merged first. There's another user who's commented on some other fixes, which I think will address this, we just need to get them into pull request form.
I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 27, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to set up a pair of EC2 SGs in ec2-classic so they have rules that allow ingress to one another.
Here's an approximation:
Note that for source_security_group_id, the name needs to be used or else the SG won't get found in ec2 classic.
The effect here is that after creating a plan, then applying that plan, the changes are made (port 22 is permitted) but the crash happens before the state file is written. So upon the next run, it complains that the rules already exist.
Crash log:
https://gist.github.com/pcn/a1912e44aec5a5c6c272
The text was updated successfully, but these errors were encountered: