Skip to content

Commit

Permalink
Merge pull request #1556 from hashicorp/fix-go-template-tfc
Browse files Browse the repository at this point in the history
fix(cli): Fix template for Go not adding jsii import when using Terraform Cloud
  • Loading branch information
DanielMSchmidt committed Feb 9, 2022
2 parents d1ab5f6 + 9b7c49f commit 0d5503c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/cdktf-cli/templates/go/.hooks.sscaff.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@ function terraformCloudConfig(baseName, organizationName, workspaceName) {
Workspaces: cdktf.NewNamedRemoteWorkspace(jsii.String("${workspaceName}")),
})`);

// add import for jsii helper used above
result = result.replace(`"github.com/aws/constructs-go/constructs/v10"`, `"github.com/aws/constructs-go/constructs/v10"\n "github.com/aws/jsii-runtime-go"`);

writeFileSync('./main.go', result, 'utf-8');
}

0 comments on commit 0d5503c

Please sign in to comment.