Skip to content

Commit

Permalink
fix changes
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Sep 6, 2021
1 parent 7e31631 commit 8fcf416
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "aws_iam_user" "default" {
}

resource "aws_iam_access_key" "default" {
count = var.enabled ? 1 : 0
count = var.enabled && var.key_enabled ? 1 : 0
user = aws_iam_user.default.*.name[0]
pgp_key = var.pgp_key
status = var.status
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ variable "enabled" {
description = "Whether to create Iam user."
}

variable "key_enabled" {
type = bool
default = true
description = "Whether to create Iam user."
}

variable "force_destroy" {
type = bool
default = false
Expand Down

0 comments on commit 8fcf416

Please sign in to comment.