diff --git a/modules/simple_bucket/README.md b/modules/simple_bucket/README.md index 756173d..238a17f 100644 --- a/modules/simple_bucket/README.md +++ b/modules/simple_bucket/README.md @@ -64,6 +64,7 @@ Functional examples are included in the | Name | Description | |------|-------------| +| apphub\_service\_uri | URI in CAIS style to be used by Apphub. | | bucket | The created storage bucket | | internal\_kms\_configuration | The intenal KMS Resource. | | name | Bucket name. | diff --git a/modules/simple_bucket/metadata.yaml b/modules/simple_bucket/metadata.yaml index 82e9c30..4e65670 100644 --- a/modules/simple_bucket/metadata.yaml +++ b/modules/simple_bucket/metadata.yaml @@ -171,6 +171,13 @@ spec: }) defaultValue: {} outputs: + - name: apphub_service_uri + description: URI in CAIS style to be used by Apphub. + type: + - object + - location: string + service_id: string + service_uri: string - name: bucket description: The created storage bucket type: diff --git a/modules/simple_bucket/outputs.tf b/modules/simple_bucket/outputs.tf index aa0bd4c..5910591 100644 --- a/modules/simple_bucket/outputs.tf +++ b/modules/simple_bucket/outputs.tf @@ -33,3 +33,12 @@ output "internal_kms_configuration" { description = "The intenal KMS Resource." value = var.internal_encryption_config.create_encryption_key ? module.encryption_key[0] : null } + +output "apphub_service_uri" { + value = { + service_uri = "//storage.googleapis.com/${google_storage_bucket.bucket.name}" + service_id = substr(google_storage_bucket.bucket.name, 0, 63) + location = var.location + } + description = "URI in CAIS style to be used by Apphub." +}