Skip to content

Commit

Permalink
fix(tests): Remove snippet from test which does not work for HCL due …
Browse files Browse the repository at this point in the history
…to skipped attribute
  • Loading branch information
ansgarm committed Jan 12, 2024
1 parent 8546ca9 commit c60b321
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 128 deletions.
88 changes: 0 additions & 88 deletions test/typescript/synth-app/__snapshots__/test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -75,46 +75,6 @@ output "instance-http-endpoint" {
output "tf-env-var-output" {
value = "no-value-found"
}
resource "aws_wafv2_web_acl" "wafv2" {
name = "managed-rule-example"
scope = "REGIONAL"
default_action {
allow {
}
}
rule {
name = "managed-rule-example"
priority = 1
override_action {
count {
}
}
statement {
managed_rule_group_statement {
name = "managed-rule-example"
vendor_name = "AWS"
excluded_rule {
name = "SizeRestrictions_QUERYSTRING"
}
excluded_rule {
name = "SQLInjection_QUERYSTRING"
}
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "managed-rule-example"
sampled_requests_enabled = true
}
}
visibility_config {
cloudwatch_metrics_enabled = true
metric_name = "managed-rule-example"
sampled_requests_enabled = true
}
}"
`;

Expand Down Expand Up @@ -226,54 +186,6 @@ exports[`full integration test synth synth generates JSON 1`] = `
},
"provider": "aws"
}
},
"aws_wafv2_web_acl": {
"wafv2": {
"//": {
"metadata": {
"path": "hello-terra/wafv2",
"uniqueId": "wafv2"
}
},
"default_action": {
"allow": {}
},
"name": "managed-rule-example",
"rule": [
{
"name": "managed-rule-example",
"override_action": {
"count": {}
},
"priority": 1,
"statement": {
"managed_rule_group_statement": {
"excluded_rule": [
{
"name": "SizeRestrictions_QUERYSTRING"
},
{
"name": "SQLInjection_QUERYSTRING"
}
],
"name": "managed-rule-example",
"vendor_name": "AWS"
}
},
"visibility_config": {
"cloudwatch_metrics_enabled": true,
"metric_name": "managed-rule-example",
"sampled_requests_enabled": true
}
}
],
"scope": "REGIONAL",
"visibility_config": {
"cloudwatch_metrics_enabled": true,
"metric_name": "managed-rule-example",
"sampled_requests_enabled": true
}
}
}
},
"terraform": {
Expand Down
40 changes: 0 additions & 40 deletions test/typescript/synth-app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from "cdktf";
import { provider, snsTopic } from "./.gen/providers/aws";
import { Instance } from "./.gen/providers/aws/instance";
import { Wafv2WebAcl } from "./.gen/providers/aws/wafv2-web-acl";

export class HelloTerra extends TerraformStack {
constructor(scope: Construct, id: string) {
Expand Down Expand Up @@ -85,45 +84,6 @@ export class HelloTerra extends TerraformStack {
},
},
});

new Wafv2WebAcl(this, "wafv2", {
defaultAction: {
allow: {},
},
name: "managed-rule-example",
scope: "REGIONAL",
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: "managed-rule-example",
sampledRequestsEnabled: true,
},
rule: [
{
name: "managed-rule-example",
priority: 1,
overrideAction: {
count: {},
},
visibilityConfig: {
cloudwatchMetricsEnabled: true,
metricName: "managed-rule-example",
sampledRequestsEnabled: true,
},
statement: {
managed_rule_group_statement: {
name: "managed-rule-example",
vendor_name: "AWS",
excluded_rule: [
{
name: "SizeRestrictions_QUERYSTRING",
},
{ name: "SQLInjection_QUERYSTRING" },
],
},
},
},
],
});
}
}

Expand Down

0 comments on commit c60b321

Please sign in to comment.