terraform: some deepcopying going on