Skip to content

Commit

Permalink
Merge pull request #37627 from professional-ian/appfabric-ingestion-d…
Browse files Browse the repository at this point in the history
…estination

add aws_appfabric_ingestion_destination resource
  • Loading branch information
ewbankkit authored Jun 25, 2024
2 parents b752060 + e05f243 commit 7768df5
Show file tree
Hide file tree
Showing 9 changed files with 1,451 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/37627.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
aws_appfabric_ingestion_destination
```
2 changes: 2 additions & 0 deletions internal/service/appfabric/app_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/diag"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
Expand Down Expand Up @@ -235,6 +236,7 @@ func (r *appAuthorizationResource) Create(ctx context.Context, request resource.
appAuthorization, err := waitAppAuthorizationCreated(ctx, conn, data.AppAuthorizationARN.ValueString(), data.AppBundleARN.ValueString(), r.CreateTimeout(ctx, data.Timeouts))

if err != nil {
response.State.SetAttribute(ctx, path.Root(names.AttrID), data.ID) // Set 'id' so as to taint the resource.
response.Diagnostics.AddError(fmt.Sprintf("waiting for AppFabric App Authorization (%s) create", data.ID.ValueString()), err.Error())

return
Expand Down
2 changes: 2 additions & 0 deletions internal/service/appfabric/app_authorization_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
awstypes "github.com/aws/aws-sdk-go-v2/service/appfabric/types"
"github.com/hashicorp/terraform-plugin-framework-timeouts/resource/timeouts"
"github.com/hashicorp/terraform-plugin-framework-validators/listvalidator"
"github.com/hashicorp/terraform-plugin-framework/path"
"github.com/hashicorp/terraform-plugin-framework/resource"
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
Expand Down Expand Up @@ -139,6 +140,7 @@ func (r *appAuthorizationConnectionResource) Create(ctx context.Context, request
appAuthorization, err := waitConnectAppAuthorizationCreated(ctx, conn, data.AppAuthorizationARN.ValueString(), data.AppBundleARN.ValueString(), r.CreateTimeout(ctx, data.Timeouts))

if err != nil {
response.State.SetAttribute(ctx, path.Root(names.AttrID), data.ID) // Set 'id' so as to taint the resource.
response.Diagnostics.AddError(fmt.Sprintf("waiting for AppFabric App Authorization Connection (%s) create", data.ID.ValueString()), err.Error())

return
Expand Down
7 changes: 7 additions & 0 deletions internal/service/appfabric/appfabric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ func TestAccAppFabric_serial(t *testing.T) {
acctest.CtDisappears: testAccIngestion_disappears,
"tags": testAccIngestion_tags,
},
"IngestionDestination": {
acctest.CtBasic: testAccIngestionDestination_basic,
acctest.CtDisappears: testAccIngestionDestination_disappears,
"tags": testAccIngestionDestination_tags,
"update": testAccIngestionDestination_update,
"firehose": testAccIngestionDestination_firehose,
},
}

acctest.RunSerialTests2Levels(t, testCases, serializeDelay)
Expand Down
2 changes: 2 additions & 0 deletions internal/service/appfabric/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ var (
ResourceAppAuthorizationConnection = newAppAuthorizationConnectionResource
ResourceAppBundle = newAppBundleResource
ResourceIngestion = newIngestionResource
ResourceIngestionDestination = newIngestionDestinationResource

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

0 comments on commit 7768df5

Please sign in to comment.