---
updatedAt: 2026-06-19T10:19:50.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# scalr_vcs_provider

## Resource: scalr\_vcs\_provider

Manage the Scalr VCS provider. Create, update and destroy.

## Example Usage

```terraform
resource "scalr_vcs_provider" "example" {
  name       = "example-github"
  account_id = "acc-xxxxxxxxxx"
  vcs_type   = "github"
  token      = "token"
}
```

## Schema

### Required

* `name` (String) Name of the vcs provider.
* `token` (String, Sensitive) The personal access token for the provider.
  * GitHub token can be generated by url <https://github.com/settings/tokens/new?description=example-vcs-resouce&scopes=repo>
  * Gitlab token can be generated by url <https://gitlab.com/-/profile/personal_access_tokens?name=example-vcs-resouce&scopes=api,read_user,read_registry>
* `vcs_type` (String) The vcs provider type is one of `github`, `github_enterprise`, `gitlab`, `gitlab_enterprise`, `bitbucket_enterprise`. The other providers are not currently supported in the resource.

### Optional

* `account_id` (String) ID of the account.
* `agent_pool_id` (String) The id of the agent pool to connect Scalr to self-hosted VCS provider.
* `comments_enabled` (Boolean) Enable comments on pull requests for the VCS provider.
* `draft_pr_runs_enabled` (Boolean) Enable draft PR runs for the VCS provider.
* `environments` (Set of String) The list of environment identifiers that the VCS provider is shared to. Use `["*"]` to share with all environments.
* `pr_merge_comments_enabled` (Boolean) Enable comments after pull request merges for the VCS provider.
* `url` (String) This field is required for self-hosted vcs providers.
* `username` (String) This field is required for `bitbucket_enterprise` provider type.

### Read-Only

* `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import scalr_vcs_provider.example vcs-xxxxxxxxxx
```

# Sibling pages

* [scalr\_endpoint](https://docs.scalr.io/scalr/docs/provider_resource_scalr_endpoint.md)
* [scalr\_access\_policy](https://docs.scalr.io/scalr/docs/provider_resource_scalr_access_policy.md)
* [scalr\_account\_allowed\_ips](https://docs.scalr.io/scalr/docs/provider_resource_scalr_account_allowed_ips.md)
* [scalr\_agent\_pool](https://docs.scalr.io/scalr/docs/provider_resource_scalr_agent_pool.md)
* [scalr\_agent\_pool\_token](https://docs.scalr.io/scalr/docs/provider_resource_scalr_agent_pool_token.md)
* [scalr\_assume\_service\_account\_policy](https://docs.scalr.io/scalr/docs/provider_resource_scalr_assume_service_account_policy.md)
* [scalr\_checkov\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_checkov_integration.md)
* [scalr\_drift\_detection](https://docs.scalr.io/scalr/docs/provider_resource_scalr_drift_detection.md)
* [scalr\_environment](https://docs.scalr.io/scalr/docs/provider_resource_scalr_environment.md)
* [scalr\_environment\_hook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_environment_hook.md)
* [scalr\_event\_bridge\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_event_bridge_integration.md)
* [scalr\_federated\_environments](https://docs.scalr.io/scalr/docs/provider_resource_scalr_federated_environments.md)
* [scalr\_hook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_hook.md)
* [scalr\_iam\_team](https://docs.scalr.io/scalr/docs/provider_resource_scalr_iam_team.md)
* [scalr\_integration\_infracost](https://docs.scalr.io/scalr/docs/provider_resource_scalr_integration_infracost.md)
* [scalr\_module](https://docs.scalr.io/scalr/docs/provider_resource_scalr_module.md)
* [scalr\_module\_namespace](https://docs.scalr.io/scalr/docs/provider_resource_scalr_module_namespace.md)
* [scalr\_policy\_group](https://docs.scalr.io/scalr/docs/provider_resource_scalr_policy_group.md)
* [scalr\_policy\_group\_linkage](https://docs.scalr.io/scalr/docs/provider_resource_scalr_policy_group_linkage.md)
* [scalr\_provider\_configuration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_provider_configuration.md)
* [scalr\_provider\_configuration\_default](https://docs.scalr.io/scalr/docs/provider_resource_scalr_provider_configuration_default.md)
* [scalr\_role](https://docs.scalr.io/scalr/docs/provider_resource_scalr_role.md)
* [scalr\_run\_schedule\_rule](https://docs.scalr.io/scalr/docs/provider_resource_scalr_run_schedule_rule.md)
* [scalr\_run\_trigger](https://docs.scalr.io/scalr/docs/provider_resource_scalr_run_trigger.md)
* [scalr\_service\_account](https://docs.scalr.io/scalr/docs/provider_resource_scalr_service_account.md)
* [scalr\_service\_account\_token](https://docs.scalr.io/scalr/docs/provider_resource_scalr_service_account_token.md)
* [scalr\_slack\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_slack_integration.md)
* [scalr\_ssh\_key](https://docs.scalr.io/scalr/docs/provider_resource_scalr_ssh_key.md)
* [scalr\_storage\_profile](https://docs.scalr.io/scalr/docs/provider_resource_scalr_storage_profile.md)
* [scalr\_tag](https://docs.scalr.io/scalr/docs/provider_resource_scalr_tag.md)
* [scalr\_var\_set](https://docs.scalr.io/scalr/docs/provider_resource_scalr_var_set.md)
* [scalr\_variable](https://docs.scalr.io/scalr/docs/provider_resource_scalr_variable.md)
* [scalr\_webhook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_webhook.md)
* [scalr\_workload\_identity\_provider](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workload_identity_provider.md)
* [scalr\_workspace](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace.md)
* [scalr\_workspace\_run\_schedule](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace_run_schedule.md)
* [scalr\_workspace\_var\_set](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace_var_set.md)