karanpratapsingh / preview-environments

Quickly create temporary preview environments
MIT License
14 stars 5 forks source link

Cloudflare account details #3

Closed moisesrodriguez closed 2 years ago

moisesrodriguez commented 2 years ago

Hello,

Looking at the config.ts it asks for the following:

 api_key: env.get('CLOUDFLARE_API_KEY').required().asString(),
 token: env.get('CLOUDFLARE_API_TOKEN').required().asString(),
 accountId: env.get('CLOUDFLARE_ACCOUNT_ID').required().asString(),
 zoneId: env.get('CLOUDFLARE_ZONE_ID').required().asString(),
 domain: '<todo-your-cloudflare-domain>',

I've found how to create a API Key and a API Token, but have not found the Account ID and Zone ID. Where do you get them from?

For example for the token are these permissions enough? Screen Shot 2022-02-07 at 13 23 22

For the cloudfare domain, where you get that from?

karanpratapsingh commented 2 years ago

Once you've created the a site in cloudflare dashboard, it's available in overview

Screenshot 2022-02-08 at 1 05 45 AM
moisesrodriguez commented 2 years ago

Ok, it is asking me to change my nameserver to Cloudflare, in this case is this necessary? Can I just leave it without changing my nameservers and use the Zone ID and Account ID?

I'm managing my domain with AWS Route53 and don't want to change it to Cloudflare, but if for this to work, if it is necessary I can probably buy another domain for this preview environments. But want to check if this is necessary first.

karanpratapsingh commented 2 years ago

In my case, I had 2 separate domains. The main domain was hosted on Route53 and the preview environment had a random domain setup on Cloudflare.