Hi, i have a couple of Terraform related questions.
1: If you set a project level environment variable. How do you call it from a terraform job?
2: How do you call a git_token from terraform the data source document is empty: Terraform Registry
I tried creating a token via Terraform and getting an output id and then using:
data "qovery_git_token" "github" {
id = "xxx"
}
but i get an error
Error: Error on git token read
│
│ with data.qovery_git_token.github,
│ on data.tf line 14, in data "qovery_git_token" "github":
│ 14: data "qovery_git_token" "github" {
│
│ Could not read git token 'xxx', unexpected error: 401 Unauthorized
3: How do you link pipelines together in terraformfor example i want to deploy lifecycle job A, then lifecycle job B then helm deployment C
Error: Error on git token read
│
│ with data.qovery_git_token.github,
│ on data.tf line 14, in data "qovery_git_token" "github":
│ 14: data "qovery_git_token" "github" {
│
│ Could not read git token '9e7fc347-835e-4860-8ce5-93a6db5fdd65', unexpected
│ error: 401 Unauthorized
There is a issues with if it deploys and has a failure (ie like i had) it would create the service, but then fails on reply saying that
│ Error: Error on job create
│
│ with qovery_job.s3,
│ on oc-aws-s3.tf line 1, in resource "qovery_job" "s3":
│ 1: resource "qovery_job" "s3" {
│
│ failed to create job: Could not create job 'oc-aws-s3', unexpected error: 400 Bad Request - A Job named `oc-aws-s3` already
│ exists
and
╷
│ Error: Error on job create
│
│ with qovery_job.s3,
│ on oc-aws-s3.tf line 1, in resource "qovery_job" "s3":
│ 1: resource "qovery_job" "s3" {
│
│ failed to create job: failed to update variables: Could not create job environment variable 'TF_VAR_aws_access_key_id',
│ unexpected error: 409 Conflict - Variable already exists: TF_VAR_aws_access_key_id
i would expect it to know its deployed those resources right? and not say there are duplicates
the error says that you already have a job (lifecycle or cronjob) in the same env with the same name. I can’t really check this but can you verify if the env id sent in the manifest is the right one?