# C1\_W4 2 - Creating & Setting up the Vector Database

**URL:** <https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409>\
**Category:** Introduction to Data Engineering\
**Tags:** week-module-1, week-module-4, coursera-platform\
**Created:** [December 16, 2024, 11:44pm UTC](https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409 "2024-12-16T23:44:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MitchellYorkey](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@MitchellYorkey](https://community.deeplearning.ai/u/MitchellYorkey)\
**Post date:** [December 16, 2024, 11:44pm UTC](https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409/1 "2024-12-16T23:44:47Z")

</div>

W4 lab. Second section - Creating & Setting up the Vector Database. Having issue with the terraform apply output.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/c/8/c8eafdcf58077cb5848e64c7d97e399d2b3d43f8.png)  
Then, when I go to get the vector\_db\_host output:  
“Error: Output “vector\_db\_host” not found  
The output variable requested could not be found in the state file. If you recently added this to your configuration, be sure to run `terraform apply`, since the state won’t be updated with new output variables until that command is run.”  
Can’t continue past this point.

---

<div class="post-metadata">

**Author:** ![MitchellYorkey](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@MitchellYorkey](https://community.deeplearning.ai/u/MitchellYorkey)\
**Post date:** [December 16, 2024, 11:55pm UTC](https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409/2 "2024-12-16T23:55:13Z")

</div>

I can get the output vector\_db\_master\_username and password, but not the vector db host for some reason

---

<div class="post-metadata">

**Author:** ![Amir\_Zare](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/amir_zare/32/95275_2.png) [@Amir\_Zare](https://community.deeplearning.ai/u/Amir_Zare)\
**Post date:** [December 17, 2024, 10:01am UTC](https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409/3 "2024-12-17T10:01:03Z")

</div>

Hello @MitchellYorkey  
As can be seen from the image below, `vector_db_host` is defined in the `output.tf` file. By default, these lines are commented out, and you are supposed to uncomment them in step 2.3. Therefore, in order to access this output, you need to complete step 2.3 and run `terraform init` and `terraform apply` command afterwards (step 2.4). Getting an error after `terraform apply` means these outputs are not processed correctly and won’t be available.

 ![image](https://global.discourse-cdn.com/dlai/original/3X/6/9/6953c5cba228af0fcc28781863fa441f950b9796.png)  
As for the error you added in the screenshot, did you change anything in the terraform files other than `main.tf` and `output.tf`?

---

<div class="post-metadata">

**Author:** ![MitchellYorkey](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@MitchellYorkey](https://community.deeplearning.ai/u/MitchellYorkey)\
**Post date:** [December 17, 2024, 1:06pm UTC](https://community.deeplearning.ai/t/c1-w4-2-creating-setting-up-the-vector-database/736409/4 "2024-12-17T13:06:53Z")

</div>

I allowed the lab to expire and reset. On second attempt everything worked fine.  
Thank you
