Limiting ourselves to Europe, a scenario of this type can only be found in Sardinia and Portugal.
There is a village Val Bavona, in Switzerland built in and around large rocks.
https://houseofswitzerland.org/swissstories/history/forbidding-side-val-bavona-frozen-time
I believe there are also examples also in Greece also.
RE: Journey to Corbara, the village built into the rock