-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix invalid TLS options * Fix docs * Change conf_auth test to validate all repo_tls options * Address PR review comment
- Loading branch information
Showing
6 changed files
with
68 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,45 @@ | ||
package confauth | ||
|
||
const ( | ||
resourceName = "cyral_repository_conf_auth" | ||
import "github.com/cyralinc/terraform-provider-cyral/cyral/utils" | ||
|
||
DefaultClientTLS = "disable" | ||
DefaultRepoTLS = "disable" | ||
const ( | ||
resourceName = "cyral_repository_conf_auth" | ||
AccessTokenAuthType = "ACCESS_TOKEN" | ||
AwsIAMAuthType = "AWS_IAM" | ||
DefaultAuthType = AccessTokenAuthType | ||
) | ||
|
||
const ( | ||
TLSEnable = TLSType("enable") | ||
TLSEnableAndVerifyCert = TLSType("enableAndVerifyCert") | ||
TLSDisable = TLSType("disable") | ||
) | ||
|
||
type TLSType string | ||
|
||
func ClientTLSTypes() []TLSType { | ||
return []TLSType{ | ||
TLSEnable, | ||
TLSDisable, | ||
} | ||
} | ||
|
||
func ClientTLSTypesAsString() []string { | ||
return utils.ToSliceOfString[TLSType](ClientTLSTypes(), func(t TLSType) string { | ||
return string(t) | ||
}) | ||
} | ||
|
||
func RepoTLSTypes() []TLSType { | ||
return []TLSType{ | ||
TLSEnable, | ||
TLSEnableAndVerifyCert, | ||
TLSDisable, | ||
} | ||
} | ||
|
||
func RepoTLSTypesAsString() []string { | ||
return utils.ToSliceOfString[TLSType](RepoTLSTypes(), func(t TLSType) string { | ||
return string(t) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters