Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.
Error configuring: The dependency graph is not valid:
* Cycle: aws_security_group.supertasker_mongo_staging
My expected result in the background would be to first create the aws_security_group, get its computed id internally, and use if needed.
I could bypass this issue by creating a second security group (accept_from_supertasker_mongo_staging) that accepts connections from supertasker_mongo_staging and appoint both security groups to my Mongos but I find it less elegant.
I need to self-reference an
aws_security_group
in the ingress block like so:Result is :
My expected result in the background would be to first create the
aws_security_group
, get its computed id internally, and use if needed.I could bypass this issue by creating a second security group (
accept_from_supertasker_mongo_staging
) that accepts connections fromsupertasker_mongo_staging
and appoint both security groups to my Mongos but I find it less elegant.