Skip to content

Commit

Permalink
feat: outputを個別に返すように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
hacomono-shigure-onishi committed Aug 5, 2022
1 parent 7d8bde2 commit b054356
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 36 deletions.
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,15 @@ output "time_converter" {
outputs:
```
time_converter = {
"time" = {
"cron" = "0 21 22 11 *"
"cron_year" = "0 21 22 11 * 2022"
"iso8601" = "2022-11-22T21:00:00+09:00"
"rfc1123" = "Tue, 22 Nov 2022 21:00:00 UTC"
"rfc2822" = "22 Nov 2022 21:00 UTC"
"rfc3339" = "2022-11-22T21:00:00Z"
"rfc850" = "22 Nov 2022 21:00 UTC"
"time" = "2022-11-22T21:00:00Z"
"unix" = 1669150800
}
"cron" = "0 21 22 11 *"
"cron_event_bridge" = "0 21 22 11 ? 2022"
"cron_year" = "0 21 22 11 * 2022"
"iso8601" = "2022-11-22T21:00:00+09:00"
"rfc1123" = "Tue, 22 Nov 2022 21:00:00 UTC"
"rfc2822" = "22 Nov 2022 21:00 UTC"
"rfc3339" = "2022-11-22T21:00:00Z"
"rfc850" = "22 Nov 2022 21:00 UTC"
"unix" = 1669150800
}
```

Expand Down Expand Up @@ -85,5 +83,13 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_time"></a> [time](#output\_time) | n/a |
| <a name="output_cron"></a> [cron](#output\_cron) | n/a |
| <a name="output_cron_event_bridge"></a> [cron\_event\_bridge](#output\_cron\_event\_bridge) | n/a |
| <a name="output_cron_year"></a> [cron\_year](#output\_cron\_year) | n/a |
| <a name="output_iso8601"></a> [iso8601](#output\_iso8601) | n/a |
| <a name="output_rfc1123"></a> [rfc1123](#output\_rfc1123) | n/a |
| <a name="output_rfc2822"></a> [rfc2822](#output\_rfc2822) | n/a |
| <a name="output_rfc3339"></a> [rfc3339](#output\_rfc3339) | n/a |
| <a name="output_rfc850"></a> [rfc850](#output\_rfc850) | n/a |
| <a name="output_unix"></a> [unix](#output\_unix) | n/a |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
20 changes: 9 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
* outputs:
* ```
* time_converter = {
* "time" = {
* "cron" = "0 21 22 11 *"
* "cron_year" = "0 21 22 11 * 2022"
* "iso8601" = "2022-11-22T21:00:00+09:00"
* "rfc1123" = "Tue, 22 Nov 2022 21:00:00 UTC"
* "rfc2822" = "22 Nov 2022 21:00 UTC"
* "rfc3339" = "2022-11-22T21:00:00Z"
* "rfc850" = "22 Nov 2022 21:00 UTC"
* "time" = "2022-11-22T21:00:00Z"
* "unix" = 1669150800
* }
* "cron" = "0 21 22 11 *"
* "cron_event_bridge" = "0 21 22 11 ? 2022"
* "cron_year" = "0 21 22 11 * 2022"
* "iso8601" = "2022-11-22T21:00:00+09:00"
* "rfc1123" = "Tue, 22 Nov 2022 21:00:00 UTC"
* "rfc2822" = "22 Nov 2022 21:00 UTC"
* "rfc3339" = "2022-11-22T21:00:00Z"
* "rfc850" = "22 Nov 2022 21:00 UTC"
* "unix" = 1669150800
* }
* ```
*/
47 changes: 34 additions & 13 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
output "time" {
value = {
time = local.time
iso8601 = local.iso8601
rfc850 = local.rfc850
rfc2822 = local.rfc2822
rfc1123 = local.rfc1123
rfc3339 = local.rfc3339
cron_year = local.cron_year
cron_event_bridge = local.cron_event_bridge
cron = local.cron
unix = local.unix
}
output "iso8601" {
value = local.iso8601
}

output "rfc850" {
value = local.rfc850
}

output "rfc2822" {
value = local.rfc2822
}

output "rfc1123" {
value = local.rfc1123
}

output "rfc3339" {
value = local.rfc3339
}

output "cron_year" {
value = local.cron_year
}

output "cron_event_bridge" {
value = local.cron_event_bridge
}

output "cron" {
value = local.cron
}

output "unix" {
value = local.unix
}

0 comments on commit b054356

Please sign in to comment.