@@ -31,6 +31,31 @@ func TestAccFreeEnvVar(t *testing.T) {
3131 }, func (s * terraform.State ) error { return nil })
3232}
3333
34+ func TestAccFreeSecretEnvVar (t * testing.T ) {
35+ accTest (t , []resource.TestStep {
36+ {
37+ Config : `resource "netlify_environment_variable" "site_level_secret" {
38+ team_id = "66e98216e3fe031846dc998a"
39+ site_id = "fbba82b0-f1e9-4e92-9203-eefc62857545"
40+ key = "TEST_SITE_LEVEL_SECRET"
41+ scopes = ["functions", "builds", "runtime"]
42+ secret_values = [
43+ {
44+ value = "ill-never-tell",
45+ context = "production",
46+ }
47+ ]
48+ }
49+ ` ,
50+ Check : resource .ComposeAggregateTestCheckFunc (
51+ resource .TestCheckResourceAttr ("netlify_environment_variable.site_level_secret" , "team_id" , "66e98216e3fe031846dc998a" ),
52+ resource .TestCheckResourceAttr ("netlify_environment_variable.site_level_secret" , "site_id" , "fbba82b0-f1e9-4e92-9203-eefc62857545" ),
53+ resource .TestCheckResourceAttr ("netlify_environment_variable.site_level_secret" , "key" , "TEST_SITE_LEVEL_SECRET" ),
54+ ),
55+ },
56+ }, func (s * terraform.State ) error { return nil })
57+ }
58+
3459func TestAccFreeSiteBuildSettings (t * testing.T ) {
3560 accTest (t , []resource.TestStep {
3661 {
0 commit comments