As a user of localstack I would like a documented standardized way to run terraform scripts against a running localstack to create AWS infrastructure so that I don't have to duplicate work that involves programatically creating the resources when I use terraform to create resources in my cloud environment.
super(LambdaExecutorReuseContainers, self).__init__()
        
        self.docker_container_lock = threading.RLock()
        
        
        
        
        self.next_port = 0
        self.max_port = LAMBDA_SERVER_UNIQUE_PORTS
        self.port_offset = LAMBDA_SERVER_PORT_OFFSET
    def prepare_execution(self, func_arn, env_vars, runtime, command, handler, lambda_cwd):
        
        has_been_invoked_before = func_arn in self.function_invoke_times
        
        with self.docker_container_lock:
            env_vars['_LAMBDA_SERVER_PORT'] = str(self.next_port + self.port_offset)