Skip to content

Commit

Permalink
Revert "fix(cli): dont upload .terraform folders"
Browse files Browse the repository at this point in the history
This reverts commit 59192cc.
  • Loading branch information
DanielMSchmidt committed Jun 23, 2021
1 parent bcfe264 commit cb76c38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cdktf-cli/bin/cmds/ui/models/terraform-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ export interface TerraformCredentialsFile {
credentials: TerraformCredentials;
}

const zipDirectory = (source: string, ignoreGlobs: string[]): Promise<Buffer | false> => {
const zipDirectory = (source: string): Promise<Buffer | false> => {
const archive = archiver('tar', { gzip: true });
const stream = new WritableStreamBuffer()

return new Promise((resolve, reject) => {
archive
.glob(source + path.sep + "**", { ignore: ignoreGlobs })
.directory(source, false)
.on('error', err => reject(err))
.on('end', () => resolve(stream.getContents()))
.pipe(stream)
Expand Down Expand Up @@ -130,7 +130,7 @@ export class TerraformCloud implements Terraform {

this.configurationVersionId = version.id

const zipBuffer = await zipDirectory(this.workDir, [".terraform"])
const zipBuffer = await zipDirectory(this.workDir)
if (!zipBuffer) throw new Error("Couldn't upload directory to Terraform Cloud");

await this.client.ConfigurationVersion.upload(version.attributes.uploadUrl, zipBuffer)
Expand Down

0 comments on commit cb76c38

Please sign in to comment.