def tag_subnets()

in dataops-infra/infra/stacks/vpc_stack.py [0:0]


    def tag_subnets(self) -> None:
        subnet_types = {
            "public": ec2.SubnetType.PUBLIC,
            "isolated": ec2.SubnetType.ISOLATED,
        }
        for st_name, st in subnet_types.items():
            selection = self.instance.select_subnets(subnet_type=st)
            for subnet in selection.subnets:
                core.Tag.add(
                    subnet, "Name", f"{st_name}-subnet-{subnet.availability_zone}"
                )
        core.Tag.add(self.instance, "Name", "dataops-vpc")