@pulumi/github 5.1.0 → 5.2.0-alpha.1673638210
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/actionsEnvironmentSecret.d.ts +99 -0
- package/actionsEnvironmentSecret.js +64 -22
- package/actionsEnvironmentSecret.js.map +1 -1
- package/actionsOrganizationPermissions.d.ts +72 -0
- package/actionsOrganizationPermissions.js +58 -22
- package/actionsOrganizationPermissions.js.map +1 -1
- package/actionsOrganizationSecret.d.ts +110 -0
- package/actionsOrganizationSecret.js +72 -22
- package/actionsOrganizationSecret.js.map +1 -1
- package/actionsOrganizationSecretRepositories.d.ts +47 -0
- package/actionsOrganizationSecretRepositories.js +51 -22
- package/actionsOrganizationSecretRepositories.js.map +1 -1
- package/actionsRepositoryPermissions.d.ts +119 -0
- package/actionsRepositoryPermissions.js +91 -0
- package/actionsRepositoryPermissions.js.map +1 -0
- package/actionsRunnerGroup.d.ts +88 -0
- package/actionsRunnerGroup.js +47 -22
- package/actionsRunnerGroup.js.map +1 -1
- package/actionsSecret.d.ts +70 -0
- package/actionsSecret.js +44 -22
- package/actionsSecret.js.map +1 -1
- package/appInstallationRepositories.d.ts +81 -0
- package/appInstallationRepositories.js +78 -0
- package/appInstallationRepositories.js.map +1 -0
- package/appInstallationRepository.d.ts +53 -0
- package/appInstallationRepository.js +57 -22
- package/appInstallationRepository.js.map +1 -1
- package/branch.d.ts +92 -0
- package/branch.js +60 -22
- package/branch.js.map +1 -1
- package/branchDefault.d.ts +53 -0
- package/branchDefault.js +57 -22
- package/branchDefault.js.map +1 -1
- package/branchProtection.d.ts +173 -3
- package/branchProtection.js +83 -22
- package/branchProtection.js.map +1 -1
- package/branchProtectionV3.d.ts +138 -0
- package/branchProtectionV3.js +88 -22
- package/branchProtectionV3.js.map +1 -1
- package/dependabotOrganizationSecret.js +22 -22
- package/dependabotOrganizationSecret.js.map +1 -1
- package/dependabotOrganizationSecretRepositories.js +22 -22
- package/dependabotOrganizationSecretRepositories.js.map +1 -1
- package/dependabotSecret.js +22 -22
- package/dependabotSecret.js.map +1 -1
- package/emuGroupMapping.d.ts +42 -0
- package/emuGroupMapping.js +46 -22
- package/emuGroupMapping.js.map +1 -1
- package/getActionsOrganizationRegistrationToken.d.ts +31 -0
- package/getActionsOrganizationRegistrationToken.js +25 -0
- package/getActionsOrganizationRegistrationToken.js.map +1 -0
- package/getActionsOrganizationSecrets.d.ts +15 -0
- package/getActionsOrganizationSecrets.js +13 -4
- package/getActionsOrganizationSecrets.js.map +1 -1
- package/getActionsPublicKey.d.ts +42 -0
- package/getActionsPublicKey.js +32 -5
- package/getActionsPublicKey.js.map +1 -1
- package/getActionsRegistrationToken.d.ts +67 -0
- package/getActionsRegistrationToken.js +47 -0
- package/getActionsRegistrationToken.js.map +1 -0
- package/getActionsSecrets.d.ts +46 -0
- package/getActionsSecrets.js +30 -5
- package/getActionsSecrets.js.map +1 -1
- package/getBranch.d.ts +51 -0
- package/getBranch.js +32 -5
- package/getBranch.js.map +1 -1
- package/getCollaborators.d.ts +51 -0
- package/getCollaborators.js +32 -5
- package/getCollaborators.js.map +1 -1
- package/getDependabotOrganizationSecrets.d.ts +15 -0
- package/getDependabotOrganizationSecrets.js +13 -4
- package/getDependabotOrganizationSecrets.js.map +1 -1
- package/getDependabotPublicKey.js +2 -5
- package/getDependabotPublicKey.js.map +1 -1
- package/getDependabotSecrets.d.ts +46 -0
- package/getDependabotSecrets.js +30 -5
- package/getDependabotSecrets.js.map +1 -1
- package/getExternalGroups.d.ts +17 -0
- package/getExternalGroups.js +15 -4
- package/getExternalGroups.js.map +1 -1
- package/getGithubApp.d.ts +43 -0
- package/getGithubApp.js +30 -5
- package/getGithubApp.js.map +1 -1
- package/getIpRanges.d.ts +84 -0
- package/getIpRanges.js +13 -4
- package/getIpRanges.js.map +1 -1
- package/getMembership.d.ts +58 -0
- package/getMembership.js +36 -5
- package/getMembership.js.map +1 -1
- package/getOrganization.d.ts +58 -0
- package/getOrganization.js +30 -5
- package/getOrganization.js.map +1 -1
- package/getOrganizationIpAllowList.d.ts +18 -0
- package/getOrganizationIpAllowList.js +15 -4
- package/getOrganizationIpAllowList.js.map +1 -1
- package/getOrganizationTeamSyncGroups.d.ts +15 -0
- package/getOrganizationTeamSyncGroups.js +13 -4
- package/getOrganizationTeamSyncGroups.js.map +1 -1
- package/getOrganizationTeams.d.ts +80 -0
- package/getOrganizationTeams.js +52 -5
- package/getOrganizationTeams.js.map +1 -1
- package/getOrganizationWebhooks.d.ts +18 -0
- package/getOrganizationWebhooks.js +15 -4
- package/getOrganizationWebhooks.js.map +1 -1
- package/getRef.d.ts +48 -0
- package/getRef.js +32 -5
- package/getRef.js.map +1 -1
- package/getRelease.d.ts +90 -0
- package/getRelease.js +8 -5
- package/getRelease.js.map +1 -1
- package/getRepositories.d.ts +70 -0
- package/getRepositories.js +40 -5
- package/getRepositories.js.map +1 -1
- package/getRepository.d.ts +141 -0
- package/getRepository.js +30 -5
- package/getRepository.js.map +1 -1
- package/getRepositoryBranches.d.ts +49 -0
- package/getRepositoryBranches.js +30 -5
- package/getRepositoryBranches.js.map +1 -1
- package/getRepositoryDeployKeys.d.ts +37 -0
- package/getRepositoryDeployKeys.js +30 -5
- package/getRepositoryDeployKeys.js.map +1 -1
- package/getRepositoryFile.d.ts +72 -0
- package/getRepositoryFile.js +36 -5
- package/getRepositoryFile.js.map +1 -1
- package/getRepositoryMilestone.d.ts +62 -0
- package/getRepositoryMilestone.js +34 -5
- package/getRepositoryMilestone.js.map +1 -1
- package/getRepositoryPullRequest.d.ts +90 -0
- package/getRepositoryPullRequest.js +32 -5
- package/getRepositoryPullRequest.js.map +1 -1
- package/getRepositoryPullRequests.d.ts +90 -0
- package/getRepositoryPullRequests.js +38 -5
- package/getRepositoryPullRequests.js.map +1 -1
- package/getRepositoryTeams.d.ts +46 -0
- package/getRepositoryTeams.js +30 -5
- package/getRepositoryTeams.js.map +1 -1
- package/getRepositoryWebhooks.d.ts +36 -0
- package/getRepositoryWebhooks.js +34 -5
- package/getRepositoryWebhooks.js.map +1 -1
- package/getTeam.d.ts +79 -0
- package/getTeam.js +32 -5
- package/getTeam.js.map +1 -1
- package/getTree.d.ts +69 -0
- package/getTree.js +50 -5
- package/getTree.js.map +1 -1
- package/getUser.d.ts +102 -0
- package/getUser.js +38 -5
- package/getUser.js.map +1 -1
- package/getUsers.d.ts +55 -0
- package/getUsers.js +42 -5
- package/getUsers.js.map +1 -1
- package/index.d.ts +64 -44
- package/index.js +33 -3
- package/index.js.map +1 -1
- package/issue.d.ts +117 -6
- package/issue.js +85 -22
- package/issue.js.map +1 -1
- package/issueLabel.d.ts +64 -0
- package/issueLabel.js +44 -22
- package/issueLabel.js.map +1 -1
- package/membership.d.ts +49 -0
- package/membership.js +49 -21
- package/membership.js.map +1 -1
- package/organizationBlock.d.ts +21 -0
- package/organizationBlock.js +31 -19
- package/organizationBlock.js.map +1 -1
- package/organizationProject.d.ts +36 -0
- package/organizationProject.js +32 -20
- package/organizationProject.js.map +1 -1
- package/organizationSecurityManager.d.ts +67 -0
- package/organizationSecurityManager.js +71 -0
- package/organizationSecurityManager.js.map +1 -0
- package/organizationSettings.d.ts +274 -3
- package/organizationSettings.js +68 -22
- package/organizationSettings.js.map +1 -1
- package/organizationWebhook.d.ts +63 -0
- package/organizationWebhook.js +52 -22
- package/organizationWebhook.js.map +1 -1
- package/package.json +2 -2
- package/package.json.dev +2 -2
- package/projectCard.d.ts +87 -0
- package/projectCard.js +73 -22
- package/projectCard.js.map +1 -1
- package/projectColumn.d.ts +31 -0
- package/projectColumn.js +35 -22
- package/projectColumn.js.map +1 -1
- package/provider.js +10 -10
- package/provider.js.map +1 -1
- package/release.d.ts +194 -0
- package/release.js +121 -0
- package/release.js.map +1 -0
- package/repository.d.ts +391 -3
- package/repository.js +70 -22
- package/repository.js.map +1 -1
- package/repositoryAutolinkReference.d.ts +45 -12
- package/repositoryAutolinkReference.js +52 -22
- package/repositoryAutolinkReference.js.map +1 -1
- package/repositoryCollaborator.d.ts +90 -0
- package/repositoryCollaborator.js +64 -22
- package/repositoryCollaborator.js.map +1 -1
- package/repositoryDeployKey.d.ts +71 -0
- package/repositoryDeployKey.js +57 -22
- package/repositoryDeployKey.js.map +1 -1
- package/repositoryEnvironment.d.ts +61 -0
- package/repositoryEnvironment.js +56 -22
- package/repositoryEnvironment.js.map +1 -1
- package/repositoryFile.d.ts +68 -34
- package/repositoryFile.js +59 -22
- package/repositoryFile.js.map +1 -1
- package/repositoryMilestone.d.ts +81 -3
- package/repositoryMilestone.js +49 -22
- package/repositoryMilestone.js.map +1 -1
- package/repositoryProject.d.ts +52 -0
- package/repositoryProject.js +41 -22
- package/repositoryProject.js.map +1 -1
- package/repositoryPullRequest.d.ts +127 -4
- package/repositoryPullRequest.js +40 -22
- package/repositoryPullRequest.js.map +1 -1
- package/repositoryTagProtection.d.ts +41 -0
- package/repositoryTagProtection.js +45 -22
- package/repositoryTagProtection.js.map +1 -1
- package/repositoryWebhook.d.ts +79 -0
- package/repositoryWebhook.js +59 -22
- package/repositoryWebhook.js.map +1 -1
- package/team.d.ts +100 -0
- package/team.js +49 -22
- package/team.js.map +1 -1
- package/teamMembers.d.ts +58 -0
- package/teamMembers.js +62 -22
- package/teamMembers.js.map +1 -1
- package/teamMembership.d.ts +67 -0
- package/teamMembership.js +59 -22
- package/teamMembership.js.map +1 -1
- package/teamRepository.d.ts +59 -3
- package/teamRepository.js +57 -22
- package/teamRepository.js.map +1 -1
- package/teamSettings.d.ts +119 -0
- package/teamSettings.js +99 -0
- package/teamSettings.js.map +1 -0
- package/teamSyncGroupMapping.d.ts +36 -0
- package/teamSyncGroupMapping.js +36 -21
- package/teamSyncGroupMapping.js.map +1 -1
- package/types/input.d.ts +206 -0
- package/types/output.d.ts +498 -0
- package/userGpgKey.d.ts +39 -0
- package/userGpgKey.js +42 -21
- package/userGpgKey.js.map +1 -1
- package/userInvitationAccepter.d.ts +30 -0
- package/userInvitationAccepter.js +38 -17
- package/userInvitationAccepter.js.map +1 -1
- package/userSshKey.d.ts +50 -0
- package/userSshKey.js +48 -22
- package/userSshKey.js.map +1 -1
package/repositoryDeployKey.js
CHANGED
|
@@ -5,7 +5,64 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryDeployKey = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Provides a GitHub repository deploy key resource.
|
|
10
|
+
*
|
|
11
|
+
* A deploy key is an SSH key that is stored on your server and grants
|
|
12
|
+
* access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user
|
|
13
|
+
* account.
|
|
14
|
+
*
|
|
15
|
+
* This resource allows you to add/remove repository deploy keys.
|
|
16
|
+
*
|
|
17
|
+
* Further documentation on GitHub repository deploy keys:
|
|
18
|
+
* - [About deploy keys](https://developer.github.com/guides/managing-deploy-keys/#deploy-keys)
|
|
19
|
+
*
|
|
20
|
+
* ## Example Usage
|
|
21
|
+
*
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
24
|
+
* import * as github from "@pulumi/github";
|
|
25
|
+
*
|
|
26
|
+
* // Add a deploy key
|
|
27
|
+
* const exampleRepositoryDeployKey = new github.RepositoryDeployKey("exampleRepositoryDeployKey", {
|
|
28
|
+
* key: "ssh-rsa AAA...",
|
|
29
|
+
* readOnly: false,
|
|
30
|
+
* repository: "test-repo",
|
|
31
|
+
* title: "Repository test key",
|
|
32
|
+
* });
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ## Import
|
|
36
|
+
*
|
|
37
|
+
* Repository deploy keys can be imported using a colon-separated pair of repository name and GitHub's key id. The latter can be obtained by GitHub's SDKs and API.
|
|
38
|
+
*
|
|
39
|
+
* ```sh
|
|
40
|
+
* $ pulumi import github:index/repositoryDeployKey:RepositoryDeployKey foo test-repo:23824728
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
8
43
|
class RepositoryDeployKey extends pulumi.CustomResource {
|
|
44
|
+
/**
|
|
45
|
+
* Get an existing RepositoryDeployKey resource's state with the given name, ID, and optional extra
|
|
46
|
+
* properties used to qualify the lookup.
|
|
47
|
+
*
|
|
48
|
+
* @param name The _unique_ name of the resulting resource.
|
|
49
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
50
|
+
* @param state Any extra arguments used during the lookup.
|
|
51
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
52
|
+
*/
|
|
53
|
+
static get(name, id, state, opts) {
|
|
54
|
+
return new RepositoryDeployKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given object is an instance of RepositoryDeployKey. This is designed to work even
|
|
58
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
59
|
+
*/
|
|
60
|
+
static isInstance(obj) {
|
|
61
|
+
if (obj === undefined || obj === null) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
return obj['__pulumiType'] === RepositoryDeployKey.__pulumiType;
|
|
65
|
+
}
|
|
9
66
|
constructor(name, argsOrState, opts) {
|
|
10
67
|
let resourceInputs = {};
|
|
11
68
|
opts = opts || {};
|
|
@@ -37,28 +94,6 @@ class RepositoryDeployKey extends pulumi.CustomResource {
|
|
|
37
94
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
38
95
|
super(RepositoryDeployKey.__pulumiType, name, resourceInputs, opts);
|
|
39
96
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Get an existing RepositoryDeployKey resource's state with the given name, ID, and optional extra
|
|
42
|
-
* properties used to qualify the lookup.
|
|
43
|
-
*
|
|
44
|
-
* @param name The _unique_ name of the resulting resource.
|
|
45
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
46
|
-
* @param state Any extra arguments used during the lookup.
|
|
47
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
48
|
-
*/
|
|
49
|
-
static get(name, id, state, opts) {
|
|
50
|
-
return new RepositoryDeployKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Returns true if the given object is an instance of RepositoryDeployKey. This is designed to work even
|
|
54
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
55
|
-
*/
|
|
56
|
-
static isInstance(obj) {
|
|
57
|
-
if (obj === undefined || obj === null) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
return obj['__pulumiType'] === RepositoryDeployKey.__pulumiType;
|
|
61
|
-
}
|
|
62
97
|
}
|
|
63
98
|
exports.RepositoryDeployKey = RepositoryDeployKey;
|
|
64
99
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryDeployKey.js","sourceRoot":"","sources":["../repositoryDeployKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"repositoryDeployKey.js","sourceRoot":"","sources":["../repositoryDeployKey.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAC1D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,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K,CAAC,wCAAwC,CAAC,CAAC;aAC7D;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAClD,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;aACxD;YACD,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;YACpD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC9C;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;;AAnFL,kDAoFC;AAtEG,gBAAgB;AACO,gCAAY,GAAG,sDAAsD,CAAC"}
|
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
import * as inputs from "./types/input";
|
|
3
3
|
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* This resource allows you to create and manage environments for a GitHub repository.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as github from "@pulumi/github";
|
|
12
|
+
*
|
|
13
|
+
* const current = github.getUser({
|
|
14
|
+
* username: "",
|
|
15
|
+
* });
|
|
16
|
+
* const exampleRepository = new github.Repository("exampleRepository", {description: "My awesome codebase"});
|
|
17
|
+
* const exampleRepositoryEnvironment = new github.RepositoryEnvironment("exampleRepositoryEnvironment", {
|
|
18
|
+
* environment: "example",
|
|
19
|
+
* repository: exampleRepository.name,
|
|
20
|
+
* reviewers: [{
|
|
21
|
+
* users: [current.then(current => current.id)],
|
|
22
|
+
* }],
|
|
23
|
+
* deploymentBranchPolicy: {
|
|
24
|
+
* protectedBranches: true,
|
|
25
|
+
* customBranchPolicies: false,
|
|
26
|
+
* },
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ## Import
|
|
31
|
+
*
|
|
32
|
+
* GitHub Repository Environment can be imported using an ID made up of `name` of the repository combined with the `environment` name of the environment, separated by a `:` character, e.g.
|
|
33
|
+
*
|
|
34
|
+
* ```sh
|
|
35
|
+
* $ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
4
38
|
export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
5
39
|
/**
|
|
6
40
|
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
@@ -18,9 +52,18 @@ export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
18
52
|
*/
|
|
19
53
|
static isInstance(obj: any): obj is RepositoryEnvironment;
|
|
20
54
|
readonly deploymentBranchPolicy: pulumi.Output<outputs.RepositoryEnvironmentDeploymentBranchPolicy | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* The name of the environment.
|
|
57
|
+
*/
|
|
21
58
|
readonly environment: pulumi.Output<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The repository of the environment.
|
|
61
|
+
*/
|
|
22
62
|
readonly repository: pulumi.Output<string>;
|
|
23
63
|
readonly reviewers: pulumi.Output<outputs.RepositoryEnvironmentReviewer[] | undefined>;
|
|
64
|
+
/**
|
|
65
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
66
|
+
*/
|
|
24
67
|
readonly waitTimer: pulumi.Output<number | undefined>;
|
|
25
68
|
/**
|
|
26
69
|
* Create a RepositoryEnvironment resource with the given unique name, arguments, and options.
|
|
@@ -36,9 +79,18 @@ export declare class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
36
79
|
*/
|
|
37
80
|
export interface RepositoryEnvironmentState {
|
|
38
81
|
deploymentBranchPolicy?: pulumi.Input<inputs.RepositoryEnvironmentDeploymentBranchPolicy>;
|
|
82
|
+
/**
|
|
83
|
+
* The name of the environment.
|
|
84
|
+
*/
|
|
39
85
|
environment?: pulumi.Input<string>;
|
|
86
|
+
/**
|
|
87
|
+
* The repository of the environment.
|
|
88
|
+
*/
|
|
40
89
|
repository?: pulumi.Input<string>;
|
|
41
90
|
reviewers?: pulumi.Input<pulumi.Input<inputs.RepositoryEnvironmentReviewer>[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
93
|
+
*/
|
|
42
94
|
waitTimer?: pulumi.Input<number>;
|
|
43
95
|
}
|
|
44
96
|
/**
|
|
@@ -46,8 +98,17 @@ export interface RepositoryEnvironmentState {
|
|
|
46
98
|
*/
|
|
47
99
|
export interface RepositoryEnvironmentArgs {
|
|
48
100
|
deploymentBranchPolicy?: pulumi.Input<inputs.RepositoryEnvironmentDeploymentBranchPolicy>;
|
|
101
|
+
/**
|
|
102
|
+
* The name of the environment.
|
|
103
|
+
*/
|
|
49
104
|
environment: pulumi.Input<string>;
|
|
105
|
+
/**
|
|
106
|
+
* The repository of the environment.
|
|
107
|
+
*/
|
|
50
108
|
repository: pulumi.Input<string>;
|
|
51
109
|
reviewers?: pulumi.Input<pulumi.Input<inputs.RepositoryEnvironmentReviewer>[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Amount of time to delay a job after the job is initially triggered.
|
|
112
|
+
*/
|
|
52
113
|
waitTimer?: pulumi.Input<number>;
|
|
53
114
|
}
|
package/repositoryEnvironment.js
CHANGED
|
@@ -5,7 +5,63 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryEnvironment = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* This resource allows you to create and manage environments for a GitHub repository.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as github from "@pulumi/github";
|
|
16
|
+
*
|
|
17
|
+
* const current = github.getUser({
|
|
18
|
+
* username: "",
|
|
19
|
+
* });
|
|
20
|
+
* const exampleRepository = new github.Repository("exampleRepository", {description: "My awesome codebase"});
|
|
21
|
+
* const exampleRepositoryEnvironment = new github.RepositoryEnvironment("exampleRepositoryEnvironment", {
|
|
22
|
+
* environment: "example",
|
|
23
|
+
* repository: exampleRepository.name,
|
|
24
|
+
* reviewers: [{
|
|
25
|
+
* users: [current.then(current => current.id)],
|
|
26
|
+
* }],
|
|
27
|
+
* deploymentBranchPolicy: {
|
|
28
|
+
* protectedBranches: true,
|
|
29
|
+
* customBranchPolicies: false,
|
|
30
|
+
* },
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* ## Import
|
|
35
|
+
*
|
|
36
|
+
* GitHub Repository Environment can be imported using an ID made up of `name` of the repository combined with the `environment` name of the environment, separated by a `:` character, e.g.
|
|
37
|
+
*
|
|
38
|
+
* ```sh
|
|
39
|
+
* $ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
8
42
|
class RepositoryEnvironment extends pulumi.CustomResource {
|
|
43
|
+
/**
|
|
44
|
+
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
45
|
+
* properties used to qualify the lookup.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resulting resource.
|
|
48
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
49
|
+
* @param state Any extra arguments used during the lookup.
|
|
50
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
51
|
+
*/
|
|
52
|
+
static get(name, id, state, opts) {
|
|
53
|
+
return new RepositoryEnvironment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns true if the given object is an instance of RepositoryEnvironment. This is designed to work even
|
|
57
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
58
|
+
*/
|
|
59
|
+
static isInstance(obj) {
|
|
60
|
+
if (obj === undefined || obj === null) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return obj['__pulumiType'] === RepositoryEnvironment.__pulumiType;
|
|
64
|
+
}
|
|
9
65
|
constructor(name, argsOrState, opts) {
|
|
10
66
|
let resourceInputs = {};
|
|
11
67
|
opts = opts || {};
|
|
@@ -34,28 +90,6 @@ class RepositoryEnvironment extends pulumi.CustomResource {
|
|
|
34
90
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
35
91
|
super(RepositoryEnvironment.__pulumiType, name, resourceInputs, opts);
|
|
36
92
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Get an existing RepositoryEnvironment resource's state with the given name, ID, and optional extra
|
|
39
|
-
* properties used to qualify the lookup.
|
|
40
|
-
*
|
|
41
|
-
* @param name The _unique_ name of the resulting resource.
|
|
42
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
43
|
-
* @param state Any extra arguments used during the lookup.
|
|
44
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
45
|
-
*/
|
|
46
|
-
static get(name, id, state, opts) {
|
|
47
|
-
return new RepositoryEnvironment(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Returns true if the given object is an instance of RepositoryEnvironment. 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) {
|
|
54
|
-
if (obj === undefined || obj === null) {
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
return obj['__pulumiType'] === RepositoryEnvironment.__pulumiType;
|
|
58
|
-
}
|
|
59
93
|
}
|
|
60
94
|
exports.RepositoryEnvironment = RepositoryEnvironment;
|
|
61
95
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryEnvironment.js","sourceRoot":"","sources":["../repositoryEnvironment.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC,MAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"repositoryEnvironment.js","sourceRoot":"","sources":["../repositoryEnvironment.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;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,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC5E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC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YACD,cAAc,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1F,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;SACnE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,qBAAqB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;;AA7EL,sDA8EC;AAhEG,gBAAgB;AACO,kCAAY,GAAG,0DAA0D,CAAC"}
|
package/repositoryFile.d.ts
CHANGED
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* This resource allows you to create and manage files within a
|
|
4
|
+
* GitHub repository.
|
|
5
|
+
*
|
|
6
|
+
* ## Example Usage
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
10
|
+
* import * as github from "@pulumi/github";
|
|
11
|
+
*
|
|
12
|
+
* const fooRepository = new github.Repository("fooRepository", {autoInit: true});
|
|
13
|
+
* const fooRepositoryFile = new github.RepositoryFile("fooRepositoryFile", {
|
|
14
|
+
* repository: fooRepository.name,
|
|
15
|
+
* branch: "main",
|
|
16
|
+
* file: ".gitignore",
|
|
17
|
+
* content: "**/*.tfstate",
|
|
18
|
+
* commitMessage: "Managed by Terraform",
|
|
19
|
+
* commitAuthor: "Terraform User",
|
|
20
|
+
* commitEmail: "terraform@example.com",
|
|
21
|
+
* overwriteOnCreate: true,
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* ## Import
|
|
26
|
+
*
|
|
27
|
+
* Repository files can be imported using a combination of the `repo` and `file`, e.g.
|
|
28
|
+
*
|
|
29
|
+
* ```sh
|
|
30
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* To import a file from a branch other than main, append `:` and the branch name, e.g.
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore:dev
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
2
39
|
export declare class RepositoryFile extends pulumi.CustomResource {
|
|
3
40
|
/**
|
|
4
41
|
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
@@ -16,45 +53,44 @@ export declare class RepositoryFile extends pulumi.CustomResource {
|
|
|
16
53
|
*/
|
|
17
54
|
static isInstance(obj: any): obj is RepositoryFile;
|
|
18
55
|
/**
|
|
19
|
-
*
|
|
56
|
+
* Git branch (defaults to `main`).
|
|
57
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
20
58
|
*/
|
|
21
59
|
readonly branch: pulumi.Output<string | undefined>;
|
|
22
60
|
/**
|
|
23
|
-
*
|
|
24
|
-
* information so GitHub can verify commits as the GitHub App.
|
|
61
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
25
62
|
*/
|
|
26
63
|
readonly commitAuthor: pulumi.Output<string | undefined>;
|
|
27
64
|
/**
|
|
28
|
-
*
|
|
29
|
-
* and email information so GitHub can verify commits as the GitHub App.
|
|
65
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
30
66
|
*/
|
|
31
67
|
readonly commitEmail: pulumi.Output<string | undefined>;
|
|
32
68
|
/**
|
|
33
|
-
*
|
|
69
|
+
* Commit message when adding or updating the managed file.
|
|
34
70
|
*/
|
|
35
71
|
readonly commitMessage: pulumi.Output<string>;
|
|
36
72
|
/**
|
|
37
|
-
* The SHA of the commit that modified the file
|
|
73
|
+
* The SHA of the commit that modified the file.
|
|
38
74
|
*/
|
|
39
75
|
readonly commitSha: pulumi.Output<string>;
|
|
40
76
|
/**
|
|
41
|
-
* The file
|
|
77
|
+
* The file content.
|
|
42
78
|
*/
|
|
43
79
|
readonly content: pulumi.Output<string>;
|
|
44
80
|
/**
|
|
45
|
-
* The file
|
|
81
|
+
* The path of the file to manage.
|
|
46
82
|
*/
|
|
47
83
|
readonly file: pulumi.Output<string>;
|
|
48
84
|
/**
|
|
49
|
-
* Enable overwriting existing files
|
|
85
|
+
* Enable overwriting existing files
|
|
50
86
|
*/
|
|
51
87
|
readonly overwriteOnCreate: pulumi.Output<boolean | undefined>;
|
|
52
88
|
/**
|
|
53
|
-
* The repository
|
|
89
|
+
* The repository to create the file in.
|
|
54
90
|
*/
|
|
55
91
|
readonly repository: pulumi.Output<string>;
|
|
56
92
|
/**
|
|
57
|
-
* The blob
|
|
93
|
+
* The SHA blob of the file.
|
|
58
94
|
*/
|
|
59
95
|
readonly sha: pulumi.Output<string>;
|
|
60
96
|
/**
|
|
@@ -71,45 +107,44 @@ export declare class RepositoryFile extends pulumi.CustomResource {
|
|
|
71
107
|
*/
|
|
72
108
|
export interface RepositoryFileState {
|
|
73
109
|
/**
|
|
74
|
-
*
|
|
110
|
+
* Git branch (defaults to `main`).
|
|
111
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
75
112
|
*/
|
|
76
113
|
branch?: pulumi.Input<string>;
|
|
77
114
|
/**
|
|
78
|
-
*
|
|
79
|
-
* information so GitHub can verify commits as the GitHub App.
|
|
115
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
80
116
|
*/
|
|
81
117
|
commitAuthor?: pulumi.Input<string>;
|
|
82
118
|
/**
|
|
83
|
-
*
|
|
84
|
-
* and email information so GitHub can verify commits as the GitHub App.
|
|
119
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
85
120
|
*/
|
|
86
121
|
commitEmail?: pulumi.Input<string>;
|
|
87
122
|
/**
|
|
88
|
-
*
|
|
123
|
+
* Commit message when adding or updating the managed file.
|
|
89
124
|
*/
|
|
90
125
|
commitMessage?: pulumi.Input<string>;
|
|
91
126
|
/**
|
|
92
|
-
* The SHA of the commit that modified the file
|
|
127
|
+
* The SHA of the commit that modified the file.
|
|
93
128
|
*/
|
|
94
129
|
commitSha?: pulumi.Input<string>;
|
|
95
130
|
/**
|
|
96
|
-
* The file
|
|
131
|
+
* The file content.
|
|
97
132
|
*/
|
|
98
133
|
content?: pulumi.Input<string>;
|
|
99
134
|
/**
|
|
100
|
-
* The file
|
|
135
|
+
* The path of the file to manage.
|
|
101
136
|
*/
|
|
102
137
|
file?: pulumi.Input<string>;
|
|
103
138
|
/**
|
|
104
|
-
* Enable overwriting existing files
|
|
139
|
+
* Enable overwriting existing files
|
|
105
140
|
*/
|
|
106
141
|
overwriteOnCreate?: pulumi.Input<boolean>;
|
|
107
142
|
/**
|
|
108
|
-
* The repository
|
|
143
|
+
* The repository to create the file in.
|
|
109
144
|
*/
|
|
110
145
|
repository?: pulumi.Input<string>;
|
|
111
146
|
/**
|
|
112
|
-
* The blob
|
|
147
|
+
* The SHA blob of the file.
|
|
113
148
|
*/
|
|
114
149
|
sha?: pulumi.Input<string>;
|
|
115
150
|
}
|
|
@@ -118,37 +153,36 @@ export interface RepositoryFileState {
|
|
|
118
153
|
*/
|
|
119
154
|
export interface RepositoryFileArgs {
|
|
120
155
|
/**
|
|
121
|
-
*
|
|
156
|
+
* Git branch (defaults to `main`).
|
|
157
|
+
* The branch must already exist, it will not be created if it does not already exist.
|
|
122
158
|
*/
|
|
123
159
|
branch?: pulumi.Input<string>;
|
|
124
160
|
/**
|
|
125
|
-
*
|
|
126
|
-
* information so GitHub can verify commits as the GitHub App.
|
|
161
|
+
* Committer author name to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits.
|
|
127
162
|
*/
|
|
128
163
|
commitAuthor?: pulumi.Input<string>;
|
|
129
164
|
/**
|
|
130
|
-
*
|
|
131
|
-
* and email information so GitHub can verify commits as the GitHub App.
|
|
165
|
+
* Committer email address to use. **NOTE:** GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits.
|
|
132
166
|
*/
|
|
133
167
|
commitEmail?: pulumi.Input<string>;
|
|
134
168
|
/**
|
|
135
|
-
*
|
|
169
|
+
* Commit message when adding or updating the managed file.
|
|
136
170
|
*/
|
|
137
171
|
commitMessage?: pulumi.Input<string>;
|
|
138
172
|
/**
|
|
139
|
-
* The file
|
|
173
|
+
* The file content.
|
|
140
174
|
*/
|
|
141
175
|
content: pulumi.Input<string>;
|
|
142
176
|
/**
|
|
143
|
-
* The file
|
|
177
|
+
* The path of the file to manage.
|
|
144
178
|
*/
|
|
145
179
|
file: pulumi.Input<string>;
|
|
146
180
|
/**
|
|
147
|
-
* Enable overwriting existing files
|
|
181
|
+
* Enable overwriting existing files
|
|
148
182
|
*/
|
|
149
183
|
overwriteOnCreate?: pulumi.Input<boolean>;
|
|
150
184
|
/**
|
|
151
|
-
* The repository
|
|
185
|
+
* The repository to create the file in.
|
|
152
186
|
*/
|
|
153
187
|
repository: pulumi.Input<string>;
|
|
154
188
|
}
|
package/repositoryFile.js
CHANGED
|
@@ -5,7 +5,66 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.RepositoryFile = void 0;
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* This resource allows you to create and manage files within a
|
|
10
|
+
* GitHub repository.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as github from "@pulumi/github";
|
|
17
|
+
*
|
|
18
|
+
* const fooRepository = new github.Repository("fooRepository", {autoInit: true});
|
|
19
|
+
* const fooRepositoryFile = new github.RepositoryFile("fooRepositoryFile", {
|
|
20
|
+
* repository: fooRepository.name,
|
|
21
|
+
* branch: "main",
|
|
22
|
+
* file: ".gitignore",
|
|
23
|
+
* content: "**/*.tfstate",
|
|
24
|
+
* commitMessage: "Managed by Terraform",
|
|
25
|
+
* commitAuthor: "Terraform User",
|
|
26
|
+
* commitEmail: "terraform@example.com",
|
|
27
|
+
* overwriteOnCreate: true,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Import
|
|
32
|
+
*
|
|
33
|
+
* Repository files can be imported using a combination of the `repo` and `file`, e.g.
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* To import a file from a branch other than main, append `:` and the branch name, e.g.
|
|
40
|
+
*
|
|
41
|
+
* ```sh
|
|
42
|
+
* $ pulumi import github:index/repositoryFile:RepositoryFile gitignore example/.gitignore:dev
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
8
45
|
class RepositoryFile extends pulumi.CustomResource {
|
|
46
|
+
/**
|
|
47
|
+
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
48
|
+
* properties used to qualify the lookup.
|
|
49
|
+
*
|
|
50
|
+
* @param name The _unique_ name of the resulting resource.
|
|
51
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
52
|
+
* @param state Any extra arguments used during the lookup.
|
|
53
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
54
|
+
*/
|
|
55
|
+
static get(name, id, state, opts) {
|
|
56
|
+
return new RepositoryFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Returns true if the given object is an instance of RepositoryFile. This is designed to work even
|
|
60
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
61
|
+
*/
|
|
62
|
+
static isInstance(obj) {
|
|
63
|
+
if (obj === undefined || obj === null) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return obj['__pulumiType'] === RepositoryFile.__pulumiType;
|
|
67
|
+
}
|
|
9
68
|
constructor(name, argsOrState, opts) {
|
|
10
69
|
let resourceInputs = {};
|
|
11
70
|
opts = opts || {};
|
|
@@ -47,28 +106,6 @@ class RepositoryFile extends pulumi.CustomResource {
|
|
|
47
106
|
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
48
107
|
super(RepositoryFile.__pulumiType, name, resourceInputs, opts);
|
|
49
108
|
}
|
|
50
|
-
/**
|
|
51
|
-
* Get an existing RepositoryFile resource's state with the given name, ID, and optional extra
|
|
52
|
-
* properties used to qualify the lookup.
|
|
53
|
-
*
|
|
54
|
-
* @param name The _unique_ name of the resulting resource.
|
|
55
|
-
* @param id The _unique_ provider ID of the resource to lookup.
|
|
56
|
-
* @param state Any extra arguments used during the lookup.
|
|
57
|
-
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
58
|
-
*/
|
|
59
|
-
static get(name, id, state, opts) {
|
|
60
|
-
return new RepositoryFile(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if the given object is an instance of RepositoryFile. This is designed to work even
|
|
64
|
-
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
65
|
-
*/
|
|
66
|
-
static isInstance(obj) {
|
|
67
|
-
if (obj === undefined || obj === null) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
return obj['__pulumiType'] === RepositoryFile.__pulumiType;
|
|
71
|
-
}
|
|
72
109
|
}
|
|
73
110
|
exports.RepositoryFile = RepositoryFile;
|
|
74
111
|
/** @internal */
|
package/repositoryFile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repositoryFile.js","sourceRoot":"","sources":["../repositoryFile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"repositoryFile.js","sourceRoot":"","sources":["../repositoryFile.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,cAAe,SAAQ,MAAM,CAAC,cAAc;IACrD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA2B,EAAE,IAAmC;QACzH,OAAO,IAAI,cAAc,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACrE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAA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