terraform-provider-idsec

command module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

README

Terraform Provider Idsec

License

Terraform Provider Idsec

CyberArk's Official Terraform Provider for CyberArk. This provider allows you to manage CyberArk resources using Terraform.

Terraform Registry: cyberark/idsec (documentation, versions, and installation).

Installation

Install from Terraform Registry

Use the published provider from the Terraform Registry.

terraform {
  required_providers {
    idsec = {
      source  = "cyberark/idsec"
      version = ">= 0.1"
    }
  }
}
Install from Source
git clone https://github.com/cyberark/terraform-provider-idsec.git
cd terraform-provider-idsec
make build

Provider Configuration

The provider supports multiple authentication methods to connect to CyberArk services. Choose the method that best fits your use case.

Authentication Methods
Method Description Use Case
identity CyberArk Identity personal user authentication Interactive users, development
identity_service_user CyberArk Identity service user authentication CI/CD pipelines, automation
pvwa Password Vault Web Access authentication PAM Self-Hosted environments

1. Identity Authentication (identity)

Use this method for personal user authentication via CyberArk Identity.

Configuration
provider "idsec" {
  auth_method = "identity"
  username    = var.idsec_username
  secret      = var.idsec_password
}
Environment Variables
export DEPLOY_ENV=integration-dev          # Optional: for non-production environments
export IDSEC_AUTH_METHOD=identity           # Authentication method
export IDSEC_USERNAME=user@cyberark.cloud   # Your CyberArk username
export IDSEC_SECRET=your-password           # Your password
Required Attributes
Attribute Description
username Your CyberArk Identity username
secret Your password

2. Identity Service User Authentication (identity_service_user)

Use this method for non-interactive authentication via a CyberArk Identity service user. It is the recommended method for CI/CD pipelines and automation.

Configuration
provider "idsec" {
  auth_method   = "identity_service_user"
  service_user  = var.idsec_service_user
  service_token = var.idsec_service_token
}
Environment Variables
export IDSEC_AUTH_METHOD=identity_service_user   # Authentication method
export IDSEC_SERVICE_USER=service-user@cyberark  # Your service user
export IDSEC_SERVICE_TOKEN=your-service-token     # Your service token
Required Attributes
Attribute Description
service_user Your CyberArk Identity service user
service_token The service user's token

3. PVWA Authentication (pvwa)

Use this method to authenticate against a Password Vault Web Access (PVWA) server for PAM Self-Hosted environments.

Configuration
provider "idsec" {
  auth_method       = "pvwa"
  pvwa_url          = "https://pvwa.example.com"
  pvwa_login_method = "cyberark"  # Options: cyberark, ldap, windows
  username          = var.pvwa_username
  secret            = var.pvwa_password
}
Environment Variables
export IDSEC_AUTH_METHOD=pvwa
export IDSEC_PVWA_URL=https://pvwa.example.com
export IDSEC_PVWA_LOGIN_METHOD=cyberark
export IDSEC_USERNAME=vault-admin
export IDSEC_SECRET=your-password
Required Attributes
Attribute Description
pvwa_url The base URL of your PVWA server
username Your PVWA username
secret Your PVWA password
Optional Attributes
Attribute Description Default
pvwa_login_method The PVWA authentication method (cyberark, ldap, windows) cyberark

Common Provider Attributes

These attributes are available for all authentication methods:

Attribute Description Default
cache_authentication Cache authentication tokens to avoid repeated logins true

Note: For Identity-based authentication methods, the provider automatically discovers your tenant from your username and environment. No tenant URL configuration is required.

Example Usage

Using Identity Authentication
terraform {
  required_providers {
    idsec = {
      source  = "cyberark/idsec"
      version = ">= 0.1"
    }
  }
}

provider "idsec" {
  auth_method = "identity"
  username    = var.idsec_username
  secret      = var.idsec_secret
}

resource "idsec_cmgr_network" "example_network" {
  name = "example_network"
}

resource "idsec_cmgr_pool" "example_pool" {
  name                  = "example_pool"
  description           = "A pool for example resources"
  assigned_network_ids  = [idsec_cmgr_network.example_network.network_id]
}

resource idsec_sia_access_connector "example_connector" {
  connector_type    = "ON-PREMISE"
  connector_os      = "linux"
  connector_pool_id = idsec_cmgr_pool.example_pool.pool_id
  target_machine    = "1.1.1.1"
  username          = "ec2-user"
  private_key_path  = "~/.ssh/key.pem"
}

In this example, we create a network, a pool, and a SIA connector using the Idsec Terraform provider. The access connector is configured to be installed on the ec2 machine with the given private key and username.

Using Identity Service User Authentication
terraform {
  required_providers {
    idsec = {
      source  = "cyberark/idsec"
      version = ">= 0.5"
    }
  }
}

provider "idsec" {
  auth_method   = "identity_service_user"
  service_user  = var.idsec_service_user
  service_token = var.idsec_service_token
}

In this example, we configure the provider to authenticate using a CyberArk Identity service user.

Using PVWA Authentication (PAM Self-Hosted)
terraform {
  required_providers {
    idsec = {
      source  = "cyberark/idsec"
      version = ">= 0.1"
    }
  }
}

provider "idsec" {
  auth_method       = "pvwa"
  pvwa_url          = var.pvwa_url
  pvwa_login_method = "cyberark"
  username          = var.pvwa_username
  secret            = var.pvwa_password
}

In this example, we configure the provider to authenticate using PVWA (Password Vault Web Access) for PAM Self-Hosted environments. The pvwa_login_method supports cyberark, ldap, or windows authentication methods.

More examples can be found in the examples directory.

Provider Configuration can be found in the provider documentation.

Schemas can be found in the relevant documentation for each resource / data source.

License

This project is licensed under Apache License 2.0 - see LICENSE for more details

Copyright (c) 2026 CyberArk Software Ltd. All rights reserved.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
schemas
Package schemas provides schema generation and conversion utilities for the Terraform provider.
Package schemas provides schema generation and conversion utilities for the Terraform provider.
tfactions/sechub
Package sechub registers Terraform actions for IDIRA services, including secret stores and sync policies, with the provider action registry.
Package sechub registers Terraform actions for IDIRA services, including secret stores and sync policies, with the provider action registry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL