-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Allow passing existing subnet-group #9
Comments
@iaacautomation, currently, the value of terraform-aws-documentdb-cluster/main.tf Line 76 in e498148
terraform-aws-documentdb-cluster/main.tf Line 102 in e498148
in this context, the example of the module uses another cloudposse subnet module to generate the subnet resources. You can use that or define your own string value for the existing subnet resource in your AWS.
|
|
So I tried this without making any changes to the module or in the module call file by just providing the subnet_ids and it is still trying to create the subnet. Here is the tfvars
Below is the full tfvars
The plan is still proposing creation of all these resources which not all are needed
Please suggest if I am missing any changes |
please ignore! |
Is it possible to allow existing subnet-group to be passed? I think its not much of change just some more check.
change in resource "aws_docdb_cluster" "default" {:
db_subnet_group_name = join("", aws_docdb_subnet_group.default.*.name)
to
db_subnet_group_name = var.db_subnet_group ? va.db_subnet_group: join("", aws_docdb_subnet_group.default.*.name)
and
change in resource "aws_docdb_subnet_group" "default" {
count = var.enabled ? 1 : 0
to
count = var.enabled && !var.db_subnet_group? 1 : 0
I would make a pull request but I still have no idea how. So just suggestions.
The text was updated successfully, but these errors were encountered: