|
1 | 1 | --- |
2 | | -title: Strata Cloud Manager (Palo Alto SCM) |
3 | | -meta_desc: Provides an overview of the Strata Cloud Manager Provider for Pulumi. |
4 | | -layout: overview |
| 2 | +title: Scm Provider |
| 3 | +meta_desc: Provides an overview on how to configure the Pulumi Scm provider. |
| 4 | +layout: package |
5 | 5 | --- |
| 6 | +## Installation |
6 | 7 |
|
7 | | -The Strata Cloud Manager Resource Provider lets you manage [Strata Cloud Manager](https://docs.paloaltonetworks.com/strata-cloud-manager) resources. This is a bridged provider from the terraform SCM provider, located at [github.com/PaloAltoNetworks/terraform-provider-scm](https://github.com/PaloAltoNetworks/terraform-provider-scm). |
| 8 | +The scm provider is available as a package in all Pulumi languages: |
8 | 9 |
|
9 | | -## Example |
| 10 | +* JavaScript/TypeScript: [`@pulumi/scm`](https://www.npmjs.com/package/@pulumi/scm) |
| 11 | +* Python: [`pulumi-scm`](https://pypi.org/project/pulumi-scm/) |
| 12 | +* Go: [`github.com/pulumi/pulumi-scm/sdk/go/scm`](https://github.com/pulumi/pulumi-scm) |
| 13 | +* .NET: [`Pulumi.Scm`](https://www.nuget.org/packages/Pulumi.Scm) |
| 14 | +* Java: [`com.pulumi/scm`](https://central.sonatype.com/artifact/com.pulumi/scm) |
| 15 | +## Overview |
10 | 16 |
|
11 | | -{{< chooser language "typescript,python,go,csharp" >}} |
12 | | -{{% choosable language typescript %}} |
| 17 | +The `scm` provider provides resources and functions to manage and query Strata Cloud Manager. |
| 18 | + |
| 19 | +This provider covers the following aspects of Strata Cloud Manager: |
| 20 | +* Unified Networking Security |
| 21 | +## Example Usage |
13 | 22 |
|
14 | | -```typescript |
15 | | -import * as pulumi from "@pulumi/pulumi"; |
16 | | -import * as scm from "@pulumi/scm"; |
| 23 | +{{< chooser language "typescript,python,go,csharp,java,yaml" >}} |
| 24 | +{{% choosable language typescript %}} |
| 25 | +```yaml |
| 26 | +# Pulumi.yaml provider configuration file |
| 27 | +name: configuration-example |
| 28 | +runtime: nodejs |
| 29 | +config: |
| 30 | + scm:clientId: |
| 31 | + value: your-id@12345 |
| 32 | + scm:clientSecret: |
| 33 | + value: secret |
| 34 | + scm:host: |
| 35 | + value: api.strata.paloaltonetworks.com |
| 36 | + scm:scope: |
| 37 | + value: tsg_id:12345 |
17 | 38 |
|
18 | | -const example = new scm.Service("example", {}); |
19 | 39 | ``` |
20 | 40 |
|
21 | 41 | {{% /choosable %}} |
22 | 42 | {{% choosable language python %}} |
| 43 | +```yaml |
| 44 | +# Pulumi.yaml provider configuration file |
| 45 | +name: configuration-example |
| 46 | +runtime: python |
| 47 | +config: |
| 48 | + scm:clientId: |
| 49 | + value: your-id@12345 |
| 50 | + scm:clientSecret: |
| 51 | + value: secret |
| 52 | + scm:host: |
| 53 | + value: api.strata.paloaltonetworks.com |
| 54 | + scm:scope: |
| 55 | + value: tsg_id:12345 |
23 | 56 |
|
24 | | -```python |
25 | | -import pulumi |
26 | | -import pulumi_scm as scm |
| 57 | +``` |
| 58 | + |
| 59 | +{{% /choosable %}} |
| 60 | +{{% choosable language csharp %}} |
| 61 | +```yaml |
| 62 | +# Pulumi.yaml provider configuration file |
| 63 | +name: configuration-example |
| 64 | +runtime: dotnet |
| 65 | +config: |
| 66 | + scm:clientId: |
| 67 | + value: your-id@12345 |
| 68 | + scm:clientSecret: |
| 69 | + value: secret |
| 70 | + scm:host: |
| 71 | + value: api.strata.paloaltonetworks.com |
| 72 | + scm:scope: |
| 73 | + value: tsg_id:12345 |
27 | 74 |
|
28 | | -example = scm.Service("example") |
29 | 75 | ``` |
30 | 76 |
|
31 | 77 | {{% /choosable %}} |
32 | 78 | {{% choosable language go %}} |
| 79 | +```yaml |
| 80 | +# Pulumi.yaml provider configuration file |
| 81 | +name: configuration-example |
| 82 | +runtime: go |
| 83 | +config: |
| 84 | + scm:clientId: |
| 85 | + value: your-id@12345 |
| 86 | + scm:clientSecret: |
| 87 | + value: secret |
| 88 | + scm:host: |
| 89 | + value: api.strata.paloaltonetworks.com |
| 90 | + scm:scope: |
| 91 | + value: tsg_id:12345 |
33 | 92 |
|
34 | | -```go |
35 | | -package main |
36 | | - |
37 | | -import ( |
38 | | - "github.com/pulumi/pulumi-scm/sdk/go/scm" |
39 | | - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" |
| 93 | +``` |
40 | 94 |
|
41 | | -) |
| 95 | +{{% /choosable %}} |
| 96 | +{{% choosable language yaml %}} |
| 97 | +```yaml |
| 98 | +# Pulumi.yaml provider configuration file |
| 99 | +name: configuration-example |
| 100 | +runtime: yaml |
| 101 | +config: |
| 102 | + scm:clientId: |
| 103 | + value: your-id@12345 |
| 104 | + scm:clientSecret: |
| 105 | + value: secret |
| 106 | + scm:host: |
| 107 | + value: api.strata.paloaltonetworks.com |
| 108 | + scm:scope: |
| 109 | + value: tsg_id:12345 |
42 | 110 |
|
43 | | -func main() { |
44 | | - pulumi.Run(func(ctx *pulumi.Context) error { |
45 | | - _, err := scm.NewService(ctx, "example", nil) |
46 | | - if err != nil { |
47 | | - return err |
48 | | - } |
49 | | - return nil |
50 | | - }) |
51 | | -} |
52 | 111 | ``` |
53 | 112 |
|
54 | 113 | {{% /choosable %}} |
55 | | -{{% choosable language csharp %}} |
56 | | - |
57 | | -```csharp |
58 | | -using System.Collections.Generic; |
59 | | -using Pulumi; |
60 | | -using Scm = Pulumi.Scm; |
| 114 | +{{% choosable language java %}} |
| 115 | +```yaml |
| 116 | +# Pulumi.yaml provider configuration file |
| 117 | +name: configuration-example |
| 118 | +runtime: java |
| 119 | +config: |
| 120 | + scm:clientId: |
| 121 | + value: your-id@12345 |
| 122 | + scm:clientSecret: |
| 123 | + value: secret |
| 124 | + scm:host: |
| 125 | + value: api.strata.paloaltonetworks.com |
| 126 | + scm:scope: |
| 127 | + value: tsg_id:12345 |
61 | 128 |
|
62 | | -return await Deployment.RunAsync(() => |
63 | | -{ |
64 | | - var example = new Scm.Service("example"); |
65 | | -}); |
66 | 129 | ``` |
67 | 130 |
|
68 | 131 | {{% /choosable %}} |
69 | | - |
70 | 132 | {{< /chooser >}} |
| 133 | +## Provider Parameter Priority |
| 134 | + |
| 135 | +There are multiple ways to specify the provider's parameters. If overlapping values are configured for the provider, then this is the resolution order: |
| 136 | + |
| 137 | +1. Statically configured in the provider configuration |
| 138 | +2. Environment variable (where applicable) |
| 139 | +3. Taken from the JSON config file |
| 140 | +## Configuration Reference |
| 141 | + |
| 142 | +- `authFile` (String) The file path to the JSON file with auth creds for SCM. |
| 143 | +- `authUrl` (String) The URL to send auth credentials to which will return a JWT. Default: `https://auth.apps.paloaltonetworks.com/auth/v1/oauth2/access_token`. Environment variable: `SCM_AUTH_URL`. JSON config file variable: `authUrl`. |
| 144 | +- `clientId` (String) The client ID for the connection. Environment variable: `SCM_CLIENT_ID`. JSON config file variable: `clientId`. |
| 145 | +- `clientSecret` (String, Sensitive) The client secret for the connection. Environment variable: `SCM_CLIENT_SECRET`. JSON config file variable: `clientSecret`. |
| 146 | +- `headers` (Map of String) Custom HTTP headers to be sent with all API commands. Environment variable: `SCM_HEADERS`. JSON config file variable: `headers`. |
| 147 | +- `host` (String) The hostname of Strata Cloud Manager API. Default: `api.sase.paloaltonetworks.com`. Environment variable: `SCM_HOST`. JSON config file variable: `host`. |
| 148 | +- `logging` (String) The logging level of the provider and the underlying communication. Default: `quiet`. Environment variable: `SCM_LOGGING`. JSON config file variable: `logging`. |
| 149 | +- `port` (Number) The port number to use for API commands, if non-standard for the given protocol. Environment variable: `SCM_PORT`. JSON config file variable: `port`. |
| 150 | +- `protocol` (String) The protocol to use for SCM. This should be 'http' or 'https'. Default: `https`. Environment variable: `SCM_PROTOCOL`. JSON config file variable: `protocol`. |
| 151 | +- `scope` (String) The client scope. Environment variable: `SCM_SCOPE`. JSON config file variable: `scope`. |
0 commit comments