Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
mootpt committed Oct 22, 2021
1 parent 1e29dc3 commit f9ac839
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 17 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
# terraform-hashicorp-s1
A simple module to return HashiCorp's S-1 filing status

## Requirements

No requirements.

## Providers

| Name | Version |
|------|---------|
| sec | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| company\_name | name of company to lookup s-1 status | `string` | `"hashicorp"` | no |

## Outputs

| Name | Description |
|------|-------------|
| s1\_status | status message regarding s-1 filing |

3 changes: 3 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
locals {
message = data.sec_s1_filing.company.status ? "has filed their s-1" : "has not filed their s-1"
}
17 changes: 0 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,3 @@ terraform {
}
}

variable "company_name" {
type = string
description = "name of company to lookup s-1 status"
default = "hashicorp"
}

locals {
message = data.sec_s1_filing.company.status ? "has filed their s-1" : "has not filed their s-1"
}

data "sec_s1_filing" "company" {
name = var.company_name
}

output "s1_status" {
value = "${data.sec_s1_filing.company.name} ${local.message}"
}
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "s1_status" {
description = "status message regarding s-1 filing"
value = "${data.sec_s1_filing.company.name} ${local.message}"
}
3 changes: 3 additions & 0 deletions s1_filing.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "sec_s1_filing" "company" {
name = var.company_name
}
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "company_name" {
type = string
description = "name of company to lookup s-1 status"
default = "hashicorp"
}

0 comments on commit f9ac839

Please sign in to comment.