-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Sample code that we should add to our module:
# use a data lookup to get the ID of the "Public Access" IAM access group
data "ibm_iam_access_group" "public_access_group" {
access_group_name = "Public Access"
}
# create an IAM access policy to granting public access to this bucket
resource "ibm_iam_access_group_policy" "policy" {
access_group_id = data.ibm_iam_access_group.public_access_group.groups[0].id
roles = ["Object Reader"]
resources {
service = "cloud-object-storage"
resource_type = "bucket"
resource_instance_id = local.cos_instance_guid
resource = local.cos_bucket_name
}
}
We should expose a boolean to allow consumers to opt into this