C1_W4 2 - Creating & Setting up the Vector Database

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


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.

I can get the output vector_db_master_username and password, but not the vector db host for some reason

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.


As for the error you added in the screenshot, did you change anything in the terraform files other than main.tf and output.tf?

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

1 Like