@get_or_create(get_vpc_peerings)
def create_vpc_peering(client, vpc, host_vpc, target_region):
    "Method would create a vpc peering between the newly created VPC and caller's VPC\n    Also makes sure, if they aren't the same, then there is no need for vpc peering.\n    Args:\n        client (boto client): Region specific boto client\n        vpc (VPC object): Newly created VPC object\n        host_vpc(Host VPC object): Host VPC to peer with.\n        target_region (region name): Region name in which peering is being created.\n    Returns:\n        VPC peering (array): Array list of vpc peerings.\n    "
    try:
        peer_conn = client.create_vpc_peering_connection(VpcId=host_vpc.id, PeerVpcId=vpc.id, PeerRegion=target_region)
        peer_conn.wait_until_exists()
        remote_peer_conn = get_client(target_region).VpcPeeringConnection(peer_conn.id)
        remote_peer_conn.wait_until_exists()
        remote_peer_conn.accept()
        return [peer_conn]
    except Exception as e:
        logging.error(e)
        raise YBOpsRuntimeError('Unable to create VPC peering.')
Method would create a vpc peering between the newly created VPC and caller's VPC
Also makes sure, if they aren't the same, then there is no need for vpc peering.
Args:
    client (boto client): Region specific boto client
    vpc (VPC object): Newly created VPC object
    host_vpc(Host VPC object): Host VPC to peer with.
    target_region (region name): Region name in which peering is being created.
Returns:
    VPC peering (array): Array list of vpc peerings.
@get_or_create(get_vpc_peerings)
def create_vpc_peering(client, vpc, host_vpc, target_region):
    "Method would create a vpc peering between the newly created VPC and caller's VPC\n    Also makes sure, if they aren't the same, then there is no need for vpc peering.\n    Args:\n        client (boto client): Region specific boto client\n        vpc (VPC object): Newly created VPC object\n        host_vpc(Host VPC object): Host VPC to peer with.\n        target_region (region name): Region name in which peering is being created.\n    Returns:\n        VPC peering (array): Array list of vpc peerings.\n    "
    try:
        peer_conn = client.create_vpc_peering_connection(VpcId=host_vpc.id, PeerVpcId=vpc.id, PeerRegion=target_region)
        peer_conn.wait_until_exists()
        remote_peer_conn = get_client(target_region).VpcPeeringConnection(peer_conn.id)
        remote_peer_conn.wait_until_exists()
        remote_peer_conn.accept()
        return [peer_conn]
    except Exception as e:
        logging.error(e)
        raise YBOpsRuntimeError('Unable to create VPC peering.')