- Terraform >= 1.1.7
The Netskope Terraform Provider Repo includes sample plans to get you started. You will need to complete several task before launching any of the samples or to use the provider in your own plans.
-
Identify the "Base URL" for your Netskope tenant.
- This will be the URL used to manage your Netskope tenant
- For example:
https://example.goskope.com
-
Follow the REST APIv2 Documentaion to create an API Token
-
Setup Required Providers in TF file
terraform { required_providers { netskope = { version = "0.2.6" source = "netskopeoss/netskope" } } }
-
Optionally configure Provider Block
- Use of
NS_BaseURL
andNS_ApiToken
Environment Variables are preferred
provider "netskope" { baseurl = "https://<tenant-url>.goskope.com" apitoken = "<api token>" }
- Use of
-
Create a Publisher
resource "netskope_publishers" "Publisher" { name = "Example-Publisher" }
-
Create an Private Application
resource "netskope_privateapps" "PrivateApp" { app_name = "Eaxmple-Private-App" host = "site1.example.internal, site2.example.internal" protocols { type = "tcp" port = "22, 443, 8080-8081" } protocols { type = "udp" port = "194" } publisher { publisher_id = netskope_publishers.Publisher.id publisher_name = netskope_publishers.Publisher.name } tags { tag_name = "12345" } tags { tag_name = "6789" } }
- Clone Netskope Provider Repo
- Navigate to the Netskope Provider Dir
- Compile the Netskope Provider
git clone https://github.com/netskopeoss/terraform-provider-netskope.git
cd terraform-provider-netskope
make install
- Clone Netskope Provider Repo
- Navigate to the Netskope Provider Dir
- Compile the Netskope Provider
- Copy the Executable
git clone https://github.com/netskopeoss/terraform-provider-netskope.git
cd terraform-provider-netskope
go build
xcopy terraform-provider-netskope.exe %AppData%\terraform.d\plugins\github.com\netskopeoss\netskope\0.2.1\windows_386\ /Y