Skip to content

Commit

Permalink
chore: update to cdktf 0.17 (#115)
Browse files Browse the repository at this point in the history
Fixes #
  • Loading branch information
DanielMSchmidt authored Jul 5, 2023
1 parent b8091f6 commit db75a97
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { UpgradeDependenciesSchedule } from "projen/lib/javascript";
import { TypeScriptProject } from "projen/lib/typescript";

const SPDX = "MPL-2.0";
const cdktfVersion = ">=0.15.0";
const cdktfVersion = ">=0.17.0";
const constructVersion = "^10.0.107";
const name = "cdktf-multi-stack-tfe";

Expand Down Expand Up @@ -38,7 +38,7 @@ const project = new ConstructLibraryCdktf({
repositoryUrl: "https://github.com/cdktf/cdktf-multi-stack-tfe.git",
deps: [],
devDeps: ["ts-node", "cdktf-cli"],
peerDeps: ["@cdktf/provider-tfe@>=5.0.0"],
peerDeps: ["@cdktf/provider-tfe@>=7.0.0"],
description: `Sets up TFE / TFC workspaces for all stacks based on a seed stack.`,
licensed: false,
prettier: true,
Expand Down
10 changes: 5 additions & 5 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions scripts/update-cdktf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0


set -ex

PROJECT_ROOT=$(cd "$(dirname "${BASH_SOURCE:-$0}")/.." && pwd)
CDKTF_VERSION=$1

if [ -z "$CDKTF_VERSION" ]; then
echo "Usage: $0 <cdktf-version>"
exit 1
fi
echo "asd"

echo "Updating to cdktf version $CDKTF_VERSION"
git checkout -b "cdktf-$CDKTF_VERSION"
cd $PROJECT_ROOT

yarn

sed -i "s/const cdktfVersion = \".*\";/const cdktfVersion = \">=$CDKTF_VERSION\";/" "$PROJECT_ROOT/.projenrc.ts"

npx projen

git add .
git commit -m "feat: update to cdktf $CDKTF_VERSION"
git push origin "cdktf-$CDKTF_VERSION"

BODY=$(cat <<EOF
- [ ] Update peer dependencies to cdktf $CDKTF_VERSION
EOF
)

gh label create -f "cdktf-update-$CDKTF_VERSION"
gh pr create --fill --base main --head "cdktf-$CDKTF_VERSION" --title "feat: update to cdktf $CDKTF_VERSION" --body "$BODY" --label "cdktf-update-$CDKTF_VERSION"
12 changes: 6 additions & 6 deletions test/multi-stack-tfe.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ test("sets up all stacks created", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
}
Expand Down Expand Up @@ -227,7 +227,7 @@ test("sets the remoteStateConsumerIds when dependenies are set", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
}
Expand Down Expand Up @@ -397,7 +397,7 @@ test("uses workspace name override", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
}
Expand Down Expand Up @@ -507,7 +507,7 @@ test("uses workspace config options", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
}
Expand Down Expand Up @@ -611,7 +611,7 @@ test("uses workspace config options with per stack override", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
}
Expand Down Expand Up @@ -762,7 +762,7 @@ test("can propagate TFVariables from the base stack", () => {
\\"required_providers\\": {
\\"tfe\\": {
\\"source\\": \\"hashicorp/tfe\\",
\\"version\\": \\"0.41.0\\"
\\"version\\": \\"0.45.0\\"
}
}
},
Expand Down
19 changes: 5 additions & 14 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db75a97

Please sign in to comment.