Skip to content

Commit 1c2ec12

Browse files
data.google_certificate_manager_certificates : explain attributes (#13706) (#22418)
[upstream:316513f8286967e7c0293a33445ece63f9233f76] Signed-off-by: Modular Magician <[email protected]>
1 parent 0b83814 commit 1c2ec12

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

website/docs/d/certificate_manager_certificates.html.markdown

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ List all certificates within Google Certificate Manager for a given project, reg
1212
```tf
1313
data "google_certificate_manager_certificates" "default" {
1414
}
15+
16+
output "certificates_names" {
17+
value = [for cert in data.google_certificate_manager_certificates.default.certificates : cert.name]
18+
}
1519
```
1620

1721
## Example Usage - with a filter
@@ -20,6 +24,23 @@ data "google_certificate_manager_certificates" "default" {
2024
data "google_certificate_manager_certificates" "default" {
2125
filter = "name:projects/PROJECT_ID/locations/REGION/certificates/certificate-name-*"
2226
}
27+
28+
output "certificates_names" {
29+
value = [for cert in data.google_certificate_manager_certificates.default.certificates : cert.name]
30+
}
31+
```
32+
33+
## Example Usage - regional certificates with a filter
34+
35+
```tf
36+
data "google_certificate_manager_certificates" "default" {
37+
region = "REGION"
38+
filter = "name:projects/PROJECT_ID/locations/REGION/certificates/certificate-name-*"
39+
}
40+
41+
output "certificates_names" {
42+
value = [for cert in data.google_certificate_manager_certificates.default.certificates : cert.name]
43+
}
2344
```
2445

2546
## Argument Reference
@@ -33,4 +54,6 @@ The following arguments are supported:
3354

3455
## Attributes Reference
3556

36-
See [google_certificate_manager_certificate](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/certificate_manager_certificate) resource for details of the available attributes.
57+
The following attributes are exported:
58+
59+
* `certificates` - A list of all retrieved certificates. See [google_certificate_manager_certificate](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/certificate_manager_certificate) resource for details of the available attributes.

0 commit comments

Comments
 (0)