@@ -10,6 +10,7 @@ import (
10
10
"github.com/cloudflare/terraform-provider-cloudflare/internal/consts"
11
11
"github.com/cloudflare/terraform-provider-cloudflare/internal/utils"
12
12
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
13
+ "github.com/hashicorp/terraform-plugin-testing/plancheck"
13
14
"github.com/hashicorp/terraform-plugin-testing/terraform"
14
15
)
15
16
@@ -54,6 +55,31 @@ func TestAccCloudflareAccessOrganization(t *testing.T) {
54
55
resource .TestCheckResourceAttr (name , "allow_authenticate_via_warp" , "false" ),
55
56
),
56
57
},
58
+ {
59
+ Config : testAccCloudflareAccessOrganizationConfigBasic (rnd , accountID , headerText , testAuthDomain ()),
60
+ Check : resource .ComposeTestCheckFunc (
61
+ resource .TestCheckResourceAttr (name , consts .AccountIDSchemaKey , accountID ),
62
+ resource .TestCheckResourceAttr (name , "name" , testAuthDomain ()),
63
+ resource .TestCheckResourceAttr (name , "auth_domain" , rnd + "-" + testAuthDomain ()),
64
+ resource .TestCheckResourceAttr (name , "is_ui_read_only" , "false" ),
65
+ resource .TestCheckResourceAttr (name , "user_seat_expiration_inactive_time" , "1460h" ),
66
+ resource .TestCheckResourceAttr (name , "auto_redirect_to_identity" , "false" ),
67
+ resource .TestCheckResourceAttr (name , "login_design.background_color" , "#FFFFFF" ),
68
+ resource .TestCheckResourceAttr (name , "login_design.text_color" , "#000000" ),
69
+ resource .TestCheckResourceAttr (name , "login_design.logo_path" , "https://example.com/logo.png" ),
70
+ resource .TestCheckResourceAttr (name , "login_design.header_text" , headerText ),
71
+ resource .TestCheckResourceAttr (name , "login_design.footer_text" , "My footer text" ),
72
+ resource .TestCheckResourceAttr (name , "session_duration" , "12h" ),
73
+ resource .TestCheckResourceAttr (name , "warp_auth_session_duration" , "36h" ),
74
+ resource .TestCheckResourceAttr (name , "allow_authenticate_via_warp" , "false" ),
75
+ ),
76
+ ConfigPlanChecks : resource.ConfigPlanChecks {
77
+ PreApply : []plancheck.PlanCheck {
78
+ plancheck .ExpectResourceAction (name , plancheck .ResourceActionNoop ),
79
+ plancheck .ExpectEmptyPlan (),
80
+ },
81
+ },
82
+ },
57
83
{
58
84
ResourceName : name ,
59
85
ImportState : true ,
0 commit comments