Gary Rutland
11/11/2023, 4:33 PMenv:
image: wiremock/wiremock
healthcheck:
test:
- CMD-SHELL
- wget --server-response -qO /dev/null <http://localhost:8080/__admin> 2>&1 | grep 'HTTP/1.1 200 OK' || exit 1
interval: 10s
timeout: 3s
retries: 30
command:
- --disable-banner
- --global-response-templating
- --permitted-system-keys=.*
env_file:
- /location/of/locally/decrypted/vars/.env
volumes:
- /location/of/wiremock/files:/home/wiremock:ro
And want to use the following but keep getting an error when trying to set key
to something "dynamic"
{
"request": {
"method": "GET",
"urlPath": "/systemsmanager/parameters/get/",
"queryParameters": {
"name": {
"matches": "^/path/to/env/var/([A-Z_]+)$"
}
}
},
"response": {
"jsonBody": {
"Name": "{{request.query.name}}",
"SecretString": "{{systemValue type='ENVIRONMENT' key='{{regexExtract request.query.name '[A-Z_]+'}}'}}"
}
}
}
Is what we're trying to do even possible? Or do we have to explicitly set "key" to a string value?Tom
11/12/2023, 4:35 PM{{systemValue type='ENVIRONMENT' key=(regexExtract request.query.name '[A-Z_]+')}}
Gary Rutland
11/12/2023, 4:36 PMTom
11/13/2023, 9:28 AMGary Rutland
11/13/2023, 9:34 AMTom
11/13/2023, 9:36 AM