scalr_vcs_provider Resource

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

Example Usage

Basic usage:

resource "scalr_vcs_provider" "example" {
  name="example-github"
  account_id = "acc-xxxxx"
  vcs_type="github"
  token="token"
}

Argument Reference

  • name - (Required) Name of the vcs provider.

  • vcs_type (Required) The vcs provider type is one of github, github_enterprice, gitlab, github_enterprice, bitbucket_enterprise. The other providers currently is not supported in resource.

  • token (Required) The personal access token for 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

  • account_id - (Optional) ID of the account.

  • url - (Optional) This field is required for self-hosted vcs providers.

Attribute Reference

All arguments plus:

  • id - The ID of the vcs provider.

Import

To import vcs provider use vcs provider ID as the import ID. For example:

terraform import scalr_vcs_provider.example vcs-xxxxxxxxxx