ucg/docsite/ucglib/macros.ucg

39 lines
1.0 KiB
Plaintext

let bucketbase = func (name, project, location) => {
name = name,
type = "storage.v1.bucket",
properties = {
bucket = name,
project = project,
location = location,
acl = [
{
entity = "project-owners-ucg-configuration-project",
role = "OWNER",
},
{
entity = "project-editors-ucg-configuration-project",
role = "WRITER",
},
{
entity = "project-viewers-ucg-configuration-project",
role = "READER",
},
],
defaultObjectAcl = [
{
entity = "allUsers",
role = "READER",
},
],
},
};
let bucketSelfLink = func (bucket) => {
name = "@selfLink" % (bucket),
value = "https://console.cloud.google.com/storage/browser/@" % (bucket),
};
let bucketGsLink = func (bucket) => {
name = "@gsLink" % (bucket),
value = "gs://@" % (bucket),
};