Git Product home page Git Product logo

Comments (5)

anthonymayer avatar anthonymayer commented on June 26, 2024 1

@benjaminch https://gist.github.com/anthonymayer/fd54ad43a2cf100680dff536db1fabc4 here's the state and the terraform code that sets it up is mostly below. it's a little bit nested, but here are the relevant parts

resource "qovery_job" "this" {
  # Required
  environment_id = var.environment_id
  name           = var.name

  # Optional
  cpu    = var.cpu
  memory = var.memory
  environment_variables = [
    for envKey, envValue in var.environment_variables : {
      key   = envKey
      value = envValue
    }
  ]

  secrets = [
    for secKey, secValue in var.secrets : {
      key   = secKey
      value = secValue
    }
  ]

  schedule = var.schedule

  source = {
    docker = {
      dockerfile_path = var.dockerfile_path
      git_repository = {
        url       = var.url
        branch    = var.branch
        root_path = var.root_path
      }
    }
  }

  healthchecks = {  }
}

var.secrets gets set to jsondecode(data.aws_secretsmanager_secret_version.insurance_service_secrets.secret_string)
which comes from

data "aws_secretsmanager_secret_version" "insurance_service_secrets" {
  secret_id = "SECRETS_ID_REDACTED"
}

we do the exact same thing with aws_secretsmanager_secret_version and the loop to set the secrets for qovery_application and it works fine there

from terraform-provider-qovery.

anthonymayer avatar anthonymayer commented on June 26, 2024 1

@benjaminch I believe I figured out what the cause of the problem is. I have some secrets I'm trying to set with an empty value. This isn't a problem for qovery_application though, but it also fails on qovery_environment. Which behavior should it be? It would be great to support empty values, but most important would be consistent behavior between the resource types IMO.

from terraform-provider-qovery.

 avatar commented on June 26, 2024 1

Hello @anthonymayer :)
Yes you're right, it should be allowed to set an empty value.
We're currently working on enriching the variables by adding alias & overrides support. The fix for this issue will be embedded too.
I'll tell you when it's done

from terraform-provider-qovery.

benjaminch avatar benjaminch commented on June 26, 2024

Hey @anthonymayer !
Thanks for reporting :)

Do you mind sharing your job terraform setup (remove sensible content)?

Thanks !

from terraform-provider-qovery.

 avatar commented on June 26, 2024

Hello @anthonymayer,
We just released the v0.18.5 that should fix your issue.

from terraform-provider-qovery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.