Before the world was created, there was the Holy One, blessed be He, and His great name alone. And it arose in His thought to create the world, and He was tracing out the world before Him, but it would not stand. They told a parable: To what may the matter be compared? To a king who wishes to build his palace; if he does not trace out in the ground its foundations and its entrances and its exits, he does not begin to build. So too the Holy One, blessed be He, traced out the world before Him, but it would not stand until He created repentance. Seven things were created before the world was created, and these are they: the Torah, and Gehinnom, and the Garden of Eden, and the Throne of Glory, and the Temple, and repentance, and the name of the Messiah. From what place were the heavens created? From the light of the garment of the Holy One, blessed be He, with which He is clothed. He took of it and spread it out like a cloak, and they kept stretching outward until He said to them: Enough. And therefore His name is called Shaddai, for He said to the heavens, Enough (dai), and they stood firm. And from where do we know that they were created from the light of His garment? As it is stated: "He wraps Himself in light as in a garment, stretching out the heavens like a curtain" (Psalms 104:2).
The Holy Spirit
Pirkei DeRabbi Eliezer 3
עד שלא נברא העולם, היה הקדוש ברוך הוא ושמו הגדול בלבד, ועלה במחשבה לברא את העולם, והיה מחריט את העולם לפניו ולא היה עומד. משלו משל, למה הדבר דומה? למלך שהוא רוצה לבנות פלטרים שלו, אם אינו מחריט בארץ יסודותיו ומובאיו ומוצאיו, אינו מתחיל לבנות, כך הקדוש ברוך הוא החריט לפניו את העולם ולא היה עומד עד שברא את התשובה. שבעה דברים נבראו עד שלא נברא העולם, ואלו הן: תורה, וגיהנם, וגן עדן, וכסא הכבוד, ובית המקדש, ותשובה, ושמו של משיח. שמים מאיזה מקום נבראו? מאור לבושו של הקדוש ברוך הוא שהוא לבוש. לקח ממנו ופרש כשלמה והיו מותחין והולכין עד שאמר להם: די, ועל כן נקרא שמו שדי, שאמר לשמים די ועמדו. ומנין שמאור לבושו נברא? שנאמר (תהלים קד, ב): עטה אור כשלמה נוטה שמים כיריעה.