Associate Transit Gateway Route Table to an Attachment using for each

how to take the attachment id and route table id when flag create_fw_tgw is true