Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bool #5

Merged
merged 1 commit into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Here are some examples of how you can use this module in your inventory structur
### ACM with DNS
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand All @@ -87,7 +87,7 @@ module "acm" {
### ACM with Email
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand All @@ -102,7 +102,7 @@ module "acm" {
### ACM with Import Certificate
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand All @@ -128,7 +128,7 @@ module "acm" {
| certificate_body | Path of certificate body. | string | `~` | no |
| certificate_chain | Path of certificate chain. | string | `` | no |
| delimiter | Delimiter to be used between `organization`, `environment`, `name` and `attributes`. | string | `-` | no |
| domain_name | A domain name for which the certificate should be issued. | string | - | yes |
| domain_name | A domain name for which the certificate should be issued. | string | `` | no |
| enable_acm_certificate | Set to false to prevent the creation of a acm certificate. | string | `true` | no |
| enable_aws_certificate | Set to false to prevent the creation of a acm certificate. | bool | `false` | no |
| enable_dns_validation | Set to prevent validation of DNS. | string | `false` | no |
Expand All @@ -140,7 +140,7 @@ module "acm" {
| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`). | map | `<map>` | no |
| ttl | Time to live. | number | `600` | no |
| validate_certificate | Set to false to prevent the validation of a acm certificate. | string | `false` | no |
| validation_method | Which method to use for validation, DNS or EMAIL. | string | - | yes |
| validation_method | Which method to use for validation, DNS or EMAIL. | string | `` | no |

## Outputs

Expand Down
6 changes: 3 additions & 3 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ usage : |-
### ACM with DNS
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand All @@ -51,7 +51,7 @@ usage : |-
### ACM with Email
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand All @@ -66,7 +66,7 @@ usage : |-
### ACM with Import Certificate
```hcl
module "acm" {
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-acm.git?ref=tags/0.12.2"
name = "certificate"
application = "clouddrove"
environment = "test"
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "aws_acm_certificate" "import-cert" {
# Description : This terraform module is used for requesting or importing SSL/TLS
# certificate with validation.
resource "aws_acm_certificate" "cert" {
count = var.enable_acm_certificate && var.enable_aws_certificate == false ? 1 : 0
count = var.enable_acm_certificate && var.enable_aws_certificate ? 1 : 0

domain_name = var.domain_name
validation_method = var.validation_method
Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ variable "tags" {
variable "domain_name" {
type = string
description = "A domain name for which the certificate should be issued."
default = ""
}

variable "validation_method" {
type = string
description = "Which method to use for validation, DNS or EMAIL."
default = ""
}

variable "enable_dns_validation" {
Expand Down