Registry /
devops / cdktf-cdktf-provider-github
Install & Compatibility
Where this runs
tested against v15.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 40.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.9s · import 0.000s · 41MB
42MB installed
● package 42MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GithubProvider
✓ from cdktf_cdktf_provider_github.provider import GithubProvider
✗ from cdktf_cdktf_provider_github import GithubProvider
Common mistake: provider class not at package root
Repository
✓ from cdktf_cdktf_provider_github.repository import Repository
✗ from cdktf_cdktf_provider_github import Repository
Resources are in submodules, not package root
Team
✓ from cdktf_cdktf_provider_github.team import Team
✗ from cdktf_cdktf_provider_github import Team
Same pattern for all resources
Minimal stack to create a public GitHub repository
from constructs import Construct
from cdktf import App, TerraformStack
from cdktf_cdktf_provider_github.provider import GithubProvider
from cdktf_cdktf_provider_github.repository import Repository
import os
class MyStack(TerraformStack):
def __init__(self, scope: Construct, id: str):
super().__init__(scope, id)
GithubProvider(self, 'github',
token = os.environ.get('GITHUB_TOKEN', '')
)
Repository(self, 'repo',
name = 'my-repo',
description = 'Created by CDKTF',
visibility = 'public'
)
app = App()
MyStack(app, 'github-stack')
app.synth()
Debug
Known issues
breakingVersion 15.x requires cdktf >=0.20. Using with cdktf 0.19.x will cause import errors.fixUpgrade cdktf: pip install 'cdktf>=0.20'
affects: >=15.0.0, <16.0.0
deprecatedThe old `cdktf_cdktf_provider_github.github` module (flat namespace) is deprecated; resources are now in submodules like `repository`, `team`, etc.fixUse submodule imports (e.g., `from cdktf_cdktf_provider_github.repository import Repository`)
affects: >=10.0.0
gotchaProvider token must be set via environment variable or explicitly. If not set, resource actions fail with 401.fixExport GITHUB_TOKEN or pass token= parameter to GithubProvider
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cdktf_cdktf_provider_github.github'
Trying to import from flat namespace after refactor to submodules.
fixUse `from cdktf_cdktf_provider_github.repository import Repository` instead of `from cdktf_cdktf_provider_github import Repository`.
jsii.errors.JSIIError: ...
Version mismatch between cdktf and provider package.
fixEnsure cdktf and cdktf-cdktf-provider-github are compatible. Check release notes for compatibility matrix.
Upgrade
Version history
15.3.1latest on PyPI · released Dec 10, 2025
Audit
Dependencies
cdktfrequiredRequired runtime dependency
constructsrequiredRequired for CDK constructs
jsiirequiredRequired for cross-language bindings