I am trying to get secret from vault into waypoint variable using :
variable "secret" {
default= dynamic("vault", {
path = "kv/data/demo"
key = "MY_SECRET"
})
type = string
sensitive = true
description = "my secret key from vault"
}
But, when I run waypoint up I get error:
» Performing operation locally
! Variables with dynamic defaults cannot be used with local runners. Projects
using variables with dynamic defaults must be executed remotely using a remote
runner.
The usage of dynamic defaults as you’re using are restricted to remote runners currently. The docs can help you go through setting up a remote runner on your system. In the future we may lift that restriction.
Remote runners get to move up in the todo list a guess. It would be nice to have a flag that you can bypass the need for remote runners with dynamic defaults.
I recommend opening a feature request on GitHub if you’d like dynamic variables to work with local runners! It’s currently a restriction with local runners in Waypoint in that it is not supported (i.e. more work required to get it working than adding a flag).
Thank you,
The problem is due to local runner. I shifted the runner to remote, what this does is allows me to use docker login . However, now I am unable to pull images from Azure Container Registry
Here’s part of my code responsible for pulling image
build {
use "pack" {}
registry {
use "docker" {
image = "registry.azurecr.io/demo"
tag = "latest"
local = false
auth {
username = var.registry_username
password = var.registry_password
}
}
}
I noticed that with above username and password. docker login registry.azurecr.io/demo : works on my local computer but docker login : fails
Is there a way wherein I can pass registry.azurecr.io as a system argument to waypoint.hcl file. Some thing similar to:
build {
use "pack" {}
registry {
use "docker" " login" "registry.azurecr.io" {
image = "registry.azurecr.io/demo"
tag = "latest"
local = false
auth {
username = var.registry_username
password = var.registry_password
}
}
}
Is it possible to pass system argument under build -> registry -> use as simple docker login wont work in my case.