carltongibson / rest-framework-tutorial

62 stars 65 forks source link

Error while running ./bin/createdb.py #12

Closed paulofappi closed 4 years ago

paulofappi commented 4 years ago

Hello. When I try to run the command./bin/createdb.py I get the following error message Creating PostgreSQL server ... usage: az postgres server create [-h] [--verbose] [--debug] [--only-show-errors] [--output {json, jsonc, yaml, yamlc, table, tsv, none}] [--query JMESPATH] [--subscription _SUBSCRIPTION] --resource-group RESOURCE_GROUP_NAME --name SERVER_NAME --sku-name SKU_NAME [--location LOCATION] --admin-user ADMINISTRATOR_LOGIN --admin-password ADMINISTRATOR_LOGIN_PASSWORD [--backup-retention BACKUP_RETENTION] [--geo-redundant-backup {Enabled, Disabled}] [--ssl-enforcement {Enabled, Disabled}] [--storage-size STORAGE_MB] [--tags [TAGS [TAGS ...]]] [--version VERSION] [--auto-grow {Enabled, Disabled}] [--assign-identity] [--public-network-access {Enabled, Disabled}] az postgres server create: error: Parameter 'resource_group_name' must have length greater than 1. Traceback (most recent call last): File "./bin/createdb.py", line 42, in subprocess.check_call (create_server_command) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError (retcode, cmd) subprocess.CalledProcessError: Command '[' az ',' postgres ',' server ',' create ',' --resource-group ',' ',' --location ',' ',' --name ',' ',' --admin-user ',' ',' --admin-password ',' ',' --sku-name ',' GP_Gen5_2 ']' returned non-zero exit status 2.

carltongibson commented 4 years ago

az postgres server create: error: Parameter 'resource_group_name' must have length greater than 1.

I'd guess you didn't set the env vars:

https://github.com/carltongibson/rest-framework-tutorial/blob/3373d62003ed0f38303992241aa0c76c01cc4463/env-example#L16-L20

But I can't offer you support here I'm afraid.