Hi all, I hope this message finds you well. I am c...
# support
r
Hi all, I hope this message finds you well. I am currently facing an issue while creating a JavaScript source using the
terraform-provider-rudderstack
. When I run the
terraform apply
command, I encounter the following error message:
Copy code
rudderstack_source_node.example: Creating... Error: could not create source: could not parse error response from API: invalid character 'p' after top-level value
I would greatly appreciate your guidance on how to resolve this issue. For your reference, I have included the code from my
main.tf
file, which is responsible for creating the JavaScript source using Terraform. Thank you for your assistance.
g
@red-rainbow-40489 Which source are you trying to create?
You need not put the source configuration in your
main.tf
file. You can update the source name that you want in the name field in the corresponding file inside
examples
folder and then run terraform apply.
Feel free to remove other source/destination or connection files from the folder that are not needed. LMK in case of any other issues
r
I am currently making changes to my code. If I encounter any difficulties, may I reach out to you for assistance? Your expertise and knowledge would be greatly appreciated, and I believe that your insights would help me overcome any challenges I may face. Thank you in advance for your willingness to support me in this endeavor.
g
Sure. Were you able to resolve the above issue?
r
no, i am still facing the issue
g
Also one thing I noticed, you mentioned about creating a Javascript source but error came from node source file. Can you check if you are making changes in desired source file? Can you elaborate on the issue pls?
r
Yashasvi , I am trying to run the code that is given below in the examples/main.tf
terraform { required_providers { rudderstack = { source = "rudderlabs/rudderstack1" version = "~> 0.7.1" } } required_version = "~> 1.1.0" } provider "rudderstack" { api_url = "http://216.48.181.185:8081/v2" access_token = "******************" }
Can you please check and help me with what I am doing wrong.
This is my source_javascript.tf resource "rudderstack_source_javascript" "example" { name = "example-javascript" }
g
Please DM me the creds as they are sensitive information and delete from here
r
they are not the actual credentials ..... is there something wrong i am doing with the code.
👍 1