Skip to content

Commit

Permalink
Issue 542: Add Env var for db_instance Acc test
Browse files Browse the repository at this point in the history
  • Loading branch information
lotoussa committed May 25, 2021
1 parent 1acee71 commit 6dda84a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/resource/aws/aws_db_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ func TestAcc_AwsDbInstance(t *testing.T) {
Args: []string{"scan", "--filter", "Type=='aws_db_instance'"},
Checks: []acceptance.AccCheck{
{
Env: map[string]string{
"AWS_REGION": "us-east-1",
},
Check: func(result *test.ScanResult, stdout string, err error) {
if err != nil {
t.Fatal(err)
Expand Down
10 changes: 10 additions & 0 deletions pkg/resource/aws/testdata/acc/aws_db_instance/db_instance.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
provider "aws" {
region = "us-east-1"
}

terraform {
required_providers {
aws = "3.19.0"
}
}

resource "aws_db_instance" "default" {
allocated_storage = 10
engine = "mysql"
Expand Down

0 comments on commit 6dda84a

Please sign in to comment.