Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _______________main.tf________________
- module "m1" {
- source = "../modules/m1"
- }
- module "m2" {
- source = "../modules/m2"
- }
- ------------------------------------------
- ------------------m2.tf--------------------
- resource "aws_db_subnet_group" "db_subnet_group" {
- name_prefix = "xxx-db"
- subnet_ids = module.m1.subnetsIds
- tags = {
- "Name" = "xxx db subnet group"
- }
- }
- --------------------------------------------------
- terraform validate
- Error: Reference to undeclared module
- on ../modules/m2/m2.tf line 8, in resource "aws_db_subnet_group" "db_subnet_group":
- 8: subnet_ids = module.m1.subnetsIds
- No module call named "m1" is declared in m2.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement