A platform team uses Terraform for AWS. It now wants GitHub repositories, Datadog monitors and Cloudflare DNS records tracked in state and shown in plan, exactly like its AWS resources. What makes this possible?
Choose one.
Terraform is service-agnostic: a provider is a bridge to any API, so SaaS platforms are managed with the same workflow as clouds.
Providers for GitHub, Datadog and Cloudflare expose resource types (for example a repository or a monitor) that Terraform tracks in state and diffs in plan, exactly like aws_instance. Provisioners and the external data source are tempting because they can reach any CLI or script, but neither creates managed resources: provisioners run side-effect commands and data sources only read.
- Note the requirement: objects tracked in state and shown in plan.
- Recall that only resources (from a provider) are managed through state and plan.
- Reject workarounds that run commands or read data without managing resources.
Exam tip: If a service has an API, a provider can make it a Terraform resource with the normal lifecycle.
Infrastructure as Code with Terraform: Concepts and Multi-Cloud Workflows — the lesson that teaches this.