-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider: introduce
consts
to prevent typos and duplication
Creates a `consts` package to hold the provider schema that will be shared between SDKv2 and the plugin framework to prevent typos and duplication.
- Loading branch information
1 parent
c15d540
commit 8ebcddf
Showing
2 changed files
with
188 additions
and
95 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 |
---|---|---|
@@ -0,0 +1,97 @@ | ||
package consts | ||
|
||
const ( | ||
// Schema key for the API token configuration. | ||
APITokenSchemaKey = "api_token" | ||
|
||
// Environment variable key for the API token configuration. | ||
APITokenEnvVarKey = "CLOUDFLARE_API_TOKEN" | ||
|
||
// Schema key for the API key configuration. | ||
APIKeySchemaKey = "api_key" | ||
|
||
// Environment variable key for the API key configuration. | ||
APIKeyEnvVarKey = "CLOUDFLARE_API_KEY" | ||
|
||
// Schema key for the email configuration. | ||
EmailSchemaKey = "email" | ||
|
||
// Environment variable key for the email configuration. | ||
EmailEnvVarKey = "CLOUDFLARE_EMAIL" | ||
|
||
// Schema key for the API user service key configuration. | ||
APIUserServiceKeySchemaKey = "api_user_service_key" | ||
|
||
// Environment variable key for the API user service key configuration. | ||
APIUserServiceKeyEnvVarKey = "CLOUDFLARE_API_USER_SERVICE_KEY" | ||
|
||
// Schema key for the API hostname configuration. | ||
APIHostnameSchemaKey = "api_hostname" | ||
|
||
// Environment variable key for the API hostname configuration. | ||
APIHostnameEnvVarKey = "CLOUDFLARE_API_HOSTNAME" | ||
|
||
// Default value for the API hostname. | ||
APIHostnameDefault = "api.cloudflare.com" | ||
|
||
// Schema key for the API base path configuration. | ||
APIBasePathSchemaKey = "api_base_path" | ||
|
||
// Environment variable key for the API base path configuration. | ||
APIBasePathEnvVarKey = "CLOUDFLARE_API_BASE_PATH" | ||
|
||
// Default value for the API base path. | ||
APIBasePathDefault = "/client/v4" | ||
|
||
// Schema key for the requests per second configuration. | ||
RPSSchemaKey = "rps" | ||
|
||
// Environment variable key for the requests per second configuration. | ||
RPSEnvVarKey = "CLOUDFLARE_RPS" | ||
|
||
// Default value for the requests per second. | ||
RPSDefault = "4" | ||
|
||
// Schema key for the retries configuration. | ||
RetriesSchemaKey = "retries" | ||
|
||
// Environment variable key for the retries configuration. | ||
RetriesEnvVarKey = "CLOUDFLARE_RETRIES" | ||
|
||
// Default value for the retries. | ||
RetriesDefault = "4" | ||
|
||
// Schema key for the minimum backoff configuration. | ||
MinimumBackoffSchemaKey = "min_backoff" | ||
|
||
// Environment variable key for the minimum backoff configuration. | ||
MinimumBackoffEnvVar = "CLOUDFLARE_MIN_BACKOFF" | ||
|
||
// Default value for the minimum backoff. | ||
MinimumBackoffDefault = "1" | ||
|
||
// Schema key for the maximum configuration. | ||
MaximumBackoffSchemaKey = "max_backoff" | ||
|
||
// Environment variable key for the maximum backoff configuration. | ||
MaximumBackoffEnvVarKey = "CLOUDFLARE_MAX_BACKOFF" | ||
|
||
// Default value for the maximum backoff. | ||
MaximumBackoffDefault = "30" | ||
|
||
APIClientLoggingSchemaKey = "api_client_logging" | ||
APIClientLoggingEnvVarKey = "CLOUDFLARE_API_CLIENT_LOGGING" | ||
|
||
// Schema key for the account ID configuration. | ||
AccountIDSchemaKey = "account_id" | ||
|
||
// Environment variable key for the account ID configuration. | ||
// | ||
// Deprecated: Use resource specific account ID values instead. | ||
AccountIDEnvVarKey = "CLOUDFLARE_ACCOUNT_ID" | ||
|
||
// Schema key for the zone ID configuration. | ||
ZoneIDSchemaKey = "zone_id" | ||
|
||
UserAgentDefault = "terraform/%s terraform-plugin-sdk/%s terraform-provider-cloudflare/%s" | ||
) |
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