'vault-secrets-provider alias not recognized with terraform-vault template

I'm having some issues when trying to use Hashicorp vault template (with terraform to.be.continuous).

Actually when I use it with terraform-vault template I got an error message.

This is a summary of .gitlab-ci.yml

include:
 - project: "to-be-continuous/terraform"
    ref: "2.4.0"
    file: "templates/gitlab-ci-terraform.yml"
 # Vault variant
  - project: 'to-be-continuous/terraform'
    ref: '2.4.0'
    file: '/templates/gitlab-ci-terraform-vault.yml'

variables:
  VAULT_BASE_URL: "https://vault.secrets.tech.orange/v1"
  VAULT_ROLE_ID: $VAULT_ROLE_ID
  VAULT_SECRET_ID: $VAULT_SECRET_ID
  GCP_MYSECRET: "@url@http://vault-secrets-provider/api/secrets/XXX/gcp/credentials?field=mygcpsecret"

Error Message:

[ERROR] Failed getting secret GCP_MYSECRET:
... Connecting to vault-secrets-provider (127.0.0.1:80)
... wget: server returned error: HTTP/1.1 404 Not Found

I tried without vault template and it works.

Would you please help me with this? Or perhaps, where I can ask for some help?



Solution 1:[1]

It turns out you were facing this issue due to a Kubernetes runners limitation.

As stated in GitLab documentation,

Kubernetes runners cannot use several services using the same port

As a result, using the tracking service in addition to another one using the same port (80) fails.

It has now been fixed.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 pismy