Select specific element from output

How to select specific element/s from
I am doing a home project of provisioning EC2 instances (2 DC, 2 App, 2 SQL and 2 Web servers) using Terraform. While all servers would be part of Pvt-Az A and B, App02 will be part of Az-C.
I have the instances provision and networking defined as modules and here is the networking/

output "private_subnets" {
  value = aws_subnet.private_subnet.*.id

This lists subnets as:


root/ holds the server setup:

#Deploy App Servers
module "app_servers" {
  source          = "./app_servers"
  keyname         = module.domain_controllers.key_name
  public_key_path = var.public_key_path
  app_count       = var.app_count
  app_inst_type   = var.app_inst_type
  pvtsubnets      = module.networking.private_subnets # <--Here lies the problem.
  sql_fs_sg       = module.networking.sql_fs_sg
  perf_pvt_sg     = module.networking.perf_pvt_sg

While using the same logic for other instances, all of them gets provisioned to Az-A and B, I am unable to get App02 provisioned to Az-C. It gets provisioned on Az-A and Az-B.


resource "aws_instance" "app" {
  count         = var.app_count
  ami           =
  ebs_optimized = true
  instance_type = var.app_inst_type
  subnet_id     = element(var.pvtsubnets, count.index)
  vpc_security_group_ids = [