3 – Configure HTTPS settings
After proxying a basic website through Cloudflare, you can use Terraform to adjust zone settings. In this tutorial, you will configure some optional HTTPS settings and then push the updated configuration to GitHub for posterity.
You will use a new Git branch for the changes and then merge it into the master
branch before applying. On a team, you might consider using this step as an opportunity for others to review your change before merging and deploying it. You can also integrate Terraform into your CI/CD system to perform tests automatically using another Cloudflare domain.
In this step, modify the Terraform configuration to enable the following settings:
Strict mode requires a valid SSL certificate on your origin — use the Cloudflare Origin CA to generate one.
Review what Terraform is proposing before applying changes. The example output below is being filtered to ignore computed values — in this case, settings that will keep their default values.
The proposed changes look good, so you can merge them into the master
branch and then apply them with terraform apply
. When working on a team, you may want to require pull requests and use this opportunity to peer review any proposed configuration changes.
Before applying the changes, try to connect with TLS 1.3. Technically, you should not be able to with default settings. To follow along with this test, you will need to compile curl
against BoringSSL ↗.
As shown above, you should receive an error because TLS 1.3 is not yet enabled on your zone. Enable it by running terraform apply
and try again.
Try the same command as before. The command will now succeed.