@three14/pulumi-argocd 1.1.0 → 1.1.1

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.
@@ -0,0 +1,228 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * Manages [repository credentials](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#credentials) within ArgoCD.
4
+ *
5
+ * **Note**: due to restrictions in the ArgoCD API the provider is unable to track drift in this resource to fields other than `username`. I.e. the provider is unable to detect changes to repository credentials that are made outside of Pulumi (e.g. manual updates to the underlying Kubernetes Secrets).
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as argocd from "@three14/pulumi-argocd";
12
+ *
13
+ * const _private = new argocd.RepositoryCredentials("private", {
14
+ * url: "git@private-git-repository.local",
15
+ * username: "git",
16
+ * sshPrivateKey: `-----BEGIN OPENSSH PRIVATE KEY-----
17
+ * foo
18
+ * bar
19
+ * -----END OPENSSH PRIVATE KEY-----`,
20
+ * });
21
+ * ```
22
+ *
23
+ * ## Import
24
+ *
25
+ * The `pulumi import` command can be used, for example:
26
+ *
27
+ * Repository credentials can be imported using the repository URL.
28
+ *
29
+ * Note: as the ArgoCD API does not return any sensitive information, a
30
+ * subsequent `pulumi up` should be executed to make the `password`,
31
+ * `sshPrivateKey` and `tlsClientCertKey` attributes converge to their
32
+ * expected values defined within the plan.
33
+ *
34
+ * ```sh
35
+ * $ pulumi import argocd:index/repositoryCredentials:RepositoryCredentials myrepocreds git@private-git-repository.local:somerepo.git
36
+ * ```
37
+ */
38
+ export declare class RepositoryCredentials extends pulumi.CustomResource {
39
+ /**
40
+ * Get an existing RepositoryCredentials resource's state with the given name, ID, and optional extra
41
+ * properties used to qualify the lookup.
42
+ *
43
+ * @param name The _unique_ name of the resulting resource.
44
+ * @param id The _unique_ provider ID of the resource to lookup.
45
+ * @param state Any extra arguments used during the lookup.
46
+ * @param opts Optional settings to control the behavior of the CustomResource.
47
+ */
48
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RepositoryCredentialsState, opts?: pulumi.CustomResourceOptions): RepositoryCredentials;
49
+ /**
50
+ * Returns true if the given object is an instance of RepositoryCredentials. This is designed to work even
51
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
52
+ */
53
+ static isInstance(obj: any): obj is RepositoryCredentials;
54
+ /**
55
+ * Whether `helm-oci` support should be enabled for this repo. Can only be set to `true` when `type` is `helm`.
56
+ */
57
+ readonly enableOci: pulumi.Output<boolean>;
58
+ /**
59
+ * GitHub API URL for GitHub app authentication
60
+ */
61
+ readonly githubappEnterpriseBaseUrl: pulumi.Output<string | undefined>;
62
+ /**
63
+ * GitHub App ID of the app used to access the repo for GitHub app authentication
64
+ */
65
+ readonly githubappId: pulumi.Output<string | undefined>;
66
+ /**
67
+ * ID of the installed GitHub App for GitHub app authentication
68
+ */
69
+ readonly githubappInstallationId: pulumi.Output<string | undefined>;
70
+ /**
71
+ * Private key data (PEM) for authentication via GitHub app
72
+ */
73
+ readonly githubappPrivateKey: pulumi.Output<string | undefined>;
74
+ /**
75
+ * Password for authenticating at the repo server
76
+ */
77
+ readonly password: pulumi.Output<string | undefined>;
78
+ /**
79
+ * Private key data for authenticating at the repo server using SSH (only Git repos)
80
+ */
81
+ readonly sshPrivateKey: pulumi.Output<string | undefined>;
82
+ /**
83
+ * TLS client cert data for authenticating at the repo server
84
+ */
85
+ readonly tlsClientCertData: pulumi.Output<string | undefined>;
86
+ /**
87
+ * TLS client cert key for authenticating at the repo server
88
+ */
89
+ readonly tlsClientCertKey: pulumi.Output<string | undefined>;
90
+ /**
91
+ * Type of the repository credentials. Can be either `git`, `oci` or `helm`. `git` is assumed if empty or absent.
92
+ */
93
+ readonly type: pulumi.Output<string>;
94
+ /**
95
+ * URL that these credentials match to
96
+ */
97
+ readonly url: pulumi.Output<string>;
98
+ /**
99
+ * Whether `Azure-Workload-identity` should be enabled for this repository.
100
+ */
101
+ readonly useAzureWorkloadIdentity: pulumi.Output<boolean>;
102
+ /**
103
+ * Username for authenticating at the repo server
104
+ */
105
+ readonly username: pulumi.Output<string | undefined>;
106
+ /**
107
+ * Create a RepositoryCredentials resource with the given unique name, arguments, and options.
108
+ *
109
+ * @param name The _unique_ name of the resource.
110
+ * @param args The arguments to use to populate this resource's properties.
111
+ * @param opts A bag of options that control this resource's behavior.
112
+ */
113
+ constructor(name: string, args: RepositoryCredentialsArgs, opts?: pulumi.CustomResourceOptions);
114
+ }
115
+ /**
116
+ * Input properties used for looking up and filtering RepositoryCredentials resources.
117
+ */
118
+ export interface RepositoryCredentialsState {
119
+ /**
120
+ * Whether `helm-oci` support should be enabled for this repo. Can only be set to `true` when `type` is `helm`.
121
+ */
122
+ enableOci?: pulumi.Input<boolean>;
123
+ /**
124
+ * GitHub API URL for GitHub app authentication
125
+ */
126
+ githubappEnterpriseBaseUrl?: pulumi.Input<string>;
127
+ /**
128
+ * GitHub App ID of the app used to access the repo for GitHub app authentication
129
+ */
130
+ githubappId?: pulumi.Input<string>;
131
+ /**
132
+ * ID of the installed GitHub App for GitHub app authentication
133
+ */
134
+ githubappInstallationId?: pulumi.Input<string>;
135
+ /**
136
+ * Private key data (PEM) for authentication via GitHub app
137
+ */
138
+ githubappPrivateKey?: pulumi.Input<string>;
139
+ /**
140
+ * Password for authenticating at the repo server
141
+ */
142
+ password?: pulumi.Input<string>;
143
+ /**
144
+ * Private key data for authenticating at the repo server using SSH (only Git repos)
145
+ */
146
+ sshPrivateKey?: pulumi.Input<string>;
147
+ /**
148
+ * TLS client cert data for authenticating at the repo server
149
+ */
150
+ tlsClientCertData?: pulumi.Input<string>;
151
+ /**
152
+ * TLS client cert key for authenticating at the repo server
153
+ */
154
+ tlsClientCertKey?: pulumi.Input<string>;
155
+ /**
156
+ * Type of the repository credentials. Can be either `git`, `oci` or `helm`. `git` is assumed if empty or absent.
157
+ */
158
+ type?: pulumi.Input<string>;
159
+ /**
160
+ * URL that these credentials match to
161
+ */
162
+ url?: pulumi.Input<string>;
163
+ /**
164
+ * Whether `Azure-Workload-identity` should be enabled for this repository.
165
+ */
166
+ useAzureWorkloadIdentity?: pulumi.Input<boolean>;
167
+ /**
168
+ * Username for authenticating at the repo server
169
+ */
170
+ username?: pulumi.Input<string>;
171
+ }
172
+ /**
173
+ * The set of arguments for constructing a RepositoryCredentials resource.
174
+ */
175
+ export interface RepositoryCredentialsArgs {
176
+ /**
177
+ * Whether `helm-oci` support should be enabled for this repo. Can only be set to `true` when `type` is `helm`.
178
+ */
179
+ enableOci?: pulumi.Input<boolean>;
180
+ /**
181
+ * GitHub API URL for GitHub app authentication
182
+ */
183
+ githubappEnterpriseBaseUrl?: pulumi.Input<string>;
184
+ /**
185
+ * GitHub App ID of the app used to access the repo for GitHub app authentication
186
+ */
187
+ githubappId?: pulumi.Input<string>;
188
+ /**
189
+ * ID of the installed GitHub App for GitHub app authentication
190
+ */
191
+ githubappInstallationId?: pulumi.Input<string>;
192
+ /**
193
+ * Private key data (PEM) for authentication via GitHub app
194
+ */
195
+ githubappPrivateKey?: pulumi.Input<string>;
196
+ /**
197
+ * Password for authenticating at the repo server
198
+ */
199
+ password?: pulumi.Input<string>;
200
+ /**
201
+ * Private key data for authenticating at the repo server using SSH (only Git repos)
202
+ */
203
+ sshPrivateKey?: pulumi.Input<string>;
204
+ /**
205
+ * TLS client cert data for authenticating at the repo server
206
+ */
207
+ tlsClientCertData?: pulumi.Input<string>;
208
+ /**
209
+ * TLS client cert key for authenticating at the repo server
210
+ */
211
+ tlsClientCertKey?: pulumi.Input<string>;
212
+ /**
213
+ * Type of the repository credentials. Can be either `git`, `oci` or `helm`. `git` is assumed if empty or absent.
214
+ */
215
+ type?: pulumi.Input<string>;
216
+ /**
217
+ * URL that these credentials match to
218
+ */
219
+ url: pulumi.Input<string>;
220
+ /**
221
+ * Whether `Azure-Workload-identity` should be enabled for this repository.
222
+ */
223
+ useAzureWorkloadIdentity?: pulumi.Input<boolean>;
224
+ /**
225
+ * Username for authenticating at the repo server
226
+ */
227
+ username?: pulumi.Input<string>;
228
+ }
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by pulumi-language-nodejs. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.RepositoryCredentials = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Manages [repository credentials](https://argo-cd.readthedocs.io/en/stable/user-guide/private-repositories/#credentials) within ArgoCD.
10
+ *
11
+ * **Note**: due to restrictions in the ArgoCD API the provider is unable to track drift in this resource to fields other than `username`. I.e. the provider is unable to detect changes to repository credentials that are made outside of Pulumi (e.g. manual updates to the underlying Kubernetes Secrets).
12
+ *
13
+ * ## Example Usage
14
+ *
15
+ * ```typescript
16
+ * import * as pulumi from "@pulumi/pulumi";
17
+ * import * as argocd from "@three14/pulumi-argocd";
18
+ *
19
+ * const _private = new argocd.RepositoryCredentials("private", {
20
+ * url: "git@private-git-repository.local",
21
+ * username: "git",
22
+ * sshPrivateKey: `-----BEGIN OPENSSH PRIVATE KEY-----
23
+ * foo
24
+ * bar
25
+ * -----END OPENSSH PRIVATE KEY-----`,
26
+ * });
27
+ * ```
28
+ *
29
+ * ## Import
30
+ *
31
+ * The `pulumi import` command can be used, for example:
32
+ *
33
+ * Repository credentials can be imported using the repository URL.
34
+ *
35
+ * Note: as the ArgoCD API does not return any sensitive information, a
36
+ * subsequent `pulumi up` should be executed to make the `password`,
37
+ * `sshPrivateKey` and `tlsClientCertKey` attributes converge to their
38
+ * expected values defined within the plan.
39
+ *
40
+ * ```sh
41
+ * $ pulumi import argocd:index/repositoryCredentials:RepositoryCredentials myrepocreds git@private-git-repository.local:somerepo.git
42
+ * ```
43
+ */
44
+ class RepositoryCredentials extends pulumi.CustomResource {
45
+ /**
46
+ * Get an existing RepositoryCredentials resource's state with the given name, ID, and optional extra
47
+ * properties used to qualify the lookup.
48
+ *
49
+ * @param name The _unique_ name of the resulting resource.
50
+ * @param id The _unique_ provider ID of the resource to lookup.
51
+ * @param state Any extra arguments used during the lookup.
52
+ * @param opts Optional settings to control the behavior of the CustomResource.
53
+ */
54
+ static get(name, id, state, opts) {
55
+ return new RepositoryCredentials(name, state, { ...opts, id: id });
56
+ }
57
+ /**
58
+ * Returns true if the given object is an instance of RepositoryCredentials. This is designed to work even
59
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
60
+ */
61
+ static isInstance(obj) {
62
+ if (obj === undefined || obj === null) {
63
+ return false;
64
+ }
65
+ return obj['__pulumiType'] === RepositoryCredentials.__pulumiType;
66
+ }
67
+ constructor(name, argsOrState, opts) {
68
+ let resourceInputs = {};
69
+ opts = opts || {};
70
+ if (opts.id) {
71
+ const state = argsOrState;
72
+ resourceInputs["enableOci"] = state?.enableOci;
73
+ resourceInputs["githubappEnterpriseBaseUrl"] = state?.githubappEnterpriseBaseUrl;
74
+ resourceInputs["githubappId"] = state?.githubappId;
75
+ resourceInputs["githubappInstallationId"] = state?.githubappInstallationId;
76
+ resourceInputs["githubappPrivateKey"] = state?.githubappPrivateKey;
77
+ resourceInputs["password"] = state?.password;
78
+ resourceInputs["sshPrivateKey"] = state?.sshPrivateKey;
79
+ resourceInputs["tlsClientCertData"] = state?.tlsClientCertData;
80
+ resourceInputs["tlsClientCertKey"] = state?.tlsClientCertKey;
81
+ resourceInputs["type"] = state?.type;
82
+ resourceInputs["url"] = state?.url;
83
+ resourceInputs["useAzureWorkloadIdentity"] = state?.useAzureWorkloadIdentity;
84
+ resourceInputs["username"] = state?.username;
85
+ }
86
+ else {
87
+ const args = argsOrState;
88
+ if (args?.url === undefined && !opts.urn) {
89
+ throw new Error("Missing required property 'url'");
90
+ }
91
+ resourceInputs["enableOci"] = args?.enableOci;
92
+ resourceInputs["githubappEnterpriseBaseUrl"] = args?.githubappEnterpriseBaseUrl;
93
+ resourceInputs["githubappId"] = args?.githubappId;
94
+ resourceInputs["githubappInstallationId"] = args?.githubappInstallationId;
95
+ resourceInputs["githubappPrivateKey"] = args?.githubappPrivateKey ? pulumi.secret(args.githubappPrivateKey) : undefined;
96
+ resourceInputs["password"] = args?.password ? pulumi.secret(args.password) : undefined;
97
+ resourceInputs["sshPrivateKey"] = args?.sshPrivateKey ? pulumi.secret(args.sshPrivateKey) : undefined;
98
+ resourceInputs["tlsClientCertData"] = args?.tlsClientCertData;
99
+ resourceInputs["tlsClientCertKey"] = args?.tlsClientCertKey ? pulumi.secret(args.tlsClientCertKey) : undefined;
100
+ resourceInputs["type"] = args?.type;
101
+ resourceInputs["url"] = args?.url;
102
+ resourceInputs["useAzureWorkloadIdentity"] = args?.useAzureWorkloadIdentity;
103
+ resourceInputs["username"] = args?.username;
104
+ }
105
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
106
+ const secretOpts = { additionalSecretOutputs: ["githubappPrivateKey", "password", "sshPrivateKey", "tlsClientCertKey"] };
107
+ opts = pulumi.mergeOptions(opts, secretOpts);
108
+ super(RepositoryCredentials.__pulumiType, name, resourceInputs, opts);
109
+ }
110
+ }
111
+ exports.RepositoryCredentials = RepositoryCredentials;
112
+ /** @internal */
113
+ RepositoryCredentials.__pulumiType = 'argocd:index/repositoryCredentials:RepositoryCredentials';
114
+ //# sourceMappingURL=repositoryCredentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositoryCredentials.js","sourceRoot":"","sources":["../repositoryCredentials.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;IAC5D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkC,EAAE,IAAmC;QAChI,OAAO,IAAI,qBAAqB,CA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