Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace TF Cloud implementation with TF CLI #1955

Merged
merged 41 commits into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
926b6bb
chore(cli): replace terraform cloud implementation with terraform CLI
DanielMSchmidt Jul 18, 2022
ba48459
fix: use new schema for parsing
ansgarm Nov 21, 2022
dbd5be1
chore(cli): remove isSpeculative
ansgarm Nov 21, 2022
12447a3
fix: remove unused import
ansgarm Nov 22, 2022
95ae4b1
feat(cli): wip, use node-pty for terraform apply invocations, use sta…
ansgarm Nov 29, 2022
48b47ce
fix(cli): fix waitFor timeout
ansgarm Nov 29, 2022
70d37e7
feat(cli): support external approval while waiting for user approval
ansgarm Dec 1, 2022
1afc2ce
fix(cli): fix unused imports and old files re-introduced via rebase
ansgarm Dec 5, 2022
4c4b9bf
fix(cli): set predictableActionArguments to true as recommended
ansgarm Dec 5, 2022
3bff7d2
feat(cli): use interactive Terrform CLI invokation for destroy too
ansgarm Dec 6, 2022
492c63d
fix(cli): update unit tests for terraform parallelism flag
ansgarm Dec 6, 2022
f23a291
fix(cli): detect terraform apply inquiry for backends other than TFC too
ansgarm Dec 7, 2022
4d4ccc3
fix(cli): fix racecondition ending in dead lock when immediately acce…
ansgarm Dec 8, 2022
92274f9
fix(cli): expose cancelled state instead of throwing if apply/destroy…
ansgarm Dec 8, 2022
3c32d06
fix(cli): fix test for CdktfProject
ansgarm Dec 8, 2022
20adf05
chore: remove tfc file once more as rebasing is not my greatest strength
ansgarm Dec 8, 2022
9ac4ea3
chore: increase timeouts
ansgarm Dec 8, 2022
8e6c56e
chore: fix prettier
ansgarm Dec 8, 2022
f0673d8
fix: let examples and integration tests use distinct caches
ansgarm Dec 12, 2022
22f1152
fix: don't restore from other cache types
ansgarm Dec 12, 2022
e4baa25
fix: remove package-lock.json
ansgarm Dec 12, 2022
aafefc8
fix: update yarn.lock in tests
ansgarm Dec 12, 2022
0435752
improve test error output
ansgarm Dec 12, 2022
a6b3f18
chore: use node-pty-prebuilt-multiarch to support windows
ansgarm Dec 12, 2022
c80f1db
wip: debug test
ansgarm Dec 13, 2022
67b95cd
chore: trace log pty spawn call args
ansgarm Dec 13, 2022
ca546ba
fix: append .exe if spawning a pty on windows
ansgarm Dec 13, 2022
356c33f
feat: search for executable on windows when spawning pty
ansgarm Dec 13, 2022
ceae444
fix(cli): fail on error in diff, remove unused error event
ansgarm Dec 13, 2022
7e19a26
fix(cli): run providers lock again
ansgarm Dec 13, 2022
3b06a03
fix(cli): run init before locking providers to fix upgrade workflow
ansgarm Dec 13, 2022
95baca4
fix prettier
ansgarm Dec 13, 2022
cabc8e6
fix(tests): require TF 1.2 and drop 1.1.9 in tests and test against 1…
ansgarm Dec 13, 2022
cefe5c8
chore(tests): remove obsolete proxy test, enable debug output
ansgarm Dec 14, 2022
9847844
chore(tests): make test less verbose again
ansgarm Dec 14, 2022
f8b7481
fix(cli): send update for errored event (as done previously)
ansgarm Dec 14, 2022
9a21a46
fix(tests): deploy before testing destroy as it won't ask for approva…
ansgarm Dec 14, 2022
9641a02
feat(cli): Introduce optional GITHUB_API_TOKEN_CDKTF env var to use f…
ansgarm Dec 14, 2022
ac52ed3
chore: add note about TF 1.2 requirement to changelog
ansgarm Dec 14, 2022
49dfbc4
fix(tests): fix unit test not awaiting deploy and using a separate di…
ansgarm Dec 14, 2022
10578b8
chore: fix prettier
ansgarm Dec 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
id: global-cache # use this to check for `cache-hit` (`steps.global-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.global-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-examples-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-examples-yarn-
- name: installing dependencies
run: |
yarn install --frozen-lockfile --prefer-offline
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ jobs:
id: global-cache # use this to check for `cache-hit` (`steps.global-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.global-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-integration-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-integration-yarn-
- name: install dependencies
run: yarn install --frozen-lockfile --prefer-offline
- name: set version
Expand Down Expand Up @@ -83,6 +83,7 @@ jobs:
env:
CHECKPOINT_DISABLE: "1"
TERRAFORM_VERSION: ${{ matrix.terraform }}
GITHUB_API_TOKEN_CDKTF: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 60

steps:
Expand All @@ -94,9 +95,9 @@ jobs:
id: global-cache # use this to check for `cache-hit` (`steps.global-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.global-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-integration-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-integration-yarn-
- name: Download dist
uses: actions/download-artifact@v3.0.1
with:
Expand Down Expand Up @@ -128,6 +129,7 @@ jobs:
env:
CHECKPOINT_DISABLE: "1"
TERRAFORM_VERSION: ${{ matrix.terraform }}
GITHUB_API_TOKEN_CDKTF: ${{ secrets.GITHUB_TOKEN }}
timeout-minutes: 60

steps:
Expand All @@ -139,9 +141,9 @@ jobs:
id: global-cache # use this to check for `cache-hit` (`steps.global-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.global-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-integration-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-integration-yarn-
- name: HashiCorp - Setup Terraform
uses: hashicorp/setup-terraform@v2.0.3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
"@cdktf/commons",
"@cdktf/cli-core",
]
terraform_version: ["1.1.9", "1.2.8"]
terraform_version: ["1.2.8", "1.3.4"]
with:
concurrency_group_prefix: pr-all
package: ${{ matrix.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
"@cdktf/commons",
"@cdktf/cli-core",
]
terraform_version: ["1.1.9", "1.2.8"]
terraform_version: ["1.2.8", "1.3.4"]
with:
concurrency_group_prefix: release
package: ${{ matrix.package }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
"@cdktf/commons",
"@cdktf/cli-core",
]
terraform_version: ["1.1.9", "1.2.8"]
terraform_version: ["1.2.8", "1.3.4"]
with:
concurrency_group_prefix: release-next
package: ${{ matrix.package }}
Expand Down
6 changes: 3 additions & 3 deletions .terraform.versions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"default": "1.1.9",
"default": "1.2.8",
"available": [
"1.1.9",
"1.2.8",
"1.3.4"
],
"tested": [
"1.1.9",
"1.2.8"
"1.2.8",
"1.3.4"
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Unreleased

Breaking: CDK for Terraform now requires Terraform CLI version 1.2 or above.

## 0.14.3

### fix
Expand Down