Resource

dcloud_git_repository

A git repository, cloned and pushed over HTTPS (clone_url) or SSH. Deleting it deletes its history, pull requests and wiki.

Example Usage

resource "dcloud_git_repository" "api" {
  name           = "api"
  description    = "The Acme API"
  visibility     = "private"
  default_branch = "main"
}

Schema

Required

  • name (String) Unique within the organization; part of the clone URL. Up to 100 characters. Must match ^[A-Za-z0-9][A-Za-z0-9._-]*$. Changing it replaces the resource.

Optional

  • allow_merge_commit (Boolean) Pull requests may merge with a merge commit
  • allow_rebase_merge (Boolean) Pull requests may be rebase-merged
  • allow_squash_merge (Boolean) Pull requests may be squash-merged
  • default_branch (String) The branch clones check out and pull requests target by default; main when absent. Up to 100 characters.
  • default_workflow_permissions (String) What a workflow job's GITHUB_TOKEN may do when its file sets no permissions:: restricted (contents and packages read; new repositories) or permissive (read and write) One of: restricted, permissive.
  • delete_branch_on_merge (Boolean) Delete the source branch when a pull request is merged
  • description (String) One line about the repository; the template's description when absent. Up to 500 characters.
  • homepage (String) The About link (http or https); null removes it. Up to 300 characters.
  • is_archived (Boolean) true archives it (read-only: pushes, merges and edits refused); false unarchives
  • tags (Map of String) Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them). Changing it replaces the resource.
  • template (String) Start from a template: one commit with its files, no history (CI runs on it) Changing it replaces the resource.
  • topics (List of String) Topics: lowercase letters, digits and hyphens, at most 20
  • visibility (String) private (default) or public (needs git:PublishRepository). internal is a legacy value enforced exactly like private. One of: private, internal, public.

Read-Only

  • clone_url (String) The HTTPS clone URL.
  • id (String) The resource's id.

Generated from the provider's schema.