5875e4b15b
* Add consul-api-double under api * Update config to reflect api change * Remove consul-api-double as a dependency * api -> mock-api * Fixup mocks path for staging
65 lines
1.4 KiB
Plaintext
65 lines
1.4 KiB
Plaintext
[
|
|
{
|
|
"Name": "default",
|
|
"Description": "The default namespace",
|
|
"ACLs": {
|
|
"PolicyDefaults": [
|
|
${range(env('CONSUL_POLICY_COUNT', 3)).map((i) => `
|
|
{
|
|
"ID": "${fake.random.uuid()}-${i}",
|
|
"Name": "${fake.hacker.noun()}-policy"
|
|
}
|
|
`)}
|
|
],
|
|
"RoleDefaults": [
|
|
${range(env('CONSUL_ROLE_COUNT', 3)).map((i) => `
|
|
{
|
|
"ID": "${fake.random.uuid()}-${i}",
|
|
"Name": "${fake.hacker.noun()}-role"
|
|
}
|
|
`)}
|
|
]
|
|
}
|
|
}
|
|
${range(
|
|
env(
|
|
'CONSUL_NSPACE_COUNT',
|
|
Math.floor(
|
|
(
|
|
Math.random() * env('CONSUL_NSPACE_MAX', 10)
|
|
) + parseInt(env('CONSUL_NSPACE_MIN', 1))
|
|
)
|
|
) - 1
|
|
).map(i => `
|
|
${i === 0 ? `
|
|
,
|
|
` : ``}
|
|
{
|
|
"Name": "${fake.hacker.noun()}-ns-${i}",
|
|
"ACLs": {
|
|
"PolicyDefaults": [
|
|
${range(env('CONSUL_POLICY_COUNT', 3)).map((i) => `
|
|
{
|
|
"ID": "${fake.random.uuid()}-${i}",
|
|
"Name": "${fake.hacker.noun()}-policy"
|
|
}
|
|
`)}
|
|
],
|
|
"RoleDefaults": [
|
|
${range(env('CONSUL_ROLE_COUNT', 3)).map((i) => `
|
|
{
|
|
"ID": "${fake.random.uuid()}-${i}",
|
|
"Name": "${fake.hacker.noun()}-role"
|
|
}
|
|
`)}
|
|
]
|
|
},
|
|
${fake.random.boolean() ? `
|
|
"Description": "${fake.lorem.sentence()}",
|
|
` : ``}
|
|
"CreateIndex": 12,
|
|
"ModifyIndex": 16
|
|
}
|
|
`)}
|
|
]
|