{"id":23406,"library":"cdktf-cdktf-provider-github","title":"CDKTF GitHub Provider","description":"Prebuilt Terraform CDK (CDKTF) provider for managing GitHub resources (repositories, teams, webhooks, etc.) programmatically with TypeScript/Python/Java/C#. Version 15.3.1 targets CDKTF 0.20+ and the GitHub Terraform provider ~> 6.0. Follows CDKTF's major version cadence.","status":"active","version":"15.3.1","language":"python","source_language":"en","source_url":"https://github.com/cdktf/cdktf-provider-github","tags":["terraform","cdktf","github","infrastructure","iac"],"install":[{"cmd":"pip install cdktf-cdktf-provider-github","lang":"bash","label":"Install PyPI package"}],"dependencies":[{"reason":"Required runtime dependency","package":"cdktf","optional":false},{"reason":"Required for CDK constructs","package":"constructs","optional":false},{"reason":"Required for cross-language bindings","package":"jsii","optional":false}],"imports":[{"note":"Common mistake: provider class not at package root","wrong":"from cdktf_cdktf_provider_github import GithubProvider","symbol":"GithubProvider","correct":"from cdktf_cdktf_provider_github.provider import GithubProvider"},{"note":"Resources are in submodules, not package root","wrong":"from cdktf_cdktf_provider_github import Repository","symbol":"Repository","correct":"from cdktf_cdktf_provider_github.repository import Repository"},{"note":"Same pattern for all resources","wrong":"from cdktf_cdktf_provider_github import Team","symbol":"Team","correct":"from cdktf_cdktf_provider_github.team import Team"}],"quickstart":{"code":"from constructs import Construct\nfrom cdktf import App, TerraformStack\nfrom cdktf_cdktf_provider_github.provider import GithubProvider\nfrom cdktf_cdktf_provider_github.repository import Repository\nimport os\n\nclass MyStack(TerraformStack):\n    def __init__(self, scope: Construct, id: str):\n        super().__init__(scope, id)\n        GithubProvider(self, 'github',\n            token = os.environ.get('GITHUB_TOKEN', '')\n        )\n        Repository(self, 'repo',\n            name = 'my-repo',\n            description = 'Created by CDKTF',\n            visibility = 'public'\n        )\n\napp = App()\nMyStack(app, 'github-stack')\napp.synth()","lang":"python","description":"Minimal stack to create a public GitHub repository"},"warnings":[{"fix":"Upgrade cdktf: pip install 'cdktf>=0.20'","message":"Version 15.x requires cdktf >=0.20. Using with cdktf 0.19.x will cause import errors.","severity":"breaking","affected_versions":">=15.0.0, <16.0.0"},{"fix":"Use submodule imports (e.g., `from cdktf_cdktf_provider_github.repository import Repository`)","message":"The old `cdktf_cdktf_provider_github.github` module (flat namespace) is deprecated; resources are now in submodules like `repository`, `team`, etc.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Export GITHUB_TOKEN or pass token= parameter to GithubProvider","message":"Provider token must be set via environment variable or explicitly. If not set, resource actions fail with 401.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from cdktf_cdktf_provider_github.repository import Repository` instead of `from cdktf_cdktf_provider_github import Repository`.","cause":"Trying to import from flat namespace after refactor to submodules.","error":"ModuleNotFoundError: No module named 'cdktf_cdktf_provider_github.github'"},{"fix":"Ensure cdktf and cdktf-cdktf-provider-github are compatible. Check release notes for compatibility matrix.","cause":"Version mismatch between cdktf and provider package.","error":"jsii.errors.JSIIError: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}