pulumi-infisical 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +493 -0
- package/bin/_virtual/rolldown_runtime.mjs +37 -0
- package/bin/accessApprovalPolicy.d.mts +128 -0
- package/bin/accessApprovalPolicy.mjs +100 -0
- package/bin/appConnectionGcp.d.mts +100 -0
- package/bin/appConnectionGcp.mjs +85 -0
- package/bin/config/index.d.mts +8 -0
- package/bin/config/index.mjs +9 -0
- package/bin/config/vars.d.mts +28 -0
- package/bin/config/vars.mjs +42 -0
- package/bin/getGroups.d.mts +18 -0
- package/bin/getGroups.mjs +25 -0
- package/bin/getProjects.d.mts +37 -0
- package/bin/getProjects.mjs +25 -0
- package/bin/getSecretFolders.d.mts +37 -0
- package/bin/getSecretFolders.mjs +33 -0
- package/bin/getSecretTag.d.mts +31 -0
- package/bin/getSecretTag.mjs +31 -0
- package/bin/getSecrets.d.mts +39 -0
- package/bin/getSecrets.mjs +33 -0
- package/bin/identity.d.mts +89 -0
- package/bin/identity.mjs +80 -0
- package/bin/identityAwsAuth.d.mts +158 -0
- package/bin/identityAwsAuth.mjs +108 -0
- package/bin/identityAzureAuth.d.mts +155 -0
- package/bin/identityAzureAuth.mjs +108 -0
- package/bin/identityGcpAuth.d.mts +167 -0
- package/bin/identityGcpAuth.mjs +113 -0
- package/bin/identityKubernetesAuth.d.mts +191 -0
- package/bin/identityKubernetesAuth.mjs +127 -0
- package/bin/identityOidcAuth.d.mts +206 -0
- package/bin/identityOidcAuth.mjs +130 -0
- package/bin/identityUniversalAuth.d.mts +122 -0
- package/bin/identityUniversalAuth.mjs +92 -0
- package/bin/identityUniversalAuthClientSecret.d.mts +130 -0
- package/bin/identityUniversalAuthClientSecret.mjs +110 -0
- package/bin/index.d.mts +122 -0
- package/bin/index.mjs +246 -0
- package/bin/integrationAwsParameterStore.d.mts +177 -0
- package/bin/integrationAwsParameterStore.mjs +129 -0
- package/bin/integrationAwsSecretsManager.d.mts +192 -0
- package/bin/integrationAwsSecretsManager.mjs +135 -0
- package/bin/integrationCircleci.d.mts +130 -0
- package/bin/integrationCircleci.mjs +109 -0
- package/bin/integrationDatabricks.d.mts +130 -0
- package/bin/integrationDatabricks.mjs +109 -0
- package/bin/integrationGcpSecretManager.d.mts +132 -0
- package/bin/integrationGcpSecretManager.mjs +108 -0
- package/bin/package.json +62 -0
- package/bin/package.mjs +65 -0
- package/bin/project.d.mts +92 -0
- package/bin/project.mjs +81 -0
- package/bin/projectEnvironment.d.mts +90 -0
- package/bin/projectEnvironment.mjs +79 -0
- package/bin/projectGroup.d.mts +100 -0
- package/bin/projectGroup.mjs +85 -0
- package/bin/projectIdentity.d.mts +96 -0
- package/bin/projectIdentity.mjs +86 -0
- package/bin/projectIdentitySpecificPrivilege.d.mts +176 -0
- package/bin/projectIdentitySpecificPrivilege.mjs +119 -0
- package/bin/projectRole.d.mts +125 -0
- package/bin/projectRole.mjs +94 -0
- package/bin/projectUser.d.mts +96 -0
- package/bin/projectUser.mjs +86 -0
- package/bin/provider.d.mts +75 -0
- package/bin/provider.mjs +69 -0
- package/bin/secret.d.mts +121 -0
- package/bin/secret.mjs +100 -0
- package/bin/secretApprovalPolicy.d.mts +128 -0
- package/bin/secretApprovalPolicy.mjs +100 -0
- package/bin/secretFolder.d.mts +98 -0
- package/bin/secretFolder.mjs +86 -0
- package/bin/secretImport.d.mts +114 -0
- package/bin/secretImport.mjs +95 -0
- package/bin/secretSyncAwsParameterStore.d.mts +152 -0
- package/bin/secretSyncAwsParameterStore.mjs +113 -0
- package/bin/secretSyncAwsSecretsManager.d.mts +152 -0
- package/bin/secretSyncAwsSecretsManager.mjs +113 -0
- package/bin/secretSyncAzureAppConfiguration.d.mts +152 -0
- package/bin/secretSyncAzureAppConfiguration.mjs +113 -0
- package/bin/secretSyncAzureKeyVault.d.mts +152 -0
- package/bin/secretSyncAzureKeyVault.mjs +113 -0
- package/bin/secretSyncGcpSecretManager.d.mts +152 -0
- package/bin/secretSyncGcpSecretManager.mjs +113 -0
- package/bin/secretTag.d.mts +90 -0
- package/bin/secretTag.mjs +80 -0
- package/bin/types/index.d.mts +9 -0
- package/bin/types/index.mjs +13 -0
- package/bin/types/input.d.mts +488 -0
- package/bin/types/input.mjs +5 -0
- package/bin/types/output.d.mts +546 -0
- package/bin/types/output.mjs +5 -0
- package/bin/utilities.mjs +61 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
# Pulumi Infisical Provider
|
|
2
|
+
|
|
3
|
+
A Pulumi provider for managing Infisical secrets management platform, dynamically bridged from the [Terraform Infisical Provider](https://github.com/infisical/terraform-provider-infisical).
|
|
4
|
+
|
|
5
|
+
## Introduction
|
|
6
|
+
|
|
7
|
+
This package provides a Pulumi provider that enables you to manage your Infisical secrets management platform using TypeScript, JavaScript, Python, Go, or C#. The provider is automatically generated from the Terraform Infisical provider, giving you access to all its functionality within the Pulumi ecosystem.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **Secrets Management**: Create and manage secrets, folders, and tags across projects and environments
|
|
12
|
+
- **Identity & Authentication**: Configure multiple authentication methods (Universal Auth, AWS IAM, GCP, Azure, Kubernetes, OIDC)
|
|
13
|
+
- **Project Management**: Organize secrets with projects, environments, and role-based access control
|
|
14
|
+
- **Integrations**: Connect with cloud providers (AWS, GCP, Azure) and CI/CD platforms (CircleCI, Databricks)
|
|
15
|
+
- **Access Control**: Implement approval policies and fine-grained permissions
|
|
16
|
+
- **Secret Synchronization**: Sync secrets to external secret stores (AWS Parameter Store, Secrets Manager, Azure Key Vault, etc.)
|
|
17
|
+
- **TypeScript Support**: Full type safety with comprehensive TypeScript definitions
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### npm
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install pulumi-infisical
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### yarn
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
yarn add pulumi-infisical
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### pnpm
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pnpm add pulumi-infisical
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
Before using the provider, you need to configure authentication with your Infisical API credentials.
|
|
42
|
+
|
|
43
|
+
### Required Configuration
|
|
44
|
+
|
|
45
|
+
- **Host URL**: Your Infisical instance URL (e.g., `https://app.infisical.com`)
|
|
46
|
+
- **Service Token**: Service token for machine-to-machine authentication
|
|
47
|
+
|
|
48
|
+
### Optional Configuration
|
|
49
|
+
|
|
50
|
+
- **Universal Auth**: Client ID and secret for Universal Auth
|
|
51
|
+
- **AWS IAM Auth**: For AWS-based authentication
|
|
52
|
+
- **GCP Auth**: For Google Cloud authentication
|
|
53
|
+
|
|
54
|
+
### Setting Configuration
|
|
55
|
+
|
|
56
|
+
You can configure the provider in several ways:
|
|
57
|
+
|
|
58
|
+
#### 1. Using Pulumi Config
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pulumi config set infisical:hostUrl https://app.infisical.com
|
|
62
|
+
pulumi config set --secret infisical:serviceToken your-service-token
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
#### 2. Using Environment Variables
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
export INFISICAL_HOST_URL="https://app.infisical.com"
|
|
69
|
+
export INFISICAL_SERVICE_TOKEN="your-service-token"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### 3. Provider Constructor
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import * as infisical from 'pulumi-infisical'
|
|
76
|
+
|
|
77
|
+
const provider = new infisical.Provider('infisical-provider', {
|
|
78
|
+
hostUrl: 'https://app.infisical.com',
|
|
79
|
+
serviceToken: 'your-service-token',
|
|
80
|
+
})
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Usage
|
|
84
|
+
|
|
85
|
+
### Project and Environment Management
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import * as infisical from 'pulumi-infisical'
|
|
89
|
+
|
|
90
|
+
// Create a project
|
|
91
|
+
const project = new infisical.Project('my-app', {
|
|
92
|
+
name: 'my-application',
|
|
93
|
+
slug: 'my-app',
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
// Create environments
|
|
97
|
+
const devEnvironment = new infisical.ProjectEnvironment('dev-env', {
|
|
98
|
+
projectId: project.id,
|
|
99
|
+
name: 'development',
|
|
100
|
+
slug: 'dev',
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
const prodEnvironment = new infisical.ProjectEnvironment('prod-env', {
|
|
104
|
+
projectId: project.id,
|
|
105
|
+
name: 'production',
|
|
106
|
+
slug: 'prod',
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Secrets Management
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import * as infisical from 'pulumi-infisical'
|
|
114
|
+
|
|
115
|
+
// Create secret folders for organization
|
|
116
|
+
const apiFolder = new infisical.SecretFolder('api-secrets', {
|
|
117
|
+
projectId: project.id,
|
|
118
|
+
environmentSlug: 'dev',
|
|
119
|
+
path: '/api',
|
|
120
|
+
name: 'api-config',
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
const dbFolder = new infisical.SecretFolder('db-secrets', {
|
|
124
|
+
projectId: project.id,
|
|
125
|
+
environmentSlug: 'dev',
|
|
126
|
+
path: '/database',
|
|
127
|
+
name: 'database-config',
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
// Create secrets
|
|
131
|
+
const dbPassword = new infisical.Secret('db-password', {
|
|
132
|
+
projectId: project.id,
|
|
133
|
+
environmentSlug: 'dev',
|
|
134
|
+
secretPath: '/database',
|
|
135
|
+
secretName: 'DB_PASSWORD',
|
|
136
|
+
secretValue: 'super-secret-password',
|
|
137
|
+
type: 'shared',
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const apiKey = new infisical.Secret('api-key', {
|
|
141
|
+
projectId: project.id,
|
|
142
|
+
environmentSlug: 'dev',
|
|
143
|
+
secretPath: '/api',
|
|
144
|
+
secretName: 'API_KEY',
|
|
145
|
+
secretValue: 'your-api-key',
|
|
146
|
+
type: 'shared',
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
// Create secret tags for categorization
|
|
150
|
+
const dbTag = new infisical.SecretTag('database-tag', {
|
|
151
|
+
projectId: project.id,
|
|
152
|
+
name: 'database',
|
|
153
|
+
color: '#3b82f6',
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
const apiTag = new infisical.SecretTag('api-tag', {
|
|
157
|
+
projectId: project.id,
|
|
158
|
+
name: 'api',
|
|
159
|
+
color: '#10b981',
|
|
160
|
+
})
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Identity and Authentication
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import * as infisical from 'pulumi-infisical'
|
|
167
|
+
|
|
168
|
+
// Create Universal Auth identity
|
|
169
|
+
const appIdentity = new infisical.Identity('app-identity', {
|
|
170
|
+
name: 'my-application-identity',
|
|
171
|
+
authMethod: 'universal-auth',
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
// Configure Universal Auth
|
|
175
|
+
const universalAuth = new infisical.IdentityUniversalAuth(
|
|
176
|
+
'app-universal-auth',
|
|
177
|
+
{
|
|
178
|
+
identityId: appIdentity.id,
|
|
179
|
+
clientSecretTrustedIps: [
|
|
180
|
+
{
|
|
181
|
+
ipAddress: '0.0.0.0/0',
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
accessTokenTrustedIps: [
|
|
185
|
+
{
|
|
186
|
+
ipAddress: '0.0.0.0/0',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
accessTokenTtl: 3600,
|
|
190
|
+
accessTokenMaxTtl: 7200,
|
|
191
|
+
},
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
// Create client secret
|
|
195
|
+
const clientSecret = new infisical.IdentityUniversalAuthClientSecret(
|
|
196
|
+
'app-client-secret',
|
|
197
|
+
{
|
|
198
|
+
identityId: appIdentity.id,
|
|
199
|
+
description: 'Client secret for my application',
|
|
200
|
+
ttl: 0, // No expiration
|
|
201
|
+
},
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
// Create AWS IAM Auth identity
|
|
205
|
+
const awsIdentity = new infisical.Identity('aws-identity', {
|
|
206
|
+
name: 'aws-iam-identity',
|
|
207
|
+
authMethod: 'aws-auth',
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
const awsAuth = new infisical.IdentityAwsAuth('aws-auth-config', {
|
|
211
|
+
identityId: awsIdentity.id,
|
|
212
|
+
type: 'iam',
|
|
213
|
+
allowedPrincipalArns: ['arn:aws:iam::123456789012:role/MyRole'],
|
|
214
|
+
allowedAccountIds: ['123456789012'],
|
|
215
|
+
accessTokenTtl: 3600,
|
|
216
|
+
accessTokenMaxTtl: 7200,
|
|
217
|
+
})
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Project Access Control
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
import * as infisical from "pulumi-infisical";
|
|
224
|
+
|
|
225
|
+
// Create custom project role
|
|
226
|
+
const projectRole = new infisical.ProjectRole("api-role", {
|
|
227
|
+
projectId: project.id,
|
|
228
|
+
name: "API Access Role",
|
|
229
|
+
description: "Role for API service access",
|
|
230
|
+
slug: "api-access",
|
|
231
|
+
permissions: [
|
|
232
|
+
{
|
|
233
|
+
action: "read",
|
|
234
|
+
subject: "secrets",
|
|
235
|
+
conditions: {
|
|
236
|
+
environment: "dev",
|
|
237
|
+
secretPath: "/api/*",
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
action: "create",
|
|
242
|
+
subject: "secrets",
|
|
243
|
+
conditions: {
|
|
244
|
+
environment: "dev",
|
|
245
|
+
secretPath: "/api/*",
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
],
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// Assign identity to project
|
|
252
|
+
const projectIdentity = new infisical.ProjectIdentity("app-project-identity", {
|
|
253
|
+
identityId: appIdentity.id,
|
|
254
|
+
projectId: project.id,
|
|
255
|
+
roles: [
|
|
256
|
+
{
|
|
257
|
+
roleSlug: projectRole.slug,
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
// Create user in project (if managing users)
|
|
263
|
+
const projectUser = new infisical.ProjectUser("developer", {
|
|
264
|
+
projectId: project.id,
|
|
265
|
+
username: "developer@company.com",
|
|
266
|
+
roles: [
|
|
267
|
+
{
|
|
268
|
+
roleSlug: "admin",
|
|
269
|
+
},
|
|
270
|
+
],
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Cloud Provider Integrations
|
|
275
|
+
|
|
276
|
+
```typescript
|
|
277
|
+
import * as infisical from 'pulumi-infisical'
|
|
278
|
+
|
|
279
|
+
// AWS Parameter Store integration
|
|
280
|
+
const awsParameterStoreIntegration = new infisical.IntegrationAwsParameterStore(
|
|
281
|
+
'aws-params',
|
|
282
|
+
{
|
|
283
|
+
integrationAuthId: 'your-aws-auth-id',
|
|
284
|
+
projectId: project.id,
|
|
285
|
+
environmentSlug: 'prod',
|
|
286
|
+
secretPath: '/',
|
|
287
|
+
region: 'us-east-1',
|
|
288
|
+
parameters: [
|
|
289
|
+
{
|
|
290
|
+
name: '/myapp/database/password',
|
|
291
|
+
secretName: 'DB_PASSWORD',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: '/myapp/api/key',
|
|
295
|
+
secretName: 'API_KEY',
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
// AWS Secrets Manager integration
|
|
302
|
+
const awsSecretsManagerIntegration = new infisical.IntegrationAwsSecretsManager(
|
|
303
|
+
'aws-secrets',
|
|
304
|
+
{
|
|
305
|
+
integrationAuthId: 'your-aws-auth-id',
|
|
306
|
+
projectId: project.id,
|
|
307
|
+
environmentSlug: 'prod',
|
|
308
|
+
secretPath: '/',
|
|
309
|
+
region: 'us-east-1',
|
|
310
|
+
secrets: [
|
|
311
|
+
{
|
|
312
|
+
name: 'myapp-database-credentials',
|
|
313
|
+
secretName: 'DB_PASSWORD',
|
|
314
|
+
},
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
// GCP Secret Manager integration
|
|
320
|
+
const gcpSecretManagerIntegration = new infisical.IntegrationGcpSecretManager(
|
|
321
|
+
'gcp-secrets',
|
|
322
|
+
{
|
|
323
|
+
integrationAuthId: 'your-gcp-auth-id',
|
|
324
|
+
projectId: project.id,
|
|
325
|
+
environmentSlug: 'prod',
|
|
326
|
+
secretPath: '/',
|
|
327
|
+
secrets: [
|
|
328
|
+
{
|
|
329
|
+
secretName: 'API_KEY',
|
|
330
|
+
gcpSecretName: 'api-key',
|
|
331
|
+
gcpSecretId: 'projects/my-project/secrets/api-key',
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
},
|
|
335
|
+
)
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### Secret Synchronization
|
|
339
|
+
|
|
340
|
+
```typescript
|
|
341
|
+
import * as infisical from 'pulumi-infisical'
|
|
342
|
+
|
|
343
|
+
// Sync secrets to AWS Parameter Store
|
|
344
|
+
const parameterStoreSync = new infisical.SecretSyncAwsParameterStore(
|
|
345
|
+
'param-sync',
|
|
346
|
+
{
|
|
347
|
+
projectId: project.id,
|
|
348
|
+
environmentSlug: 'prod',
|
|
349
|
+
secretPath: '/api',
|
|
350
|
+
region: 'us-east-1',
|
|
351
|
+
parameterName: '/myapp/api/config',
|
|
352
|
+
integrationId: 'your-integration-id',
|
|
353
|
+
},
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
// Sync secrets to Azure Key Vault
|
|
357
|
+
const azureKeyVaultSync = new infisical.SecretSyncAzureKeyVault('azure-sync', {
|
|
358
|
+
projectId: project.id,
|
|
359
|
+
environmentSlug: 'prod',
|
|
360
|
+
secretPath: '/database',
|
|
361
|
+
keyVaultName: 'my-key-vault',
|
|
362
|
+
secretName: 'database-password',
|
|
363
|
+
integrationId: 'your-azure-integration-id',
|
|
364
|
+
})
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Access Approval Policies
|
|
368
|
+
|
|
369
|
+
```typescript
|
|
370
|
+
import * as infisical from 'pulumi-infisical'
|
|
371
|
+
|
|
372
|
+
// Create access approval policy
|
|
373
|
+
const approvalPolicy = new infisical.AccessApprovalPolicy(
|
|
374
|
+
'prod-access-policy',
|
|
375
|
+
{
|
|
376
|
+
projectId: project.id,
|
|
377
|
+
name: 'Production Access Policy',
|
|
378
|
+
environmentSlug: 'prod',
|
|
379
|
+
secretPath: '/*',
|
|
380
|
+
approvals: 2,
|
|
381
|
+
approvers: ['admin@company.com', 'security@company.com'],
|
|
382
|
+
enforcementLevel: 'hard',
|
|
383
|
+
},
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
// Create secret approval policy
|
|
387
|
+
const secretApprovalPolicy = new infisical.SecretApprovalPolicy(
|
|
388
|
+
'secret-approval',
|
|
389
|
+
{
|
|
390
|
+
projectId: project.id,
|
|
391
|
+
name: 'Secret Change Approval',
|
|
392
|
+
environmentSlug: 'prod',
|
|
393
|
+
secretPath: '/critical/*',
|
|
394
|
+
approvals: 1,
|
|
395
|
+
approvers: ['security@company.com'],
|
|
396
|
+
enforcementLevel: 'soft',
|
|
397
|
+
},
|
|
398
|
+
)
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
## Resources
|
|
402
|
+
|
|
403
|
+
### Project Management
|
|
404
|
+
|
|
405
|
+
- **Project**: Main project container
|
|
406
|
+
- **ProjectEnvironment**: Environment within a project (dev, staging, prod)
|
|
407
|
+
- **ProjectRole**: Custom roles with fine-grained permissions
|
|
408
|
+
- **ProjectUser**: User assignments to projects
|
|
409
|
+
- **ProjectIdentity**: Identity assignments to projects
|
|
410
|
+
|
|
411
|
+
### Secrets Management
|
|
412
|
+
|
|
413
|
+
- **Secret**: Individual secrets with values
|
|
414
|
+
- **SecretFolder**: Organizational folders for secrets
|
|
415
|
+
- **SecretTag**: Tags for categorizing secrets
|
|
416
|
+
- **SecretImport**: Import secrets between environments
|
|
417
|
+
|
|
418
|
+
### Identity & Authentication
|
|
419
|
+
|
|
420
|
+
- **Identity**: Base identity for authentication
|
|
421
|
+
- **IdentityUniversalAuth**: Universal authentication configuration
|
|
422
|
+
- **IdentityUniversalAuthClientSecret**: Client secrets for Universal Auth
|
|
423
|
+
- **IdentityAwsAuth**: AWS IAM authentication
|
|
424
|
+
- **IdentityGcpAuth**: Google Cloud authentication
|
|
425
|
+
- **IdentityAzureAuth**: Azure authentication
|
|
426
|
+
- **IdentityKubernetesAuth**: Kubernetes authentication
|
|
427
|
+
- **IdentityOidcAuth**: OIDC authentication
|
|
428
|
+
|
|
429
|
+
### Integrations
|
|
430
|
+
|
|
431
|
+
- **IntegrationAwsParameterStore**: AWS Systems Manager Parameter Store
|
|
432
|
+
- **IntegrationAwsSecretsManager**: AWS Secrets Manager
|
|
433
|
+
- **IntegrationGcpSecretManager**: Google Cloud Secret Manager
|
|
434
|
+
- **IntegrationCircleci**: CircleCI integration
|
|
435
|
+
- **IntegrationDatabricks**: Databricks integration
|
|
436
|
+
|
|
437
|
+
### Secret Synchronization
|
|
438
|
+
|
|
439
|
+
- **SecretSyncAwsParameterStore**: Sync to AWS Parameter Store
|
|
440
|
+
- **SecretSyncAwsSecretsManager**: Sync to AWS Secrets Manager
|
|
441
|
+
- **SecretSyncAzureKeyVault**: Sync to Azure Key Vault
|
|
442
|
+
- **SecretSyncGcpSecretManager**: Sync to GCP Secret Manager
|
|
443
|
+
|
|
444
|
+
### Access Control
|
|
445
|
+
|
|
446
|
+
- **AccessApprovalPolicy**: Approval requirements for access
|
|
447
|
+
- **SecretApprovalPolicy**: Approval requirements for secret changes
|
|
448
|
+
|
|
449
|
+
## API Reference
|
|
450
|
+
|
|
451
|
+
For detailed API documentation, see the generated documentation in your IDE or visit the [Pulumi Registry](https://www.pulumi.com/registry/).
|
|
452
|
+
|
|
453
|
+
## Authentication Setup
|
|
454
|
+
|
|
455
|
+
### Getting Your API Credentials
|
|
456
|
+
|
|
457
|
+
1. **Log in to Infisical**: Go to your Infisical instance
|
|
458
|
+
2. **Navigate to Settings**: Go to Organization Settings → Access Tokens
|
|
459
|
+
3. **Create Service Token**: Generate a new service token for machine access
|
|
460
|
+
4. **Universal Auth Setup**: For Universal Auth, create an identity and client credentials
|
|
461
|
+
5. **Cloud Provider Auth**: Configure AWS IAM, GCP, or Azure authentication as needed
|
|
462
|
+
|
|
463
|
+
### Testing Your Setup
|
|
464
|
+
|
|
465
|
+
```typescript
|
|
466
|
+
import * as infisical from 'pulumi-infisical'
|
|
467
|
+
|
|
468
|
+
// Test with a simple data source query
|
|
469
|
+
const projects = infisical.getProjects({})
|
|
470
|
+
const groups = infisical.getGroups({})
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Examples
|
|
474
|
+
|
|
475
|
+
You can find more examples in the [examples directory](./examples) or check out these common use cases:
|
|
476
|
+
|
|
477
|
+
- [Basic Secrets Management](./examples/basic-secrets)
|
|
478
|
+
- [Identity and Authentication Setup](./examples/identity-auth)
|
|
479
|
+
- [Cloud Provider Integrations](./examples/cloud-integrations)
|
|
480
|
+
- [Project Access Control](./examples/access-control)
|
|
481
|
+
- [Secret Synchronization](./examples/secret-sync)
|
|
482
|
+
|
|
483
|
+
## Support
|
|
484
|
+
|
|
485
|
+
This provider is a derived work of the [Terraform Provider](https://github.com/infisical/terraform-provider-infisical) distributed under [MPL 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
|
|
486
|
+
|
|
487
|
+
If you encounter a bug or missing feature, please consult the source [`terraform-provider-infisical` repo](https://github.com/infisical/terraform-provider-infisical/issues).
|
|
488
|
+
|
|
489
|
+
For Pulumi-specific issues, please open an issue in the [pulumi-any-terraform repository](https://github.com/hckhanh/pulumi-any-terraform).
|
|
490
|
+
|
|
491
|
+
## License
|
|
492
|
+
|
|
493
|
+
This package is distributed under the MIT License. The underlying Terraform provider is distributed under MPL 2.0.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __esm = (fn, res) => function() {
|
|
9
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
|
+
};
|
|
11
|
+
var __commonJS = (cb, mod) => function() {
|
|
12
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
13
|
+
};
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all) __defProp(target, name, {
|
|
16
|
+
get: all[name],
|
|
17
|
+
enumerable: true
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
22
|
+
key = keys[i];
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
24
|
+
get: ((k) => from[k]).bind(null, key),
|
|
25
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return to;
|
|
29
|
+
};
|
|
30
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
32
|
+
value: mod,
|
|
33
|
+
enumerable: true
|
|
34
|
+
}) : target, mod));
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { __commonJS, __esm, __export, __reExport, __toESM };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { AccessApprovalPolicyApprover } from "./types/input.mjs";
|
|
2
|
+
import { AccessApprovalPolicyApprover as AccessApprovalPolicyApprover$1 } from "./types/output.mjs";
|
|
3
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
4
|
+
|
|
5
|
+
//#region accessApprovalPolicy.d.ts
|
|
6
|
+
declare class AccessApprovalPolicy extends pulumi.CustomResource {
|
|
7
|
+
/**
|
|
8
|
+
* Get an existing AccessApprovalPolicy resource's state with the given name, ID, and optional extra
|
|
9
|
+
* properties used to qualify the lookup.
|
|
10
|
+
*
|
|
11
|
+
* @param name The _unique_ name of the resulting resource.
|
|
12
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
13
|
+
* @param state Any extra arguments used during the lookup.
|
|
14
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
15
|
+
*/
|
|
16
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccessApprovalPolicyState, opts?: pulumi.CustomResourceOptions): AccessApprovalPolicy;
|
|
17
|
+
/** @internal */
|
|
18
|
+
static readonly __pulumiType: string;
|
|
19
|
+
/**
|
|
20
|
+
* Returns true if the given object is an instance of AccessApprovalPolicy. This is designed to work even
|
|
21
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
22
|
+
*/
|
|
23
|
+
static isInstance(obj: any): obj is AccessApprovalPolicy;
|
|
24
|
+
/**
|
|
25
|
+
* The required approvers
|
|
26
|
+
*/
|
|
27
|
+
readonly approvers!: pulumi.Output<AccessApprovalPolicyApprover$1[]>;
|
|
28
|
+
/**
|
|
29
|
+
* The enforcement level of the policy. This can either be hard or soft
|
|
30
|
+
*/
|
|
31
|
+
readonly enforcementLevel!: pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* The environment to apply the access approval policy to
|
|
34
|
+
*/
|
|
35
|
+
readonly environmentSlug!: pulumi.Output<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The name of the access approval policy
|
|
38
|
+
*/
|
|
39
|
+
readonly name!: pulumi.Output<string>;
|
|
40
|
+
/**
|
|
41
|
+
* The ID of the project to add the access approval policy
|
|
42
|
+
*/
|
|
43
|
+
readonly projectId!: pulumi.Output<string>;
|
|
44
|
+
/**
|
|
45
|
+
* The number of required approvers
|
|
46
|
+
*/
|
|
47
|
+
readonly requiredApprovals!: pulumi.Output<number>;
|
|
48
|
+
/**
|
|
49
|
+
* The secret path to apply the access approval policy to
|
|
50
|
+
*/
|
|
51
|
+
readonly secretPath!: pulumi.Output<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Create a AccessApprovalPolicy resource with the given unique name, arguments, and options.
|
|
54
|
+
*
|
|
55
|
+
* @param name The _unique_ name of the resource.
|
|
56
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
57
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
58
|
+
*/
|
|
59
|
+
constructor(name: string, args: AccessApprovalPolicyArgs, opts?: pulumi.CustomResourceOptions);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Input properties used for looking up and filtering AccessApprovalPolicy resources.
|
|
63
|
+
*/
|
|
64
|
+
interface AccessApprovalPolicyState {
|
|
65
|
+
/**
|
|
66
|
+
* The required approvers
|
|
67
|
+
*/
|
|
68
|
+
approvers?: pulumi.Input<pulumi.Input<AccessApprovalPolicyApprover>[]>;
|
|
69
|
+
/**
|
|
70
|
+
* The enforcement level of the policy. This can either be hard or soft
|
|
71
|
+
*/
|
|
72
|
+
enforcementLevel?: pulumi.Input<string>;
|
|
73
|
+
/**
|
|
74
|
+
* The environment to apply the access approval policy to
|
|
75
|
+
*/
|
|
76
|
+
environmentSlug?: pulumi.Input<string>;
|
|
77
|
+
/**
|
|
78
|
+
* The name of the access approval policy
|
|
79
|
+
*/
|
|
80
|
+
name?: pulumi.Input<string>;
|
|
81
|
+
/**
|
|
82
|
+
* The ID of the project to add the access approval policy
|
|
83
|
+
*/
|
|
84
|
+
projectId?: pulumi.Input<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The number of required approvers
|
|
87
|
+
*/
|
|
88
|
+
requiredApprovals?: pulumi.Input<number>;
|
|
89
|
+
/**
|
|
90
|
+
* The secret path to apply the access approval policy to
|
|
91
|
+
*/
|
|
92
|
+
secretPath?: pulumi.Input<string>;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The set of arguments for constructing a AccessApprovalPolicy resource.
|
|
96
|
+
*/
|
|
97
|
+
interface AccessApprovalPolicyArgs {
|
|
98
|
+
/**
|
|
99
|
+
* The required approvers
|
|
100
|
+
*/
|
|
101
|
+
approvers: pulumi.Input<pulumi.Input<AccessApprovalPolicyApprover>[]>;
|
|
102
|
+
/**
|
|
103
|
+
* The enforcement level of the policy. This can either be hard or soft
|
|
104
|
+
*/
|
|
105
|
+
enforcementLevel?: pulumi.Input<string>;
|
|
106
|
+
/**
|
|
107
|
+
* The environment to apply the access approval policy to
|
|
108
|
+
*/
|
|
109
|
+
environmentSlug: pulumi.Input<string>;
|
|
110
|
+
/**
|
|
111
|
+
* The name of the access approval policy
|
|
112
|
+
*/
|
|
113
|
+
name?: pulumi.Input<string>;
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the project to add the access approval policy
|
|
116
|
+
*/
|
|
117
|
+
projectId: pulumi.Input<string>;
|
|
118
|
+
/**
|
|
119
|
+
* The number of required approvers
|
|
120
|
+
*/
|
|
121
|
+
requiredApprovals: pulumi.Input<number>;
|
|
122
|
+
/**
|
|
123
|
+
* The secret path to apply the access approval policy to
|
|
124
|
+
*/
|
|
125
|
+
secretPath: pulumi.Input<string>;
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { AccessApprovalPolicy, AccessApprovalPolicyArgs, AccessApprovalPolicyState };
|