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
Error: module "security-group":"depends_on" is not a valid argument
Given that I'm implementing a work around anyway, I'm fine with running apply twice, so I thought I would just set create of the security-group to false if the load balancers hadn't been setup yet. So I added the following:
# Only create once the load balancers have been createdcreate="${data.aws_network_interface.elb-tcp.count>1?true:false}"
But that gives me a ton of errors of the form:
Error: module.security-group.aws_security_group_rule.computed_egress_rules:1error(s) occurred:* module.security-group.aws_security_group_rule.computed_egress_rules: At column 46, line 1:list"var.computed_egress_rules" does not have any elements so cannot determine type. in:
${element(var.rules[var.computed_egress_rules[count.index]], 0)}
Error: module.security-group.aws_security_group_rule.ingress_rules:1error(s) occurred:* module.security-group.aws_security_group_rule.ingress_rules: At column 38, line 1:list"var.ingress_rules" does not have any elements so cannot determine type. in:
${element(var.rules[var.ingress_rules[count.index]], 1)}
Error: module.security-group.aws_security_group_rule.ingress_with_self:1error(s) occurred:* module.security-group.aws_security_group_rule.ingress_with_self: At column 31, line 1:list"var.ingress_with_self" does not have any elements so cannot determine type. in:
${lookup(var.ingress_with_self[count.index], "description", "Ingress Rule")}
Right now I'm just running apply twice and ignoring the error, but I would really like a cleaner workaround for my workaround. 😄
The text was updated successfully, but these errors were encountered:
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.
Due to some outstanding issues with Terraform's AWS provider, I'm trying to find a way to pass some calculated CIDRs into a security group.
Right now the following snippet runs
but gives the following error on first
terraform apply
I thought that I could perhaps add a depends on to the
security-group
module like so:But that gives the following error:
Given that I'm implementing a work around anyway, I'm fine with running apply twice, so I thought I would just set create of the security-group to false if the load balancers hadn't been setup yet. So I added the following:
But that gives me a ton of errors of the form:
Right now I'm just running apply twice and ignoring the error, but I would really like a cleaner workaround for my workaround. 😄
The text was updated successfully, but these errors were encountered: