terraform-provider-cloudflare
terraform-provider-cloudflare copied to clipboard
account_id/account data source
Current Terraform and Cloudflare provider version
v1.2.7
Description
A data source to fetch the provider's api token's account_id. Now that the provider's account_id is deprecated, we shouldn't have to explicitly look it up when we want to use it in a different resource.
Use cases
We need the account_id as part of logging in a cloudflare worker script, so we want to inject it as a variable. It's currently not possible (or at least I can't find a way) to fetch the account_id in Terraform config.
Potential Terraform configuration
similar to the aws provider
data "cloudflare_account" "current" {}
...
locals {
account_id = data.cloudflare_account.current.account_id
}
References
No response
this is already started in #1902. please follow that PR for updates.