Skip to content

Instantly share code, notes, and snippets.

@Mercanuis
Last active June 1, 2023 00:03
Show Gist options
  • Save Mercanuis/c98fafbd270b6e1bab0bf35cc8fd8507 to your computer and use it in GitHub Desktop.
Save Mercanuis/c98fafbd270b6e1bab0bf35cc8fd8507 to your computer and use it in GitHub Desktop.
Vault CDKTF Module Gist
package main
import (
"github.com/aws/constructs-go/constructs/v10"
"github.com/aws/jsii-runtime-go"
awsprovider "github.com/cdktf/cdktf-provider-aws-go/aws/v14/provider"
"github.com/hashicorp/terraform-cdk-go/cdktf"
vault "github.com/hashicorp/cdktf-provider-vault-go/vault"
)
func main() {
app := cdktf.NewApp(nil)
NewVaultStack(app, "xxx-vault")
app.Synth()
}
func NewVaultStack(scope constructs.Construct, id string) cdktf.TerraformStack {
stack := cdktf.NewTerraformStack(scope, &id)
//Pull in the AWS Provider
awsprovider.NewAwsProvider(stack, jsii.String("AWS"), &awsprovider.AwsProviderConfig{
Region: jsii.String("us-west-1"),
})
_ = vault.NewDataVaultPolicyDocument()
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment