Skip to content

Commit c2aa2d5

Browse files
authored
Documentation update for COS static webhosting. (IBM-Cloud#4827)
* Updating the COS static webhosting documentation * Documentation update * Removing documentation error * Addressing the review comments
1 parent d0e64a1 commit c2aa2d5

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

examples/ibm-cos-bucket/main.tf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,11 @@ resource "ibm_cos_bucket" "cos_bucket_website_configuration" {
410410
storage_class = var.standard_storage_class
411411

412412
}
413+
414+
data "ibm_iam_access_group" "public_access_group" {
415+
access_group_name = "Public Access"
416+
}
417+
413418
# Give public access to above mentioned bucket
414419
resource "ibm_iam_access_group_policy" "policy" {
415420
depends_on = [ibm_cos_bucket.cos_bucket_website_configuration]
@@ -419,8 +424,8 @@ resource "ibm_iam_access_group_policy" "policy" {
419424
resources {
420425
service = "cloud-object-storage"
421426
resource_type = "bucket"
422-
resource_instance_id = "COS instance guid"
423-
resource = data.ibm_cos_bucket.cos_bucket_website_configuration.bucket_name
427+
resource_instance_id = "COS instance guid" # eg : 94xxxxxx-3xxx-4xxx-8xxx-7xxxxxxxxx7
428+
resource = ibm_cos_bucket.cos_bucket_website_configuration.bucket_name
424429
}
425430
}
426431

website/docs/r/cos_bucket_website_configuration.html.markdown

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ resource "ibm_cos_bucket" "cos_bucket_website_configuration" {
4040
storage_class = var.standard_storage_class
4141
4242
}
43+
44+
data "ibm_iam_access_group" "public_access_group" {
45+
access_group_name = "Public Access"
46+
}
47+
4348
# Give public access to above mentioned bucket
4449
4550
resource "ibm_iam_access_group_policy" "policy" {
@@ -50,8 +55,8 @@ resource "ibm_iam_access_group_policy" "policy" {
5055
resources {
5156
service = "cloud-object-storage"
5257
resource_type = "bucket"
53-
resource_instance_id = "COS instance guid"
54-
resource = data.ibm_cos_bucket.cos_bucket_website_configuration.bucket_name
58+
resource_instance_id = "COS instance guid" # eg : 94xxxxxx-3xxx-4xxx-8xxx-7xxxxxxxxx7
59+
resource = ibm_cos_bucket.cos_bucket_website_configuration.bucket_name
5560
}
5661
}
5762

0 commit comments

Comments
 (0)