Documentation ¶
Index ¶
- Constants
- Variables
- func AddGroupUser(groupResource, groupName, terraformUserID string) sdk.TestCheckFunc
- func AddResourceGroup(resourceName, groupName string) sdk.TestCheckFunc
- func AddResourceServiceAccount(resourceName, serviceAccountName string) sdk.TestCheckFunc
- func CheckGroupUsersLen(resourceName string, expectedUsersLen int) sdk.TestCheckFunc
- func CheckImportState(attributes map[string]string) func(data []*terraform.InstanceState) error
- func CheckResourceActiveState(resourceAddress string, activeState bool) plancheck.PlanCheck
- func CheckResourceGroupsLen(resourceName string, expectedGroupsLen int) sdk.TestCheckFunc
- func CheckResourceSecurityPolicy(resourceName string, expectedSecurityPolicyID string) sdk.TestCheckFunc
- func CheckResourceServiceAccountsLen(resourceName string, expectedServiceAccountsLen int) sdk.TestCheckFunc
- func CheckTwingateConnectorAndRemoteNetworkDestroy(s *terraform.State) error
- func CheckTwingateConnectorDestroy(s *terraform.State) error
- func CheckTwingateConnectorTokensInvalidated(s *terraform.State) error
- func CheckTwingateGroupDestroy(s *terraform.State) error
- func CheckTwingateRemoteNetworkDestroy(s *terraform.State) error
- func CheckTwingateResourceActiveState(resourceName string, expectedActiveState bool) sdk.TestCheckFunc
- func CheckTwingateResourceDestroy(s *terraform.State) error
- func CheckTwingateResourceDoesNotExists(resourceName string) sdk.TestCheckFunc
- func CheckTwingateResourceExists(resourceName string) sdk.TestCheckFunc
- func CheckTwingateServiceAccountDestroy(s *terraform.State) error
- func CheckTwingateServiceKeyStatus(resourceName string, expectedStatus string) sdk.TestCheckFunc
- func CheckTwingateUserDestroy(s *terraform.State) error
- func ComposeTestCheckFunc(checkFuncs ...sdk.TestCheckFunc) sdk.TestCheckFunc
- func DeactivateTwingateResource(resourceName string) sdk.TestCheckFunc
- func DeleteGroupUser(groupResource, terraformUserID string) sdk.TestCheckFunc
- func DeleteResourceGroup(resourceName, groupName string) sdk.TestCheckFunc
- func DeleteResourceServiceAccount(resourceName, serviceAccountName string) sdk.TestCheckFunc
- func DeleteTwingateResource(resourceName, resourceType string) sdk.TestCheckFunc
- func ErrGroupsLenMismatch(expected, actual int) error
- func ErrServiceAccountsLenMismatch(expected, actual int) error
- func ErrUsersLenMismatch(expected, actual int) error
- func GetTestUser() (*model.User, error)
- func GetTestUsers() ([]*model.User, error)
- func GetTwingateResourceID(resourceName string, resourceID **string) sdk.TestCheckFunc
- func ListSecurityPolicies() ([]*model.SecurityPolicy, error)
- func PreCheck(t *testing.T)
- func ResourceName(resource, name string) string
- func RevokeTwingateServiceKey(resourceName string) sdk.TestCheckFunc
- func SetPageLimit(limit int)
- func TerraformConnector(name string) string
- func TerraformConnectorTokens(name string) string
- func TerraformGroup(name string) string
- func TerraformRemoteNetwork(name string) string
- func TerraformResource(name string) string
- func TerraformServiceAccount(name string) string
- func TerraformServiceKey(name string) string
- func TerraformUser(name string) string
- func UpdateResourceSecurityPolicy(resourceName, securityPolicyID string) sdk.TestCheckFunc
- func WaitTestFunc() sdk.TestCheckFunc
Constants ¶
View Source
const WaitDuration = 500 * time.Millisecond
Variables ¶
View Source
var ( ErrResourceIDNotSet = errors.New("id not set") ErrResourceNotFound = errors.New("resource not found") ErrResourceStillPresent = errors.New("resource still present") ErrResourceFoundInState = errors.New("this resource should not be here") ErrUnknownResourceType = errors.New("unknown resource type") ErrClientNotInited = errors.New("meta client not inited") ErrSecurityPoliciesNotFound = errors.New("security policies not found") )
View Source
var ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){ "twingate": func() (tfprotov6.ProviderServer, error) { upgradedSdkProvider, err := tf5to6server.UpgradeServer(context.Background(), twingate.Provider("test").GRPCProvider) if err != nil { log.Fatal(err) } providers := []func() tfprotov6.ProviderServer{ func() tfprotov6.ProviderServer { return upgradedSdkProvider }, providerserver.NewProtocol6(twingateV2.New("test")()), } provider, err := tf6muxserver.NewMuxServer(context.Background(), providers...) if err != nil { return nil, fmt.Errorf("failed to run mux server: %w", err) } return provider, nil }, }
Functions ¶
func AddGroupUser ¶ added in v0.3.3
func AddGroupUser(groupResource, groupName, terraformUserID string) sdk.TestCheckFunc
func AddResourceGroup ¶ added in v0.3.0
func AddResourceGroup(resourceName, groupName string) sdk.TestCheckFunc
func AddResourceServiceAccount ¶ added in v0.3.0
func AddResourceServiceAccount(resourceName, serviceAccountName string) sdk.TestCheckFunc
func CheckGroupUsersLen ¶ added in v0.3.3
func CheckGroupUsersLen(resourceName string, expectedUsersLen int) sdk.TestCheckFunc
func CheckImportState ¶
func CheckImportState(attributes map[string]string) func(data []*terraform.InstanceState) error
func CheckResourceActiveState ¶ added in v1.2.6
func CheckResourceGroupsLen ¶ added in v0.3.0
func CheckResourceGroupsLen(resourceName string, expectedGroupsLen int) sdk.TestCheckFunc
func CheckResourceSecurityPolicy ¶ added in v1.2.5
func CheckResourceSecurityPolicy(resourceName string, expectedSecurityPolicyID string) sdk.TestCheckFunc
func CheckResourceServiceAccountsLen ¶ added in v0.3.0
func CheckResourceServiceAccountsLen(resourceName string, expectedServiceAccountsLen int) sdk.TestCheckFunc
func CheckTwingateConnectorAndRemoteNetworkDestroy ¶ added in v1.2.2
func CheckTwingateConnectorTokensInvalidated ¶ added in v1.2.2
func CheckTwingateResourceActiveState ¶
func CheckTwingateResourceActiveState(resourceName string, expectedActiveState bool) sdk.TestCheckFunc
func CheckTwingateResourceDoesNotExists ¶
func CheckTwingateResourceDoesNotExists(resourceName string) sdk.TestCheckFunc
func CheckTwingateResourceExists ¶
func CheckTwingateResourceExists(resourceName string) sdk.TestCheckFunc
func CheckTwingateServiceKeyStatus ¶
func CheckTwingateServiceKeyStatus(resourceName string, expectedStatus string) sdk.TestCheckFunc
func CheckTwingateUserDestroy ¶ added in v1.1.0
func ComposeTestCheckFunc ¶
func ComposeTestCheckFunc(checkFuncs ...sdk.TestCheckFunc) sdk.TestCheckFunc
func DeactivateTwingateResource ¶
func DeactivateTwingateResource(resourceName string) sdk.TestCheckFunc
func DeleteGroupUser ¶ added in v0.3.3
func DeleteGroupUser(groupResource, terraformUserID string) sdk.TestCheckFunc
func DeleteResourceGroup ¶ added in v0.3.0
func DeleteResourceGroup(resourceName, groupName string) sdk.TestCheckFunc
func DeleteResourceServiceAccount ¶ added in v0.3.0
func DeleteResourceServiceAccount(resourceName, serviceAccountName string) sdk.TestCheckFunc
func DeleteTwingateResource ¶
func DeleteTwingateResource(resourceName, resourceType string) sdk.TestCheckFunc
func ErrGroupsLenMismatch ¶ added in v0.3.0
func ErrServiceAccountsLenMismatch ¶ added in v0.3.0
func ErrUsersLenMismatch ¶ added in v0.3.3
func GetTestUser ¶ added in v1.2.2
func GetTestUsers ¶ added in v0.3.3
func GetTwingateResourceID ¶ added in v1.2.2
func GetTwingateResourceID(resourceName string, resourceID **string) sdk.TestCheckFunc
func ListSecurityPolicies ¶ added in v0.2.4
func ListSecurityPolicies() ([]*model.SecurityPolicy, error)
func ResourceName ¶
func RevokeTwingateServiceKey ¶
func RevokeTwingateServiceKey(resourceName string) sdk.TestCheckFunc
func SetPageLimit ¶ added in v1.1.0
func SetPageLimit(limit int)
func TerraformConnector ¶
func TerraformGroup ¶
func TerraformRemoteNetwork ¶
func TerraformResource ¶
func TerraformServiceAccount ¶
func TerraformServiceKey ¶
func TerraformUser ¶ added in v1.1.0
func UpdateResourceSecurityPolicy ¶ added in v1.2.5
func UpdateResourceSecurityPolicy(resourceName, securityPolicyID string) sdk.TestCheckFunc
func WaitTestFunc ¶
func WaitTestFunc() sdk.TestCheckFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.