Skip to content

Commit

Permalink
Merge pull request #24765 from jalavoy/iot_domain_name_configuration
Browse files Browse the repository at this point in the history
Iot domain name configuration
  • Loading branch information
ewbankkit authored Oct 25, 2023
2 parents 0c6b499 + 2bc52ff commit 1b6e1fa
Show file tree
Hide file tree
Showing 9 changed files with 1,086 additions and 161 deletions.
3 changes: 3 additions & 0 deletions .changelog/24765.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_iot_domain_configuration
```
10 changes: 10 additions & 0 deletions internal/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,16 @@ func CheckResourceAttrIsJSONString(n, key string) resource.TestCheckFunc {
})
}

// SkipIfEnvVarNotSet skips the current test if the specified environment variable is not set.
// The variable's value is returned.
func SkipIfEnvVarNotSet(t *testing.T, key string) string {
v := os.Getenv(key)
if v == "" {
t.Skipf("Environment variable %s is not set, skipping test", key)
}
return v
}

// RunSerialTests1Level runs test cases in parallel, optionally sleeping between each.
func RunSerialTests1Level(t *testing.T, testCases map[string]func(t *testing.T), d time.Duration) {
t.Helper()
Expand Down
1 change: 1 addition & 0 deletions internal/service/acm/sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func RegisterSweepers() {
"aws_elb",
"aws_iam_server_certificate",
"aws_iam_signing_certificate",
"aws_iot_domain_configuration",
"aws_lb",
"aws_lb_listener",
},
Expand Down
8 changes: 4 additions & 4 deletions internal/service/iot/authorizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func testAccCheckAuthorizerDestroy(ctx context.Context) resource.TestCheckFunc {
}
}

func testAccAuthorizerBaseConfig(rName string) string {
func testAccAuthorizerConfig_base(rName string) string {
return fmt.Sprintf(`
resource "aws_iam_role" "test" {
name = %[1]q
Expand Down Expand Up @@ -240,7 +240,7 @@ resource "aws_lambda_function" "test" {
}

func testAccAuthorizerConfig_basic(rName string) string {
return acctest.ConfigCompose(testAccAuthorizerBaseConfig(rName), fmt.Sprintf(`
return acctest.ConfigCompose(testAccAuthorizerConfig_base(rName), fmt.Sprintf(`
resource "aws_iot_authorizer" "test" {
name = %[1]q
authorizer_function_arn = aws_lambda_function.test.arn
Expand All @@ -254,7 +254,7 @@ resource "aws_iot_authorizer" "test" {
}

func testAccAuthorizerConfig_updated(rName string) string {
return acctest.ConfigCompose(testAccAuthorizerBaseConfig(rName), fmt.Sprintf(`
return acctest.ConfigCompose(testAccAuthorizerConfig_base(rName), fmt.Sprintf(`
resource "aws_iot_authorizer" "test" {
name = %[1]q
authorizer_function_arn = aws_lambda_function.test.arn
Expand All @@ -272,7 +272,7 @@ resource "aws_iot_authorizer" "test" {
}

func testAccAuthorizerConfig_signingDisabled(rName string) string {
return acctest.ConfigCompose(testAccAuthorizerBaseConfig(rName), fmt.Sprintf(`
return acctest.ConfigCompose(testAccAuthorizerConfig_base(rName), fmt.Sprintf(`
resource "aws_iot_authorizer" "test" {
name = %[1]q
authorizer_function_arn = aws_lambda_function.test.arn
Expand Down
Loading

0 comments on commit 1b6e1fa

Please sign in to comment.