Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

No requirements.

Providers

Name Version
null n/a

Modules

No modules.

Resources

Name Type
null_resource.local resource

Inputs

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

Outputs

Name Description
shell_script_content n/a

About

Run shell script in Terraform local execution environment.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages