Skip to content

Commit

Permalink
Merge pull request #23 from globaldatanet/bugfix/Outputs-in-Stack-are…
Browse files Browse the repository at this point in the history
…-not-dynamic

Bugfix/outputs in stack are not dynamic
  • Loading branch information
daknhh authored Mar 2, 2022
2 parents abd5052 + 1a2ee51 commit 023f0da
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Released

## 2.1.1

### Fixed

- Outputs were not dynamic

## 2.1.0

### Added
Expand Down
22 changes: 12 additions & 10 deletions lib/plattform-wafv2-cdk-automation-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,16 @@ function buildServiceDataCustomRGs(scope: Construct, type: "Pre" | "Post", capac
);
if (
processRuntimeProps.DeployedRuleGroupIdentifier[0] ===
"RuleGroup"
type+"RuleGroup"
) {
rulegroupidentifier = type + "RG";
}

if (
processRuntimeProps.DeployedRuleGroupNames[0] ===
webaclName +
"-" +
type.toLowerCase() +
"-" +
stage +
"-" +
Expand Down Expand Up @@ -651,30 +653,30 @@ function buildServiceDataCustomRGs(scope: Construct, type: "Pre" | "Post", capac
);
processRuntimeProps.DeployedRuleGroupNames.splice(lenght);

new cdk.CfnOutput(scope, "PreProcessDeployedRuleGroupNames", {
new cdk.CfnOutput(scope, type+"ProcessDeployedRuleGroupNames", {
value:
processRuntimeProps.DeployedRuleGroupNames.toString(),
description: "PreProcessDeployedRuleGroupNames",
description: type+"ProcessDeployedRuleGroupNames",
exportName:
"PreProcessDeployedRuleGroupNames" +
type+"ProcessDeployedRuleGroupNames" +
deployHash,
});

new cdk.CfnOutput(scope, "PreProcessDeployedRuleGroupCapacities", {
new cdk.CfnOutput(scope, type+"ProcessDeployedRuleGroupCapacities", {
value:
processRuntimeProps.DeployedRuleGroupCapacities.toString(),
description: "PreProcessDeployedRuleGroupCapacities",
description: type+"ProcessDeployedRuleGroupCapacities",
exportName:
"PreProcessDeployedRuleGroupCapacities" +
type+"ProcessDeployedRuleGroupCapacities" +
deployHash,
});

new cdk.CfnOutput(scope, "PreProcessDeployedRuleGroupIdentifier", {
new cdk.CfnOutput(scope, type+"ProcessDeployedRuleGroupIdentifier", {
value:
processRuntimeProps.DeployedRuleGroupIdentifier.toString(),
description: "PreProcessDeployedRuleGroupIdentifier",
description: type+"ProcessDeployedRuleGroupIdentifier",
exportName:
"PreProcessDeployedRuleGroupIdentifier" +
type+"ProcessDeployedRuleGroupIdentifier" +
deployHash,
});
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plattform-wafv2-cdk-automation",
"version": "2.1.0",
"version": "2.1.1",
"bin": {
"plattform-wafv2-cdk-automation": "bin/plattform-wafv2-cdk-automation.js"
},
Expand Down

0 comments on commit 023f0da

Please sign in to comment.