Repository files navigation
No requirements.
No modules.
Name
Description
Type
Default
Required
executed_repeatedly
Allow command to be executed repeatedly.
bool
true
no
shell_script_content
Shell script to run in Terraform local execution environment.
string
"#!/bin/bash\n\n# Set variables\nWALRUS_URL=\"https://localhost\"\nWALRUS_TOKEN=\"du7cbzafkvnw-EHUPB7u82ChS4DBpid81LizQChB5cTrv5ihKUuwaDdw7uIoiaTaWbdzAkmYFAi6iFo6B3ZY9PqSbHq53ok81x8l2VgHOhnpd9iFfd1XxgDFRsZ0xz9fTmg\"\n\n# Define data based on user_type\nif [ \"$3\" == \"manager\" ]; then\n data='{\n \"kind\": \"user\",\n \"domain\": \"builtin\",\n \"name\": \"'\"$1\"'\",\n \"password\": \"'\"$2\"'\",\n \"roleId\": \"system/manager\",\n \"roles\": [\n {\n \"role\": {\n \"id\": \"system/manager\"\n }\n }\n ]\n }'\nelse\n data='{\n \"kind\": \"user\",\n \"domain\": \"builtin\",\n \"name\": \"'\"$1\"'\",\n \"password\": \"'\"$2\"'\",\n \"roleId\": \"0\",\n \"roles\": []\n }'\nfi\n\n# Send POST request\ncurl -s --insecure -X POST -H \"Content-Type: application/json\" -H \"Authorization: Bearer $WALRUS_TOKEN\" -d \"$data\" \"$WALRUS_URL/v1/subjects\"\n"
no
You can’t perform that action at this time.