@@ -221,17 +221,23 @@ func TestAccChannelValuesNotFlickering(t *testing.T) {
221
221
})
222
222
}
223
223
224
- func TestAccChannelResourceSTANDARD (t * testing.T ) {
224
+ func TestAccChannelTierChange (t * testing.T ) {
225
225
resource .Test (t , resource.TestCase {
226
226
PreCheck : func () { testAccPreCheck (t ) },
227
227
ProtoV6ProviderFactories : testAccProtoV6ProviderFactories ,
228
228
Steps : []resource.TestStep {
229
229
{
230
- Config : standardTierChannel (),
230
+ Config : standardTierChannel ("STANDARD" ),
231
231
Check : resource .ComposeAggregateTestCheckFunc (
232
232
resource .TestCheckResourceAttr ("data.awsmt_channel.test" , "tier" , "STANDARD" ),
233
233
),
234
234
},
235
+ {
236
+ Config : standardTierChannel ("BASIC" ),
237
+ Check : resource .ComposeAggregateTestCheckFunc (
238
+ resource .TestCheckResourceAttr ("data.awsmt_channel.test" , "tier" , "BASIC" ),
239
+ ),
240
+ },
235
241
},
236
242
})
237
243
}
@@ -408,8 +414,8 @@ func logConfigChannel(enable bool) string {
408
414
` , enable )
409
415
}
410
416
411
- func standardTierChannel () string {
412
- return `resource "awsmt_vod_source" "test" {
417
+ func standardTierChannel (t string ) string {
418
+ return fmt . Sprintf ( `resource "awsmt_vod_source" "test" {
413
419
http_package_configurations = [{
414
420
path = "/"
415
421
source_group = "default"
@@ -464,7 +470,7 @@ func standardTierChannel() string {
464
470
vod_source_name = awsmt_vod_source.test.name
465
471
}
466
472
policy = "{\"Version\": \"2012-10-17\", \"Statement\": [{\"Sid\": \"AllowAnonymous\", \"Effect\": \"Allow\", \"Principal\": \"*\", \"Action\": \"mediatailor:GetManifest\", \"Resource\": \"arn:aws:mediatailor:eu-central-1:985600762523:channel/test\"}]}"
467
- tier = "STANDARD "
473
+ tier = "%s "
468
474
tags = {"Environment": "dev"}
469
475
}
470
476
@@ -475,5 +481,5 @@ func standardTierChannel() string {
475
481
output "channel_out" {
476
482
value = data.awsmt_channel.test
477
483
}
478
- `
484
+ ` , t )
479
485
}
0 commit comments