Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual + Cloudflare on one server #57

Open
eriteric opened this issue Dec 15, 2021 · 1 comment
Open

Manual + Cloudflare on one server #57

eriteric opened this issue Dec 15, 2021 · 1 comment

Comments

@eriteric
Copy link

I have multiple sites on one trellis, and some use different cloudflare accounts. When attempting to use a combination of manual and cloudflare it says that it can't find the domain (predictably) but, it shouldn't be trying to because i have those set to manual SSL.
What I've done for now is set all sites to manual, then it provisions successfully.

Another solution could be using multiple account keys and setting them for each site in wordpress_sites.yml or vault.yml
This could just be some weird edge case that nobody ever does though. :)

@tangrufus
Copy link
Member

Good catch!

We should add support "per site Cloudflare API key" support.

Something like:

# In vault.yml

vault_cloudflare_origin_ca_key: v1.0-xxxxxxxxxxx
vault_cloudflare_origin_ca_key_of_another_account: v1.0-yyyyyyyyyyyy

# In wordpress_sites.yml

wordpress_sites:
  example.com:
    cloudflare_origin_ca:
       # No `origin_ca_key` config. Fallback to `vault_cloudflare_origin_ca_key`
  example-another-account.com:
    cloudflare_origin_ca:
       # Plain text string is okay. But, you really want to encrypt it in vault.yml
       origin_ca_key: "{{ vault_cloudflare_origin_ca_key_of_another_account }}"

Would you be able to submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants