Skip to content

Commit

Permalink
feat: add output required for apphub registration for simple_bucket m…
Browse files Browse the repository at this point in the history
…odule (#383)
  • Loading branch information
amrkk123 authored Feb 13, 2025
1 parent 69ced20 commit fbc43db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/simple_bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
7 changes: 7 additions & 0 deletions modules/simple_bucket/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions modules/simple_bucket/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

0 comments on commit fbc43db

Please sign in to comment.