- Follow the Porkbun getting started to use the API to activate the API for your domain and get the API key and Secret key.
- Ensure that you have permissions to create hosted zones in AWS.
- Create the SSM Parameters:
aws ssm put-parameter \
--name "/porkbun/api_key" \
--value "<PORKBUN_API_KEY>" \
--type "SecureString" \
--description "Porkbun API key"
aws ssm put-parameter \
--name "/porkbun/secret_api_key" \
--value "<PORKBUN_SECRET_API_KEY>" \
--type "SecureString" \
--description "Porkbun Secret key"
- Write your terraform.tfvars:
mv template.terraform.tfvars terraform.tfstate
And complete it with your values
terraform init
terraform apply
- Check that you have correctly set the NS values in Porkbun:
- After ~10 you should be able to check it from your terminal using
dig
:
dig subdomain.domain.com NS
If everything is ok you should see the four NS records from the hosted zone.
Now you can use your hosted zone to redirect a Load Balancer or and instance as you would normally do.