In this repo, we will demonstrate API Management with F5 Distributed Cloud (XC) - DNS using Visual Studio Code

First, we will prepare Visual Studio Code by installing two extensions, creating and copying our F5 XC API token, cloning this GitHub repo for local use, and updating the repo files for your environment.
-
Download: Visual Studio Code
-
Install REST Client Extension from the Visual Studio Code Marketplace:
Ctrl + Shift + X -> search for humao.rest-client -> install
Files ending with .http or .rest will automatically be syntax-highlighted
- Install Dotenv Official Extension from the Visual Studio Code Marketplace:
Ctrl + Shift + X -> search for dotenv.dotenv-vscode -> install
This is used to quickly reference API tokens without exposing API tokens in code.
Administration > Personal Management > Credentials > Add Credentials
gh repo clone tjvreugdenhil/f5xc-dns-zone-vscode
-
Rename ".env.sample" from github repo to ".env"
paste API token into the .env file
paste f5 XC tenant name into the .env file
These steps walk through creating a test F5 XC DNS zone, verifying commits, replacing zone records, and deleting the test zone.
- Verify F5 DNS Zone does not exist:
{Send Request}: "GET f5xc-demo.com.rest"
- Create F5 DNS Zone:
{Send Request}: "POST f5xc-demo.com zone.rest"
- Verify F5 DNS Zone was created:
{Send Request}: "GET f5xc-demo.com.rest"
- Replace F5 DNS Zone with new records:
{Send Request}: "PUT f5xc-demo.com zone.rest"
- Delete F5 DNS Zone
{Send Request}: "DELETE f5xc-demo.com zone.rest"
ADDITIONAL INFORMATION:
#POST - Creates DNS Zone. If one already exists, it will give an error.
#PUT - Replaces DNS Zone
#GET - Lists DNS Zone or use "curl GET f5xc-demo.com zone.rest"
#DELETE - Deletes DNS Zone
#If using "f5xc-backup.sh" - install jq for Windows by running this curl in gitbash or the vscode bash terminal
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
#Install vscode thunder client extension to build REST collections:
Ctrl + Shift + X -> search for rangav.vscode-thunder-client -> install
#install gitignore for .env file:
Ctrl + Shift + X -> codezombiech.gitignore -> install