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.
if not occurred or mapped == occurred:
        return True
    
    
    
    
    
    
    elif mapped.startswith(occurred):
        suffix = mapped[len(occurred):]
        return suffix[0] == '/'
    else:
        return False
def get_function_version(arn, version):
    func = arn_to_lambda.get(arn)
    return format_func_details(func, version=version, always_add_version=True)
def publish_new_function_version(arn):
    func_details = arn_to_lambda.get(arn)
    versions = func_details.versions
    last_version = func_details.max_version()
    versions[str(last_version + 1)] = {
        'CodeSize': versions.get('$LATEST').get('CodeSize'),
        'CodeSha256': versions.get('$LATEST').get('CodeSha256'),
        'Function': versions.get('$LATEST').get('Function'),
        'RevisionId': str(uuid.uuid4())