-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add E2E tests for ephemeral values and marked dynamic blocks
- Loading branch information
Showing
6 changed files
with
135 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
variable "no_marked" { | ||
default = "t2.micro" | ||
} | ||
|
||
variable "sensitive" { | ||
sensitive = true | ||
default = "t2.micro" | ||
} | ||
|
||
variable "ephemeral" { | ||
ephemeral = true | ||
default = "t2.micro" | ||
} | ||
|
||
variable "marked_set" { | ||
sensitive = true | ||
default = [true] | ||
} | ||
|
||
resource "aws_instance" "no_marked" { | ||
instance_type = var.no_marked | ||
} | ||
|
||
resource "aws_instance" "sensitive" { | ||
instance_type = var.sensitive | ||
} | ||
|
||
resource "aws_instance" "ephemeral" { | ||
instance_type = var.ephemeral | ||
} | ||
|
||
resource "aws_s3_bucket" "main" { | ||
dynamic "lifecycle_rule" { | ||
for_each = var.marked_set | ||
|
||
content { | ||
enabled = lifecycle_rule.value | ||
} | ||
} | ||
|
||
dynamic "lifecycle_rule" { | ||
for_each = var.marked_set | ||
|
||
content { | ||
enabled = true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
{ | ||
"issues": [ | ||
{ | ||
"rule": { | ||
"name": "aws_instance_example_type", | ||
"severity": "error", | ||
"link": "" | ||
}, | ||
"message": "instance type is t2.micro", | ||
"range": { | ||
"filename": "main.tf", | ||
"start": { | ||
"line": 21, | ||
"column": 19 | ||
}, | ||
"end": { | ||
"line": 21, | ||
"column": 32 | ||
} | ||
}, | ||
"callers": [] | ||
}, | ||
{ | ||
"rule": { | ||
"name": "aws_s3_bucket_example_lifecycle_rule", | ||
"severity": "error", | ||
"link": "" | ||
}, | ||
"message": "`lifecycle_rule` block found", | ||
"range": { | ||
"filename": "main.tf", | ||
"start": { | ||
"line": 33, | ||
"column": 3 | ||
}, | ||
"end": { | ||
"line": 33, | ||
"column": 27 | ||
} | ||
}, | ||
"callers": [] | ||
}, | ||
{ | ||
"rule": { | ||
"name": "aws_s3_bucket_example_lifecycle_rule", | ||
"severity": "error", | ||
"link": "" | ||
}, | ||
"message": "`lifecycle_rule` block found", | ||
"range": { | ||
"filename": "main.tf", | ||
"start": { | ||
"line": 41, | ||
"column": 3 | ||
}, | ||
"end": { | ||
"line": 41, | ||
"column": 27 | ||
} | ||
}, | ||
"callers": [] | ||
}, | ||
{ | ||
"rule": { | ||
"name": "aws_s3_bucket_example_lifecycle_rule", | ||
"severity": "error", | ||
"link": "" | ||
}, | ||
"message": "`enabled` attribute found: true", | ||
"range": { | ||
"filename": "main.tf", | ||
"start": { | ||
"line": 45, | ||
"column": 17 | ||
}, | ||
"end": { | ||
"line": 45, | ||
"column": 21 | ||
} | ||
}, | ||
"callers": [] | ||
} | ||
], | ||
"errors": [] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.