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

bump vpc module to use v5 + Add Terratest scripts #39

Merged
merged 3 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ resource "aws_s3_bucket_ownership_controls" "this" {

resource "aws_s3_bucket_acl" "this" {
depends_on = [aws_s3_bucket_ownership_controls.this]

bucket = aws_s3_bucket.this.id
acl = "private"
rule {
object_ownership = "BucketOwnerPreferred"
}
}

resource "aws_s3_bucket_versioning" "this" {
Expand Down Expand Up @@ -150,7 +151,7 @@ module "mwaa" {
#---------------------------------------------------------------
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 3.0"
version = "~> 5.0"

name = var.name
cidr = var.vpc_cidr
Expand Down
1 change: 0 additions & 1 deletion test/mwaa_terratest.go

This file was deleted.

21 changes: 21 additions & 0 deletions test/mwaa_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package test

import (
"testing"

"github.com/gruntwork-io/terratest/modules/terraform"
)

func TestExamplesBasic(t *testing.T) {

terraformOptions := &terraform.Options{
TerraformDir: "../examples/basic",
// Vars: map[string]interface{}{
// "myvar": "test",
// "mylistvar": []string{"list_item_1"},
// },
}

defer terraform.Destroy(t, terraformOptions)
terraform.InitAndApply(t, terraformOptions)
}