Providers API¶
Base classes and utilities for creating Terraform providers.
🤖 AI-Generated Content
This documentation was generated with AI assistance and is still being audited. Some, or potentially a lot, of this information may be inaccurate. Learn more.
Overview¶
Providers in Pyvider are the entry point for your Terraform provider implementation. They handle: - Configuration and authentication - Metadata (name, version, protocol) - Component discovery and registration - Shared state and resources
Key Components¶
BaseProvider- Base class for all providers@register_provider- Decorator for provider registrationProviderMetadata- Provider metadata definitionProviderContext- Provider runtime context- Provider capabilities - Reusable provider behaviors
Lifecycle¶
Providers implement:
- setup() - Initialize provider (called once)
- configure() - Configure with user settings
- get_schema() - Return provider configuration schema
Usage Examples¶
Basic Provider¶
Provider with Retry Logic¶
Provider with Caching¶
Provider with OAuth 2.0¶
Testing Providers¶
Related Guides¶
- Creating Providers - Complete provider development guide
- Best Practices - Provider best practices
- Security Best Practices - Secure providers
- Performance Optimization - Fast providers
- Testing Providers - Testing strategies