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

add aws_appfabric_ingestion resource #37291

Merged
merged 24 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
11ed99a
Adding AppFabric Ingestion
davelemons May 6, 2024
f375c35
moving ID sets to be alphabetical
davelemons May 6, 2024
ce4152f
adding more flex functions and changelog
davelemons May 21, 2024
c8e97ee
changing test inputs to test values
davelemons May 21, 2024
0cdffd9
changing update to no-op
davelemons May 23, 2024
dfdf67c
adding more flex functions, better handling of imports using 2 ids
davelemons May 29, 2024
ecf540f
documentation updates to refer to aws docs for list of app values
davelemons May 31, 2024
6bc73c3
Merge remote-tracking branch 'origin/main' into appfabric-ingestion
davelemons Jun 4, 2024
617abf4
CI fixes, linting, semgrep, etc.
davelemons Jun 4, 2024
ccdfa89
Merge branch 'main' into HEAD
ewbankkit Jun 10, 2024
dd7dbe1
r/aws_appfabric_ingestion: Cosmetics.
ewbankkit Jun 10, 2024
092e282
Tweak 'testAccIngestionConfig_basic'.
ewbankkit Jun 10, 2024
e3d13d7
Fix markdown-lint errors.
ewbankkit Jun 10, 2024
23f39f4
removing tagging tests generate directive
davelemons Jun 11, 2024
deba75f
Merge branch 'main' into HEAD
ewbankkit Jun 11, 2024
de5de49
r/aws_appfabric_ingestion: Tidy up.
ewbankkit Jun 11, 2024
5c72ed9
Add 'testAccIngestion_tags'.
ewbankkit Jun 11, 2024
7c3ea52
Fix semgrep 'ci.literal-arn-string-constant' and 'ci.literal-state-st…
ewbankkit Jun 11, 2024
3fe5bef
Run 'make gen'.
ewbankkit Jun 11, 2024
e7b0bb1
Merge branch 'main' into HEAD
ewbankkit Jun 12, 2024
0ea793c
r/aws_appfabric_ingestion: Tidy up acceptance tests.
ewbankkit Jun 12, 2024
bfbc312
Merge branch 'main' into HEAD
ewbankkit Jun 24, 2024
faff1ab
r/aws_appfabric_ingestion: Use 'aws_appfabric_app_authorization_conne…
ewbankkit Jun 24, 2024
72d9c76
r/aws_appfabric_ingestion: Remove 'state' attribute.
ewbankkit Jun 24, 2024
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
3 changes: 3 additions & 0 deletions .changelog/37291.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_appfabric_ingestion
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func testAccAppAuthorizationConnection_basic(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -65,6 +66,7 @@ func testAccAppAuthorizationConnection_OAuth2(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down
5 changes: 5 additions & 0 deletions internal/service/appfabric/app_authorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func testAccAppAuthorization_basic(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -68,6 +69,7 @@ func testAccAppAuthorization_disappears(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -103,6 +105,7 @@ func testAccAppAuthorization_apiKeyUpdate(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -162,6 +165,7 @@ func testAccAppAuthorization_oath2Update(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -223,6 +227,7 @@ func testAccAppAuthorization_tags(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down
4 changes: 4 additions & 0 deletions internal/service/appfabric/app_bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func testAccAppBundle_basic(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -59,6 +60,7 @@ func testAccAppBundle_disappears(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -86,6 +88,7 @@ func testAccAppBundle_cmk(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down Expand Up @@ -116,6 +119,7 @@ func testAccAppBundle_tags(t *testing.T) {
PreCheck: func() {
acctest.PreCheck(ctx, t)
acctest.PreCheckRegion(t, names.USEast1RegionID, names.APNortheast1RegionID, names.EUWest1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, names.AppFabricServiceID),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories,
Expand Down
23 changes: 23 additions & 0 deletions internal/service/appfabric/appfabric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
package appfabric_test

import (
"context"
"testing"
"time"

"github.com/aws/aws-sdk-go-v2/service/appfabric"
"github.com/hashicorp/terraform-provider-aws/internal/acctest"
"github.com/hashicorp/terraform-provider-aws/internal/conns"
)

const serializeDelay = 10 * time.Second
Expand All @@ -34,7 +37,27 @@ func TestAccAppFabric_serial(t *testing.T) {
acctest.CtBasic: testAccAppAuthorizationConnection_basic,
"oath2Connect": testAccAppAuthorizationConnection_OAuth2,
},
"Ingestion": {
acctest.CtBasic: testAccIngestion_basic,
acctest.CtDisappears: testAccIngestion_disappears,
"tags": testAccIngestion_tags,
},
}

acctest.RunSerialTests2Levels(t, testCases, serializeDelay)
}

func testAccPreCheck(ctx context.Context, t *testing.T) {
conn := acctest.Provider.Meta().(*conns.AWSClient).AppFabricClient(ctx)

input := &appfabric.ListAppBundlesInput{}
_, err := conn.ListAppBundles(ctx, input)

if acctest.PreCheckSkipError(err) {
t.Skipf("skipping acceptance testing: %s", err)
}

if err != nil {
t.Fatalf("unexpected PreCheck error: %s", err)
}
}
8 changes: 5 additions & 3 deletions internal/service/appfabric/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ package appfabric

// Exports for use in tests only.
var (
ResourceAppAuthorization = newAppAuthorizationResource
ResourceConnectAppAuthorization = newAppAuthorizationConnectionResource
ResourceAppBundle = newAppBundleResource
ResourceAppAuthorization = newAppAuthorizationResource
ResourceAppAuthorizationConnection = newAppAuthorizationConnectionResource
ResourceAppBundle = newAppBundleResource
ResourceIngestion = newIngestionResource

FindAppAuthorizationByTwoPartKey = findAppAuthorizationByTwoPartKey
FindAppAuthorizationConnectionByTwoPartKey = findAppAuthorizationConnectionByTwoPartKey
FindAppBundleByID = findAppBundleByID
FindIngestionByTwoPartKey = findIngestionByTwoPartKey
)
Loading
Loading