@pulumi/gcp 6.15.0 → 6.15.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.
Files changed (76) hide show
  1. package/billing/accountIamBinding.d.ts +105 -0
  2. package/billing/accountIamBinding.js +75 -0
  3. package/billing/accountIamBinding.js.map +1 -1
  4. package/billing/accountIamMember.d.ts +105 -0
  5. package/billing/accountIamMember.js +75 -0
  6. package/billing/accountIamMember.js.map +1 -1
  7. package/billing/accountIamPolicy.d.ts +99 -0
  8. package/billing/accountIamPolicy.js +75 -0
  9. package/billing/accountIamPolicy.js.map +1 -1
  10. package/cloudfunctions/functionIamBinding.d.ts +142 -0
  11. package/cloudfunctions/functionIamBinding.js +85 -0
  12. package/cloudfunctions/functionIamBinding.js.map +1 -1
  13. package/cloudfunctions/functionIamMember.d.ts +142 -0
  14. package/cloudfunctions/functionIamMember.js +85 -0
  15. package/cloudfunctions/functionIamMember.js.map +1 -1
  16. package/cloudfunctions/functionIamPolicy.d.ts +139 -0
  17. package/cloudfunctions/functionIamPolicy.js +85 -0
  18. package/cloudfunctions/functionIamPolicy.js.map +1 -1
  19. package/compute/backendServiceIamBinding.d.ts +79 -0
  20. package/compute/backendServiceIamBinding.js +25 -0
  21. package/compute/backendServiceIamBinding.js.map +1 -1
  22. package/compute/backendServiceIamMember.d.ts +79 -0
  23. package/compute/backendServiceIamMember.js +25 -0
  24. package/compute/backendServiceIamMember.js.map +1 -1
  25. package/compute/backendServiceIamPolicy.d.ts +64 -0
  26. package/compute/backendServiceIamPolicy.js +25 -0
  27. package/compute/backendServiceIamPolicy.js.map +1 -1
  28. package/compute/mangedSslCertificate.d.ts +157 -27
  29. package/compute/mangedSslCertificate.js +97 -0
  30. package/compute/mangedSslCertificate.js.map +1 -1
  31. package/compute/regionBackendServiceIamBinding.d.ts +100 -0
  32. package/compute/regionBackendServiceIamBinding.js +25 -0
  33. package/compute/regionBackendServiceIamBinding.js.map +1 -1
  34. package/compute/regionBackendServiceIamMember.d.ts +100 -0
  35. package/compute/regionBackendServiceIamMember.js +25 -0
  36. package/compute/regionBackendServiceIamMember.js.map +1 -1
  37. package/compute/regionBackendServiceIamPolicy.d.ts +85 -0
  38. package/compute/regionBackendServiceIamPolicy.js +25 -0
  39. package/compute/regionBackendServiceIamPolicy.js.map +1 -1
  40. package/datacatalog/tagTemplateIamBinding.d.ts +121 -0
  41. package/datacatalog/tagTemplateIamBinding.js +79 -0
  42. package/datacatalog/tagTemplateIamBinding.js.map +1 -1
  43. package/datacatalog/tagTemplateIamMember.d.ts +121 -0
  44. package/datacatalog/tagTemplateIamMember.js +79 -0
  45. package/datacatalog/tagTemplateIamMember.js.map +1 -1
  46. package/datacatalog/tagTemplateIamPolicy.d.ts +118 -0
  47. package/datacatalog/tagTemplateIamPolicy.js +79 -0
  48. package/datacatalog/tagTemplateIamPolicy.js.map +1 -1
  49. package/folder/iamAuditConfig.d.ts +200 -8
  50. package/folder/iamAuditConfig.js +183 -0
  51. package/folder/iamAuditConfig.js.map +1 -1
  52. package/folder/iammember.d.ts +225 -0
  53. package/folder/iammember.js +183 -0
  54. package/folder/iammember.js.map +1 -1
  55. package/folder/iampolicy.d.ts +213 -0
  56. package/folder/iampolicy.js +183 -0
  57. package/folder/iampolicy.js.map +1 -1
  58. package/kms/registry.d.ts +149 -18
  59. package/kms/registry.js +89 -0
  60. package/kms/registry.js.map +1 -1
  61. package/monitoring/getSecretVersion.d.ts +52 -0
  62. package/monitoring/getSecretVersion.js +14 -0
  63. package/monitoring/getSecretVersion.js.map +1 -1
  64. package/organizations/iammember.d.ts +228 -3
  65. package/organizations/iammember.js +186 -0
  66. package/organizations/iammember.js.map +1 -1
  67. package/organizations/iampolicy.d.ts +216 -3
  68. package/organizations/iampolicy.js +186 -0
  69. package/organizations/iampolicy.js.map +1 -1
  70. package/package.json +2 -2
  71. package/package.json.dev +2 -2
  72. package/sourcerepo/getRepository.d.ts +29 -0
  73. package/sourcerepo/getRepository.js +17 -0
  74. package/sourcerepo/getRepository.js.map +1 -1
  75. package/types/input.d.ts +77 -0
  76. package/types/output.d.ts +77 -0
@@ -5,6 +5,81 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.AccountIamPolicy = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("../utilities");
8
+ /**
9
+ * Three different resources help you manage IAM policies on billing accounts. Each of these resources serves a different use case:
10
+ *
11
+ * * `gcp.billing.AccountIamPolicy`: Authoritative. Sets the IAM policy for the billing accounts and replaces any existing policy already attached.
12
+ * * `gcp.billing.AccountIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the table are preserved.
13
+ * * `gcp.billing.AccountIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role of the billing accounts are preserved.
14
+ *
15
+ * > **Note:** `gcp.billing.AccountIamPolicy` **cannot** be used in conjunction with `gcp.billing.AccountIamBinding` and `gcp.billing.AccountIamMember` or they will fight over what your policy should be. In addition, be careful not to accidentally unset ownership of the billing account as `gcp.billing.AccountIamPolicy` replaces the entire policy.
16
+ *
17
+ * > **Note:** `gcp.billing.AccountIamBinding` resources **can be** used in conjunction with `gcp.billing.AccountIamMember` resources **only if** they do not grant privilege to the same role.
18
+ *
19
+ * ## google\_billing\_account\_iam\_policy
20
+ *
21
+ * ```typescript
22
+ * import * as pulumi from "@pulumi/pulumi";
23
+ * import * as gcp from "@pulumi/gcp";
24
+ *
25
+ * const admin = gcp.organizations.getIAMPolicy({
26
+ * bindings: [{
27
+ * role: "roles/billing.viewer",
28
+ * members: ["user:jane@example.com"],
29
+ * }],
30
+ * });
31
+ * const editor = new gcp.billing.AccountIamPolicy("editor", {
32
+ * billingAccountId: "00AA00-000AAA-00AA0A",
33
+ * policyData: admin.then(admin => admin.policyData),
34
+ * });
35
+ * ```
36
+ *
37
+ * ## google\_billing\_account\_iam\_binding
38
+ *
39
+ * ```typescript
40
+ * import * as pulumi from "@pulumi/pulumi";
41
+ * import * as gcp from "@pulumi/gcp";
42
+ *
43
+ * const editor = new gcp.billing.AccountIamBinding("editor", {
44
+ * billingAccountId: "00AA00-000AAA-00AA0A",
45
+ * members: ["user:jane@example.com"],
46
+ * role: "roles/billing.viewer",
47
+ * });
48
+ * ```
49
+ *
50
+ * ## google\_billing\_account\_iam\_member
51
+ *
52
+ * ```typescript
53
+ * import * as pulumi from "@pulumi/pulumi";
54
+ * import * as gcp from "@pulumi/gcp";
55
+ *
56
+ * const editor = new gcp.billing.AccountIamMember("editor", {
57
+ * billingAccountId: "00AA00-000AAA-00AA0A",
58
+ * member: "user:jane@example.com",
59
+ * role: "roles/billing.viewer",
60
+ * });
61
+ * ```
62
+ *
63
+ * ## Import
64
+ *
65
+ * Instance IAM resources can be imported using the project, table name, role and/or member.
66
+ *
67
+ * ```sh
68
+ * $ pulumi import gcp:billing/accountIamPolicy:AccountIamPolicy binding "your-billing-account-id"
69
+ * ```
70
+ *
71
+ * ```sh
72
+ * $ pulumi import gcp:billing/accountIamPolicy:AccountIamPolicy binding "your-billing-account-id roles/billing.user"
73
+ * ```
74
+ *
75
+ * ```sh
76
+ * $ pulumi import gcp:billing/accountIamPolicy:AccountIamPolicy binding "your-billing-account-id roles/billing.user user:jane@example.com"
77
+ * ```
78
+ *
79
+ * -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
80
+ *
81
+ * full name of the custom role, e.g. `organizations/my-org-id/roles/my-custom-role`.
82
+ */
8
83
  class AccountIamPolicy extends pulumi.CustomResource {
9
84
  constructor(name, argsOrState, opts) {
10
85
  let resourceInputs = {};
@@ -1 +1 @@
1
- {"version":3,"file":"accountIamPolicy.js","sourceRoot":"","sources":["../../billing/accountIamPolicy.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,0CAA0C;AAE1C,MAAa,gBAAiB,SAAQ,MAAM,CAAC,cAAc;IAwCvD,YAAY,IAAY,EAAE,WAA0D,EAAE,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AE,EAAE,EAAE,EAAE,IAAG,CAAC;IACvE,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,CAAC,cAAc,CAAC,KAAK,gBAAgB,CAAC,YAAY,CAAC;IACjE,CAAC;;AA1BL,4CAwEC;AA1DG,gBAAgB;AACO,6BAAY,GAAG,+CAA+C,CAAC"}
@@ -1,5 +1,90 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import { input as inputs, output as outputs } from "../types";
3
+ /**
4
+ * Three different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
5
+ *
6
+ * * `gcp.cloudfunctions.FunctionIamPolicy`: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.
7
+ * * `gcp.cloudfunctions.FunctionIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.
8
+ * * `gcp.cloudfunctions.FunctionIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
9
+ *
10
+ * > **Note:** `gcp.cloudfunctions.FunctionIamPolicy` **cannot** be used in conjunction with `gcp.cloudfunctions.FunctionIamBinding` and `gcp.cloudfunctions.FunctionIamMember` or they will fight over what your policy should be.
11
+ *
12
+ * > **Note:** `gcp.cloudfunctions.FunctionIamBinding` resources **can be** used in conjunction with `gcp.cloudfunctions.FunctionIamMember` resources **only if** they do not grant privilege to the same role.
13
+ *
14
+ * ## google\_cloudfunctions\_function\_iam\_policy
15
+ *
16
+ * ```typescript
17
+ * import * as pulumi from "@pulumi/pulumi";
18
+ * import * as gcp from "@pulumi/gcp";
19
+ *
20
+ * const admin = gcp.organizations.getIAMPolicy({
21
+ * bindings: [{
22
+ * role: "roles/viewer",
23
+ * members: ["user:jane@example.com"],
24
+ * }],
25
+ * });
26
+ * const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
27
+ * project: google_cloudfunctions_function["function"].project,
28
+ * region: google_cloudfunctions_function["function"].region,
29
+ * cloudFunction: google_cloudfunctions_function["function"].name,
30
+ * policyData: admin.then(admin => admin.policyData),
31
+ * });
32
+ * ```
33
+ *
34
+ * ## google\_cloudfunctions\_function\_iam\_binding
35
+ *
36
+ * ```typescript
37
+ * import * as pulumi from "@pulumi/pulumi";
38
+ * import * as gcp from "@pulumi/gcp";
39
+ *
40
+ * const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
41
+ * project: google_cloudfunctions_function["function"].project,
42
+ * region: google_cloudfunctions_function["function"].region,
43
+ * cloudFunction: google_cloudfunctions_function["function"].name,
44
+ * role: "roles/viewer",
45
+ * members: ["user:jane@example.com"],
46
+ * });
47
+ * ```
48
+ *
49
+ * ## google\_cloudfunctions\_function\_iam\_member
50
+ *
51
+ * ```typescript
52
+ * import * as pulumi from "@pulumi/pulumi";
53
+ * import * as gcp from "@pulumi/gcp";
54
+ *
55
+ * const member = new gcp.cloudfunctions.FunctionIamMember("member", {
56
+ * project: google_cloudfunctions_function["function"].project,
57
+ * region: google_cloudfunctions_function["function"].region,
58
+ * cloudFunction: google_cloudfunctions_function["function"].name,
59
+ * role: "roles/viewer",
60
+ * member: "user:jane@example.com",
61
+ * });
62
+ * ```
63
+ *
64
+ * ## Import
65
+ *
66
+ * For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} * {{project}}/{{region}}/{{cloud_function}} * {{region}}/{{cloud_function}} * {{cloud_function}} Any variables not passed in the import command will be taken from the provider configuration. Cloud Functions cloudfunction IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.
67
+ *
68
+ * ```sh
69
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer user:jane@example.com"
70
+ * ```
71
+ *
72
+ * IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.
73
+ *
74
+ * ```sh
75
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer"
76
+ * ```
77
+ *
78
+ * IAM policy imports use the identifier of the resource in question, e.g.
79
+ *
80
+ * ```sh
81
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor projects/{{project}}/locations/{{region}}/functions/{{cloud_function}}
82
+ * ```
83
+ *
84
+ * -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
85
+ *
86
+ * full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
87
+ */
3
88
  export declare class FunctionIamBinding extends pulumi.CustomResource {
4
89
  /**
5
90
  * Get an existing FunctionIamBinding resource's state with the given name, ID, and optional extra
@@ -16,12 +101,32 @@ export declare class FunctionIamBinding extends pulumi.CustomResource {
16
101
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
17
102
  */
18
103
  static isInstance(obj: any): obj is FunctionIamBinding;
104
+ /**
105
+ * Used to find the parent resource to bind the IAM policy to
106
+ */
19
107
  readonly cloudFunction: pulumi.Output<string>;
20
108
  readonly condition: pulumi.Output<outputs.cloudfunctions.FunctionIamBindingCondition | undefined>;
109
+ /**
110
+ * (Computed) The etag of the IAM policy.
111
+ */
21
112
  readonly etag: pulumi.Output<string>;
22
113
  readonly members: pulumi.Output<string[]>;
114
+ /**
115
+ * The ID of the project in which the resource belongs.
116
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
117
+ */
23
118
  readonly project: pulumi.Output<string>;
119
+ /**
120
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
121
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
122
+ * region is specified, it is taken from the provider configuration.
123
+ */
24
124
  readonly region: pulumi.Output<string>;
125
+ /**
126
+ * The role that should be applied. Only one
127
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
128
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
129
+ */
25
130
  readonly role: pulumi.Output<string>;
26
131
  /**
27
132
  * Create a FunctionIamBinding resource with the given unique name, arguments, and options.
@@ -36,22 +141,59 @@ export declare class FunctionIamBinding extends pulumi.CustomResource {
36
141
  * Input properties used for looking up and filtering FunctionIamBinding resources.
37
142
  */
38
143
  export interface FunctionIamBindingState {
144
+ /**
145
+ * Used to find the parent resource to bind the IAM policy to
146
+ */
39
147
  cloudFunction?: pulumi.Input<string>;
40
148
  condition?: pulumi.Input<inputs.cloudfunctions.FunctionIamBindingCondition>;
149
+ /**
150
+ * (Computed) The etag of the IAM policy.
151
+ */
41
152
  etag?: pulumi.Input<string>;
42
153
  members?: pulumi.Input<pulumi.Input<string>[]>;
154
+ /**
155
+ * The ID of the project in which the resource belongs.
156
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
157
+ */
43
158
  project?: pulumi.Input<string>;
159
+ /**
160
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
161
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
162
+ * region is specified, it is taken from the provider configuration.
163
+ */
44
164
  region?: pulumi.Input<string>;
165
+ /**
166
+ * The role that should be applied. Only one
167
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
168
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
169
+ */
45
170
  role?: pulumi.Input<string>;
46
171
  }
47
172
  /**
48
173
  * The set of arguments for constructing a FunctionIamBinding resource.
49
174
  */
50
175
  export interface FunctionIamBindingArgs {
176
+ /**
177
+ * Used to find the parent resource to bind the IAM policy to
178
+ */
51
179
  cloudFunction: pulumi.Input<string>;
52
180
  condition?: pulumi.Input<inputs.cloudfunctions.FunctionIamBindingCondition>;
53
181
  members: pulumi.Input<pulumi.Input<string>[]>;
182
+ /**
183
+ * The ID of the project in which the resource belongs.
184
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
185
+ */
54
186
  project?: pulumi.Input<string>;
187
+ /**
188
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
189
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
190
+ * region is specified, it is taken from the provider configuration.
191
+ */
55
192
  region?: pulumi.Input<string>;
193
+ /**
194
+ * The role that should be applied. Only one
195
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
196
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
197
+ */
56
198
  role: pulumi.Input<string>;
57
199
  }
@@ -5,6 +5,91 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.FunctionIamBinding = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("../utilities");
8
+ /**
9
+ * Three different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
10
+ *
11
+ * * `gcp.cloudfunctions.FunctionIamPolicy`: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.
12
+ * * `gcp.cloudfunctions.FunctionIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.
13
+ * * `gcp.cloudfunctions.FunctionIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
14
+ *
15
+ * > **Note:** `gcp.cloudfunctions.FunctionIamPolicy` **cannot** be used in conjunction with `gcp.cloudfunctions.FunctionIamBinding` and `gcp.cloudfunctions.FunctionIamMember` or they will fight over what your policy should be.
16
+ *
17
+ * > **Note:** `gcp.cloudfunctions.FunctionIamBinding` resources **can be** used in conjunction with `gcp.cloudfunctions.FunctionIamMember` resources **only if** they do not grant privilege to the same role.
18
+ *
19
+ * ## google\_cloudfunctions\_function\_iam\_policy
20
+ *
21
+ * ```typescript
22
+ * import * as pulumi from "@pulumi/pulumi";
23
+ * import * as gcp from "@pulumi/gcp";
24
+ *
25
+ * const admin = gcp.organizations.getIAMPolicy({
26
+ * bindings: [{
27
+ * role: "roles/viewer",
28
+ * members: ["user:jane@example.com"],
29
+ * }],
30
+ * });
31
+ * const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
32
+ * project: google_cloudfunctions_function["function"].project,
33
+ * region: google_cloudfunctions_function["function"].region,
34
+ * cloudFunction: google_cloudfunctions_function["function"].name,
35
+ * policyData: admin.then(admin => admin.policyData),
36
+ * });
37
+ * ```
38
+ *
39
+ * ## google\_cloudfunctions\_function\_iam\_binding
40
+ *
41
+ * ```typescript
42
+ * import * as pulumi from "@pulumi/pulumi";
43
+ * import * as gcp from "@pulumi/gcp";
44
+ *
45
+ * const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
46
+ * project: google_cloudfunctions_function["function"].project,
47
+ * region: google_cloudfunctions_function["function"].region,
48
+ * cloudFunction: google_cloudfunctions_function["function"].name,
49
+ * role: "roles/viewer",
50
+ * members: ["user:jane@example.com"],
51
+ * });
52
+ * ```
53
+ *
54
+ * ## google\_cloudfunctions\_function\_iam\_member
55
+ *
56
+ * ```typescript
57
+ * import * as pulumi from "@pulumi/pulumi";
58
+ * import * as gcp from "@pulumi/gcp";
59
+ *
60
+ * const member = new gcp.cloudfunctions.FunctionIamMember("member", {
61
+ * project: google_cloudfunctions_function["function"].project,
62
+ * region: google_cloudfunctions_function["function"].region,
63
+ * cloudFunction: google_cloudfunctions_function["function"].name,
64
+ * role: "roles/viewer",
65
+ * member: "user:jane@example.com",
66
+ * });
67
+ * ```
68
+ *
69
+ * ## Import
70
+ *
71
+ * For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} * {{project}}/{{region}}/{{cloud_function}} * {{region}}/{{cloud_function}} * {{cloud_function}} Any variables not passed in the import command will be taken from the provider configuration. Cloud Functions cloudfunction IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.
72
+ *
73
+ * ```sh
74
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer user:jane@example.com"
75
+ * ```
76
+ *
77
+ * IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.
78
+ *
79
+ * ```sh
80
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer"
81
+ * ```
82
+ *
83
+ * IAM policy imports use the identifier of the resource in question, e.g.
84
+ *
85
+ * ```sh
86
+ * $ pulumi import gcp:cloudfunctions/functionIamBinding:FunctionIamBinding editor projects/{{project}}/locations/{{region}}/functions/{{cloud_function}}
87
+ * ```
88
+ *
89
+ * -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
90
+ *
91
+ * full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
92
+ */
8
93
  class FunctionIamBinding extends pulumi.CustomResource {
9
94
  constructor(name, argsOrState, opts) {
10
95
  let resourceInputs = {};
@@ -1 +1 @@
1
- {"version":3,"file":"functionIamBinding.js","sourceRoot":"","sources":["../../cloudfunctions/functionIamBinding.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAEzC,0CAA0C;AAE1C,MAAa,kBAAmB,SAAQ,MAAM,CAAC,cAAc;IA4CzD,YAAY,IAAY,EAAE,WAA8D,EAAE,IAAmC;QACzH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;Y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GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACtD,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,kBAAkB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACvE,CAAC;IAhGD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA+B,EAAE,IAAmC;QAC7H,OAAO,IAAI,kBAAkB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACzE,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,CAAC,cAAc,CAAC,KAAK,kBAAkB,CAAC,YAAY,CAAC;IACnE,CAAC;;AA1BL,gDAkGC;AApFG,gBAAgB;AACO,+BAAY,GAAG,0DAA0D,CAAC"}
@@ -1,5 +1,90 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  import { input as inputs, output as outputs } from "../types";
3
+ /**
4
+ * Three different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
5
+ *
6
+ * * `gcp.cloudfunctions.FunctionIamPolicy`: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.
7
+ * * `gcp.cloudfunctions.FunctionIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.
8
+ * * `gcp.cloudfunctions.FunctionIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
9
+ *
10
+ * > **Note:** `gcp.cloudfunctions.FunctionIamPolicy` **cannot** be used in conjunction with `gcp.cloudfunctions.FunctionIamBinding` and `gcp.cloudfunctions.FunctionIamMember` or they will fight over what your policy should be.
11
+ *
12
+ * > **Note:** `gcp.cloudfunctions.FunctionIamBinding` resources **can be** used in conjunction with `gcp.cloudfunctions.FunctionIamMember` resources **only if** they do not grant privilege to the same role.
13
+ *
14
+ * ## google\_cloudfunctions\_function\_iam\_policy
15
+ *
16
+ * ```typescript
17
+ * import * as pulumi from "@pulumi/pulumi";
18
+ * import * as gcp from "@pulumi/gcp";
19
+ *
20
+ * const admin = gcp.organizations.getIAMPolicy({
21
+ * bindings: [{
22
+ * role: "roles/viewer",
23
+ * members: ["user:jane@example.com"],
24
+ * }],
25
+ * });
26
+ * const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
27
+ * project: google_cloudfunctions_function["function"].project,
28
+ * region: google_cloudfunctions_function["function"].region,
29
+ * cloudFunction: google_cloudfunctions_function["function"].name,
30
+ * policyData: admin.then(admin => admin.policyData),
31
+ * });
32
+ * ```
33
+ *
34
+ * ## google\_cloudfunctions\_function\_iam\_binding
35
+ *
36
+ * ```typescript
37
+ * import * as pulumi from "@pulumi/pulumi";
38
+ * import * as gcp from "@pulumi/gcp";
39
+ *
40
+ * const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
41
+ * project: google_cloudfunctions_function["function"].project,
42
+ * region: google_cloudfunctions_function["function"].region,
43
+ * cloudFunction: google_cloudfunctions_function["function"].name,
44
+ * role: "roles/viewer",
45
+ * members: ["user:jane@example.com"],
46
+ * });
47
+ * ```
48
+ *
49
+ * ## google\_cloudfunctions\_function\_iam\_member
50
+ *
51
+ * ```typescript
52
+ * import * as pulumi from "@pulumi/pulumi";
53
+ * import * as gcp from "@pulumi/gcp";
54
+ *
55
+ * const member = new gcp.cloudfunctions.FunctionIamMember("member", {
56
+ * project: google_cloudfunctions_function["function"].project,
57
+ * region: google_cloudfunctions_function["function"].region,
58
+ * cloudFunction: google_cloudfunctions_function["function"].name,
59
+ * role: "roles/viewer",
60
+ * member: "user:jane@example.com",
61
+ * });
62
+ * ```
63
+ *
64
+ * ## Import
65
+ *
66
+ * For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} * {{project}}/{{region}}/{{cloud_function}} * {{region}}/{{cloud_function}} * {{cloud_function}} Any variables not passed in the import command will be taken from the provider configuration. Cloud Functions cloudfunction IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.
67
+ *
68
+ * ```sh
69
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer user:jane@example.com"
70
+ * ```
71
+ *
72
+ * IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.
73
+ *
74
+ * ```sh
75
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer"
76
+ * ```
77
+ *
78
+ * IAM policy imports use the identifier of the resource in question, e.g.
79
+ *
80
+ * ```sh
81
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor projects/{{project}}/locations/{{region}}/functions/{{cloud_function}}
82
+ * ```
83
+ *
84
+ * -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
85
+ *
86
+ * full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
87
+ */
3
88
  export declare class FunctionIamMember extends pulumi.CustomResource {
4
89
  /**
5
90
  * Get an existing FunctionIamMember resource's state with the given name, ID, and optional extra
@@ -16,12 +101,32 @@ export declare class FunctionIamMember extends pulumi.CustomResource {
16
101
  * when multiple copies of the Pulumi SDK have been loaded into the same process.
17
102
  */
18
103
  static isInstance(obj: any): obj is FunctionIamMember;
104
+ /**
105
+ * Used to find the parent resource to bind the IAM policy to
106
+ */
19
107
  readonly cloudFunction: pulumi.Output<string>;
20
108
  readonly condition: pulumi.Output<outputs.cloudfunctions.FunctionIamMemberCondition | undefined>;
109
+ /**
110
+ * (Computed) The etag of the IAM policy.
111
+ */
21
112
  readonly etag: pulumi.Output<string>;
22
113
  readonly member: pulumi.Output<string>;
114
+ /**
115
+ * The ID of the project in which the resource belongs.
116
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
117
+ */
23
118
  readonly project: pulumi.Output<string>;
119
+ /**
120
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
121
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
122
+ * region is specified, it is taken from the provider configuration.
123
+ */
24
124
  readonly region: pulumi.Output<string>;
125
+ /**
126
+ * The role that should be applied. Only one
127
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
128
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
129
+ */
25
130
  readonly role: pulumi.Output<string>;
26
131
  /**
27
132
  * Create a FunctionIamMember resource with the given unique name, arguments, and options.
@@ -36,22 +141,59 @@ export declare class FunctionIamMember extends pulumi.CustomResource {
36
141
  * Input properties used for looking up and filtering FunctionIamMember resources.
37
142
  */
38
143
  export interface FunctionIamMemberState {
144
+ /**
145
+ * Used to find the parent resource to bind the IAM policy to
146
+ */
39
147
  cloudFunction?: pulumi.Input<string>;
40
148
  condition?: pulumi.Input<inputs.cloudfunctions.FunctionIamMemberCondition>;
149
+ /**
150
+ * (Computed) The etag of the IAM policy.
151
+ */
41
152
  etag?: pulumi.Input<string>;
42
153
  member?: pulumi.Input<string>;
154
+ /**
155
+ * The ID of the project in which the resource belongs.
156
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
157
+ */
43
158
  project?: pulumi.Input<string>;
159
+ /**
160
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
161
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
162
+ * region is specified, it is taken from the provider configuration.
163
+ */
44
164
  region?: pulumi.Input<string>;
165
+ /**
166
+ * The role that should be applied. Only one
167
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
168
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
169
+ */
45
170
  role?: pulumi.Input<string>;
46
171
  }
47
172
  /**
48
173
  * The set of arguments for constructing a FunctionIamMember resource.
49
174
  */
50
175
  export interface FunctionIamMemberArgs {
176
+ /**
177
+ * Used to find the parent resource to bind the IAM policy to
178
+ */
51
179
  cloudFunction: pulumi.Input<string>;
52
180
  condition?: pulumi.Input<inputs.cloudfunctions.FunctionIamMemberCondition>;
53
181
  member: pulumi.Input<string>;
182
+ /**
183
+ * The ID of the project in which the resource belongs.
184
+ * If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
185
+ */
54
186
  project?: pulumi.Input<string>;
187
+ /**
188
+ * The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified,
189
+ * the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no
190
+ * region is specified, it is taken from the provider configuration.
191
+ */
55
192
  region?: pulumi.Input<string>;
193
+ /**
194
+ * The role that should be applied. Only one
195
+ * `gcp.cloudfunctions.FunctionIamBinding` can be used per role. Note that custom roles must be of the format
196
+ * `[projects|organizations]/{parent-name}/roles/{role-name}`.
197
+ */
56
198
  role: pulumi.Input<string>;
57
199
  }
@@ -5,6 +5,91 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.FunctionIamMember = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("../utilities");
8
+ /**
9
+ * Three different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
10
+ *
11
+ * * `gcp.cloudfunctions.FunctionIamPolicy`: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.
12
+ * * `gcp.cloudfunctions.FunctionIamBinding`: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.
13
+ * * `gcp.cloudfunctions.FunctionIamMember`: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
14
+ *
15
+ * > **Note:** `gcp.cloudfunctions.FunctionIamPolicy` **cannot** be used in conjunction with `gcp.cloudfunctions.FunctionIamBinding` and `gcp.cloudfunctions.FunctionIamMember` or they will fight over what your policy should be.
16
+ *
17
+ * > **Note:** `gcp.cloudfunctions.FunctionIamBinding` resources **can be** used in conjunction with `gcp.cloudfunctions.FunctionIamMember` resources **only if** they do not grant privilege to the same role.
18
+ *
19
+ * ## google\_cloudfunctions\_function\_iam\_policy
20
+ *
21
+ * ```typescript
22
+ * import * as pulumi from "@pulumi/pulumi";
23
+ * import * as gcp from "@pulumi/gcp";
24
+ *
25
+ * const admin = gcp.organizations.getIAMPolicy({
26
+ * bindings: [{
27
+ * role: "roles/viewer",
28
+ * members: ["user:jane@example.com"],
29
+ * }],
30
+ * });
31
+ * const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
32
+ * project: google_cloudfunctions_function["function"].project,
33
+ * region: google_cloudfunctions_function["function"].region,
34
+ * cloudFunction: google_cloudfunctions_function["function"].name,
35
+ * policyData: admin.then(admin => admin.policyData),
36
+ * });
37
+ * ```
38
+ *
39
+ * ## google\_cloudfunctions\_function\_iam\_binding
40
+ *
41
+ * ```typescript
42
+ * import * as pulumi from "@pulumi/pulumi";
43
+ * import * as gcp from "@pulumi/gcp";
44
+ *
45
+ * const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
46
+ * project: google_cloudfunctions_function["function"].project,
47
+ * region: google_cloudfunctions_function["function"].region,
48
+ * cloudFunction: google_cloudfunctions_function["function"].name,
49
+ * role: "roles/viewer",
50
+ * members: ["user:jane@example.com"],
51
+ * });
52
+ * ```
53
+ *
54
+ * ## google\_cloudfunctions\_function\_iam\_member
55
+ *
56
+ * ```typescript
57
+ * import * as pulumi from "@pulumi/pulumi";
58
+ * import * as gcp from "@pulumi/gcp";
59
+ *
60
+ * const member = new gcp.cloudfunctions.FunctionIamMember("member", {
61
+ * project: google_cloudfunctions_function["function"].project,
62
+ * region: google_cloudfunctions_function["function"].region,
63
+ * cloudFunction: google_cloudfunctions_function["function"].name,
64
+ * role: "roles/viewer",
65
+ * member: "user:jane@example.com",
66
+ * });
67
+ * ```
68
+ *
69
+ * ## Import
70
+ *
71
+ * For all import syntaxes, the "resource in question" can take any of the following forms* projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} * {{project}}/{{region}}/{{cloud_function}} * {{region}}/{{cloud_function}} * {{cloud_function}} Any variables not passed in the import command will be taken from the provider configuration. Cloud Functions cloudfunction IAM resources can be imported using the resource identifiers, role, and member. IAM member imports use space-delimited identifiersthe resource in question, the role, and the member identity, e.g.
72
+ *
73
+ * ```sh
74
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer user:jane@example.com"
75
+ * ```
76
+ *
77
+ * IAM binding imports use space-delimited identifiersthe resource in question and the role, e.g.
78
+ *
79
+ * ```sh
80
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor "projects/{{project}}/locations/{{region}}/functions/{{cloud_function}} roles/viewer"
81
+ * ```
82
+ *
83
+ * IAM policy imports use the identifier of the resource in question, e.g.
84
+ *
85
+ * ```sh
86
+ * $ pulumi import gcp:cloudfunctions/functionIamMember:FunctionIamMember editor projects/{{project}}/locations/{{region}}/functions/{{cloud_function}}
87
+ * ```
88
+ *
89
+ * -> **Custom Roles**If you're importing a IAM resource with a custom role, make sure to use the
90
+ *
91
+ * full name of the custom role, e.g. `[projects/my-project|organizations/my-org]/roles/my-custom-role`.
92
+ */
8
93
  class FunctionIamMember extends pulumi.CustomResource {
9
94
  constructor(name, argsOrState, opts) {
10
95
  let resourceInputs = {};