Skip to content

Commit 1b4ea6d

Browse files
committed
Add ARN-based resource identity to ivs
Add resource identity to ARN-based resources in `ivs`. This includes: `aws_ivs_channel` `aws_ivs_playback_key_pair` `aws_ivs_recording_configuration` ```console % make testacc PKG=ivs TESTS="TestAccIVSChannel|TestAccIVSRecordingConfiguration|TestAccIVS_serial/PlaybackKeyPair/" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.24.5 test ./internal/service/ivs/... -v -count 1 -parallel 20 -run='TestAccIVSChannel|TestAccIVSRecordingConfiguration|TestAccIVS_serial/PlaybackKeyPair/' -timeout 360m -vet=off 2025/08/04 16:32:55 Creating Terraform AWS Provider (SDKv2-style)... 2025/08/04 16:32:56 Initializing Terraform AWS Provider (SDKv2-style)... --- PASS: TestAccIVSChannel_disappears (25.72s) === RUN TestAccIVS_serial/PlaybackKeyPair/update --- PASS: TestAccIVSChannel_basic (29.70s) --- PASS: TestAccIVSRecordingConfiguration_disappears_S3Bucket (38.53s) --- PASS: TestAccIVSChannel_Identity_Basic (45.48s) --- PASS: TestAccIVSRecordingConfiguration_disappears (45.81s) --- PASS: TestAccIVSChannel_recordingConfiguration (46.30s) --- PASS: TestAccIVSChannel_update (46.42s) --- PASS: TestAccIVSRecordingConfiguration_basic (49.21s) --- PASS: TestAccIVSChannel_Identity_RegionOverride (52.01s) --- PASS: TestAccIVSChannel_tags (56.36s) --- PASS: TestAccIVSRecordingConfiguration_Identity_RegionOverride (56.58s) --- PASS: TestAccIVSChannel_Identity_ExistingResource (60.47s) === RUN TestAccIVS_serial/PlaybackKeyPair/tags --- PASS: TestAccIVSRecordingConfiguration_Identity_Basic (61.72s) --- PASS: TestAccIVSRecordingConfiguration_update (64.36s) --- PASS: TestAccIVSRecordingConfiguration_Identity_ExistingResource (69.30s) --- PASS: TestAccIVSRecordingConfiguration_tags (77.87s) === RUN TestAccIVS_serial/PlaybackKeyPair/disappears === RUN TestAccIVS_serial/PlaybackKeyPair/identity === RUN TestAccIVS_serial/PlaybackKeyPair/identity/basic === RUN TestAccIVS_serial/PlaybackKeyPair/identity/ExistingResource === RUN TestAccIVS_serial/PlaybackKeyPair/identity/RegionOverride --- PASS: TestAccIVS_serial (198.39s) --- PASS: TestAccIVS_serial/PlaybackKeyPair (198.39s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/basic (29.36s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/update (31.69s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/tags (35.14s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/disappears (12.56s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/identity (89.64s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/identity/basic (22.38s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/identity/ExistingResource (41.32s) --- PASS: TestAccIVS_serial/PlaybackKeyPair/identity/RegionOverride (25.94s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ivs 204.684s ```
1 parent c58bbdb commit 1b4ea6d

File tree

21 files changed

+1092
-12
lines changed

21 files changed

+1092
-12
lines changed

internal/service/ivs/channel.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ import (
2828

2929
// @SDKResource("aws_ivs_channel", name="Channel")
3030
// @Tags(identifierAttribute="id")
31+
// @ArnIdentity
32+
// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/ivs/types;awstypes.Channel")
33+
// @Testing(preIdentityVersion="v6.5.0")
34+
// @Testing(generator=false)
3135
func ResourceChannel() *schema.Resource {
3236
return &schema.Resource{
3337
CreateWithoutTimeout: resourceChannelCreate,
3438
ReadWithoutTimeout: resourceChannelRead,
3539
UpdateWithoutTimeout: resourceChannelUpdate,
3640
DeleteWithoutTimeout: resourceChannelDelete,
3741

38-
Importer: &schema.ResourceImporter{
39-
StateContext: schema.ImportStatePassthroughContext,
40-
},
41-
4242
Timeouts: &schema.ResourceTimeout{
4343
Create: schema.DefaultTimeout(5 * time.Minute),
4444
Update: schema.DefaultTimeout(5 * time.Minute),

internal/service/ivs/channel_identity_gen_test.go

Lines changed: 261 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service/ivs/generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
//go:generate go run ../../generate/tags/main.go -KVTValues -ListTags -ServiceTagsMap -UpdateTags
55
//go:generate go run ../../generate/servicepackage/main.go
6+
//go:generate go run ../../generate/identitytests/main.go
67
// ONLY generate directives and package declaration! Do not add anything else to this file.
78

89
package ivs

internal/service/ivs/ivs_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func TestAccIVS_serial(t *testing.T) {
1818
"update": testAccPlaybackKeyPair_update,
1919
"tags": testAccPlaybackKeyPair_tags,
2020
acctest.CtDisappears: testAccPlaybackKeyPair_disappears,
21+
"identity": testAccIVSPlaybackKeyPair_IdentitySerial,
2122
},
2223
}
2324

internal/service/ivs/playback_key_pair.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,20 @@ import (
2424

2525
// @SDKResource("aws_ivs_playback_key_pair", name="Playback Key Pair")
2626
// @Tags(identifierAttribute="id")
27+
// @ArnIdentity
28+
// @Testing(existsType="github.com/aws/aws-sdk-go-v2/service/ivs/types;awstypes.PlaybackKeyPair")
29+
// @Testing(preIdentityVersion="v6.5.0")
30+
// @Testing(serialize=true)
31+
// @Testing(generator=false)
32+
// @Testing(tlsEcdsaPublicKeyPem=true)
33+
// @Testing(importIgnore="public_key")
34+
// @Testing(plannableImportAction=Replace)
2735
func ResourcePlaybackKeyPair() *schema.Resource {
2836
return &schema.Resource{
2937
CreateWithoutTimeout: resourcePlaybackKeyPairCreate,
3038
ReadWithoutTimeout: resourcePlaybackKeyPairRead,
3139
DeleteWithoutTimeout: resourcePlaybackKeyPairDelete,
3240

33-
Importer: &schema.ResourceImporter{
34-
StateContext: schema.ImportStatePassthroughContext,
35-
},
36-
3741
Timeouts: &schema.ResourceTimeout{
3842
Create: schema.DefaultTimeout(5 * time.Minute),
3943
Delete: schema.DefaultTimeout(5 * time.Minute),

0 commit comments

Comments
 (0)