@pulumi/tailscale 0.23.0 → 0.25.0

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/acl.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
- * The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
3
+ * The acl resource allows you to configure a Tailscale policy file. See https://tailscale.com/kb/1395/tailnet-policy-file for more information. Note that this resource will completely overwrite existing policy file contents for a given tailnet.
4
4
  *
5
- * If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.
5
+ * If tests are defined in the policy file (the top-level "tests" section), policy file validation will occur before creation and update operations are applied.
6
+ *
7
+ * > **Note:** The naming of this resource predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This resource controls a tailnet's entire policy file and not just the ACLs section within it.
6
8
  *
7
9
  * ## Example Usage
8
10
  *
@@ -11,20 +13,20 @@ import * as pulumi from "@pulumi/pulumi";
11
13
  * import * as tailscale from "@pulumi/tailscale";
12
14
  *
13
15
  * const asJson = new tailscale.Acl("as_json", {acl: JSON.stringify({
14
- * acls: [{
15
- * action: "accept",
16
- * users: ["*"],
17
- * ports: ["*:*"],
16
+ * grants: [{
17
+ * src: ["*"],
18
+ * dst: ["*"],
19
+ * ip: ["*"],
18
20
  * }],
19
21
  * })});
20
22
  * const asHujson = new tailscale.Acl("as_hujson", {acl: ` {
21
23
  * // Comments in HuJSON policy are preserved when the policy is applied.
22
- * \\"acls\\": [
24
+ * \\"grants\\": [
23
25
  * {
24
26
  * // Allow all users access to all ports.
25
- * action = \\"accept\\",
26
- * users = [\\"*\\"],
27
- * ports = [\\"*:*\\"],
27
+ * \\"src\\": [\\"*\\"],
28
+ * \\"dst\\": [\\"*\\"],
29
+ * \\"ip\\": [\\"*\\"],
28
30
  * },
29
31
  * ],
30
32
  * }
@@ -33,8 +35,6 @@ import * as pulumi from "@pulumi/pulumi";
33
35
  *
34
36
  * ## Import
35
37
  *
36
- * The `pulumi import` command can be used, for example:
37
- *
38
38
  * ID doesn't matter.
39
39
  *
40
40
  * ```sh
@@ -62,11 +62,11 @@ export declare class Acl extends pulumi.CustomResource {
62
62
  */
63
63
  readonly acl: pulumi.Output<string>;
64
64
  /**
65
- * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
65
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause the policy file to be overwritten
66
66
  */
67
67
  readonly overwriteExistingContent: pulumi.Output<boolean | undefined>;
68
68
  /**
69
- * If true, will reset the ACL for the Tailnet to the default when this resource is destroyed
69
+ * If true, will reset the policy file for the Tailnet to the default when this resource is destroyed
70
70
  */
71
71
  readonly resetAclOnDestroy: pulumi.Output<boolean | undefined>;
72
72
  /**
@@ -87,11 +87,11 @@ export interface AclState {
87
87
  */
88
88
  acl?: pulumi.Input<string>;
89
89
  /**
90
- * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
90
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause the policy file to be overwritten
91
91
  */
92
92
  overwriteExistingContent?: pulumi.Input<boolean>;
93
93
  /**
94
- * If true, will reset the ACL for the Tailnet to the default when this resource is destroyed
94
+ * If true, will reset the policy file for the Tailnet to the default when this resource is destroyed
95
95
  */
96
96
  resetAclOnDestroy?: pulumi.Input<boolean>;
97
97
  }
@@ -104,11 +104,11 @@ export interface AclArgs {
104
104
  */
105
105
  acl: pulumi.Input<string>;
106
106
  /**
107
- * If true, will skip requirement to import acl before allowing changes. Be careful, can cause ACL to be overwritten
107
+ * If true, will skip requirement to import acl before allowing changes. Be careful, can cause the policy file to be overwritten
108
108
  */
109
109
  overwriteExistingContent?: pulumi.Input<boolean>;
110
110
  /**
111
- * If true, will reset the ACL for the Tailnet to the default when this resource is destroyed
111
+ * If true, will reset the policy file for the Tailnet to the default when this resource is destroyed
112
112
  */
113
113
  resetAclOnDestroy?: pulumi.Input<boolean>;
114
114
  }
package/acl.js CHANGED
@@ -6,9 +6,11 @@ exports.Acl = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
- * The acl resource allows you to configure a Tailscale ACL. See https://tailscale.com/kb/1018/acls for more information. Note that this resource will completely overwrite existing ACL contents for a given tailnet.
9
+ * The acl resource allows you to configure a Tailscale policy file. See https://tailscale.com/kb/1395/tailnet-policy-file for more information. Note that this resource will completely overwrite existing policy file contents for a given tailnet.
10
10
  *
11
- * If tests are defined in the ACL (the top-level "tests" section), ACL validation will occur before creation and update operations are applied.
11
+ * If tests are defined in the policy file (the top-level "tests" section), policy file validation will occur before creation and update operations are applied.
12
+ *
13
+ * > **Note:** The naming of this resource predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This resource controls a tailnet's entire policy file and not just the ACLs section within it.
12
14
  *
13
15
  * ## Example Usage
14
16
  *
@@ -17,20 +19,20 @@ const utilities = require("./utilities");
17
19
  * import * as tailscale from "@pulumi/tailscale";
18
20
  *
19
21
  * const asJson = new tailscale.Acl("as_json", {acl: JSON.stringify({
20
- * acls: [{
21
- * action: "accept",
22
- * users: ["*"],
23
- * ports: ["*:*"],
22
+ * grants: [{
23
+ * src: ["*"],
24
+ * dst: ["*"],
25
+ * ip: ["*"],
24
26
  * }],
25
27
  * })});
26
28
  * const asHujson = new tailscale.Acl("as_hujson", {acl: ` {
27
29
  * // Comments in HuJSON policy are preserved when the policy is applied.
28
- * \\"acls\\": [
30
+ * \\"grants\\": [
29
31
  * {
30
32
  * // Allow all users access to all ports.
31
- * action = \\"accept\\",
32
- * users = [\\"*\\"],
33
- * ports = [\\"*:*\\"],
33
+ * \\"src\\": [\\"*\\"],
34
+ * \\"dst\\": [\\"*\\"],
35
+ * \\"ip\\": [\\"*\\"],
34
36
  * },
35
37
  * ],
36
38
  * }
@@ -39,8 +41,6 @@ const utilities = require("./utilities");
39
41
  *
40
42
  * ## Import
41
43
  *
42
- * The `pulumi import` command can be used, for example:
43
- *
44
44
  * ID doesn't matter.
45
45
  *
46
46
  * ```sh
@@ -1,6 +1,57 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
3
  * The awsExternalId resource allows you to mint an AWS External ID that Tailscale can use to assume an AWS IAM role that you create for the purposes of allowing Tailscale to stream logs to your S3 bucket. See the logstreamConfiguration resource for more details.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as aws from "@pulumi/aws";
10
+ * import * as tailscale from "@pulumi/tailscale";
11
+ *
12
+ * const prod = new tailscale.AwsExternalId("prod", {});
13
+ * const tailscaleAssumeRole = aws.index.IamPolicyDocument({
14
+ * statement: [{
15
+ * actions: ["sts:AssumeRole"],
16
+ * principals: [{
17
+ * type: "AWS",
18
+ * identifiers: [prod.tailscaleAwsAccountId],
19
+ * }],
20
+ * condition: [{
21
+ * test: "StringEquals",
22
+ * variable: "sts:ExternalId",
23
+ * values: [prod.externalId],
24
+ * }],
25
+ * }],
26
+ * });
27
+ * const logsWriterIamRole = new aws.index.IamRole("logs_writer", {
28
+ * name: "logs-writer",
29
+ * assumeRolePolicy: tailscaleAssumeRole.json,
30
+ * });
31
+ * const configurationLogs = new tailscale.LogstreamConfiguration("configuration_logs", {
32
+ * logType: "configuration",
33
+ * destinationType: "s3",
34
+ * s3Bucket: tailscaleLogs.id,
35
+ * s3Region: "us-west-2",
36
+ * s3AuthenticationType: "rolearn",
37
+ * s3RoleArn: logsWriterIamRole.arn,
38
+ * s3ExternalId: prod.externalId,
39
+ * });
40
+ * const logsWriter = aws.index.IamPolicyDocument({
41
+ * statement: [{
42
+ * effect: "Allow",
43
+ * actions: ["s3:*"],
44
+ * resources: [
45
+ * "arn:aws:s3:::example-bucket",
46
+ * "arn:aws:s3:::example-bucket/*",
47
+ * ],
48
+ * }],
49
+ * });
50
+ * const logsWriterIamRolePolicy = new aws.index.IamRolePolicy("logs_writer", {
51
+ * role: logsWriterIamRole.id,
52
+ * policy: logsWriter.json,
53
+ * });
54
+ * ```
4
55
  */
5
56
  export declare class AwsExternalId extends pulumi.CustomResource {
6
57
  /**
package/awsExternalId.js CHANGED
@@ -7,6 +7,57 @@ const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
9
  * The awsExternalId resource allows you to mint an AWS External ID that Tailscale can use to assume an AWS IAM role that you create for the purposes of allowing Tailscale to stream logs to your S3 bucket. See the logstreamConfiguration resource for more details.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as aws from "@pulumi/aws";
16
+ * import * as tailscale from "@pulumi/tailscale";
17
+ *
18
+ * const prod = new tailscale.AwsExternalId("prod", {});
19
+ * const tailscaleAssumeRole = aws.index.IamPolicyDocument({
20
+ * statement: [{
21
+ * actions: ["sts:AssumeRole"],
22
+ * principals: [{
23
+ * type: "AWS",
24
+ * identifiers: [prod.tailscaleAwsAccountId],
25
+ * }],
26
+ * condition: [{
27
+ * test: "StringEquals",
28
+ * variable: "sts:ExternalId",
29
+ * values: [prod.externalId],
30
+ * }],
31
+ * }],
32
+ * });
33
+ * const logsWriterIamRole = new aws.index.IamRole("logs_writer", {
34
+ * name: "logs-writer",
35
+ * assumeRolePolicy: tailscaleAssumeRole.json,
36
+ * });
37
+ * const configurationLogs = new tailscale.LogstreamConfiguration("configuration_logs", {
38
+ * logType: "configuration",
39
+ * destinationType: "s3",
40
+ * s3Bucket: tailscaleLogs.id,
41
+ * s3Region: "us-west-2",
42
+ * s3AuthenticationType: "rolearn",
43
+ * s3RoleArn: logsWriterIamRole.arn,
44
+ * s3ExternalId: prod.externalId,
45
+ * });
46
+ * const logsWriter = aws.index.IamPolicyDocument({
47
+ * statement: [{
48
+ * effect: "Allow",
49
+ * actions: ["s3:*"],
50
+ * resources: [
51
+ * "arn:aws:s3:::example-bucket",
52
+ * "arn:aws:s3:::example-bucket/*",
53
+ * ],
54
+ * }],
55
+ * });
56
+ * const logsWriterIamRolePolicy = new aws.index.IamRolePolicy("logs_writer", {
57
+ * role: logsWriterIamRole.id,
58
+ * policy: logsWriter.json,
59
+ * });
60
+ * ```
10
61
  */
11
62
  class AwsExternalId extends pulumi.CustomResource {
12
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"awsExternalId.js","sourceRoot":"","sources":["../awsExternalId.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;GAEG;AACH,MAAa,aAAc,SAAQ,MAAM,CAAC,cAAc;IACpD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA0B,EAAE,IAAmC;QACxH,OAAO,IAAI,aAAa,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACpE,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,aAAa,CAAC,YAAY,CAAC;IAC9D,CAAC;IAmBD,YAAY,IAAY,EAAE,WAAoD,EAAE,IAAmC;QAC/G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA6C,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,KAAK,EAAE,UAAU,CAAC;YACjD,cAAc,CAAC,uBAAuB,CAAC,GAAG,KAAK,EAAE,qBAAqB,CAAC;SAC1E;aAAM;YACH,M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AC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA6C,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,KAAK,EAAE,UAAU,CAAC;YACjD,cAAc,CAAC,uBAAuB,CAAC,GAAG,KAAK,EAAE,qBAAqB,CAAC;SAC1E;aAAM;YACH,MAAM,IAAI,GAAG,WAA4C,CAAC;YAC1D,cAAc,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YACjD,cAAc,CAAC,uBAAuB,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAC/D;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;;AA3DL,sCA4DC;AA9CG,gBAAgB;AACO,0BAAY,GAAG,6CAA6C,CAAC"}
@@ -0,0 +1,182 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * The federatedIdentity resource allows you to create federated identities to programmatically interact with the Tailscale API using workload identity federation.
4
+ *
5
+ * ## Example Usage
6
+ *
7
+ * ```typescript
8
+ * import * as pulumi from "@pulumi/pulumi";
9
+ * import * as tailscale from "@pulumi/tailscale";
10
+ *
11
+ * const exampleFederatedIdentity = new tailscale.FederatedIdentity("example_federated_identity", {
12
+ * description: "Example federated identity",
13
+ * scopes: [
14
+ * "auth_keys",
15
+ * "devices:core",
16
+ * ],
17
+ * tags: ["tag:test"],
18
+ * issuer: "https://example.com",
19
+ * subject: "example-sub-*",
20
+ * customClaimRules: {
21
+ * repo_name: "example-repo-name",
22
+ * },
23
+ * });
24
+ * ```
25
+ *
26
+ * ## Import
27
+ *
28
+ * The `pulumi import` command can be used, for example:
29
+ *
30
+ * ```sh
31
+ * $ pulumi import tailscale:index/federatedIdentity:FederatedIdentity example k1234511CNTRL-kZDRvszg8621CNTRL
32
+ * ```
33
+ */
34
+ export declare class FederatedIdentity extends pulumi.CustomResource {
35
+ /**
36
+ * Get an existing FederatedIdentity resource's state with the given name, ID, and optional extra
37
+ * properties used to qualify the lookup.
38
+ *
39
+ * @param name The _unique_ name of the resulting resource.
40
+ * @param id The _unique_ provider ID of the resource to lookup.
41
+ * @param state Any extra arguments used during the lookup.
42
+ * @param opts Optional settings to control the behavior of the CustomResource.
43
+ */
44
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FederatedIdentityState, opts?: pulumi.CustomResourceOptions): FederatedIdentity;
45
+ /**
46
+ * Returns true if the given object is an instance of FederatedIdentity. This is designed to work even
47
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
48
+ */
49
+ static isInstance(obj: any): obj is FederatedIdentity;
50
+ /**
51
+ * The value used when matching against the `aud` claim from an OIDC identity token. Specifying the audience is optional as Tailscale will generate a secure audience at creation time by default. It is recommended to let Tailscale generate the audience unless the identity provider you are integrating with requires a specific audience format.
52
+ */
53
+ readonly audience: pulumi.Output<string>;
54
+ /**
55
+ * The creation timestamp of the key in RFC3339 format
56
+ */
57
+ readonly createdAt: pulumi.Output<string>;
58
+ /**
59
+ * A map of claim names to pattern strings used to match against arbitrary claims in the OIDC identity token. Patterns can include `*` characters to match against any character.
60
+ */
61
+ readonly customClaimRules: pulumi.Output<{
62
+ [key: string]: string;
63
+ } | undefined>;
64
+ /**
65
+ * A description of the federated identity consisting of alphanumeric characters. Defaults to `""`.
66
+ */
67
+ readonly description: pulumi.Output<string | undefined>;
68
+ /**
69
+ * The issuer of the OIDC identity token used in the token exchange. Must be a valid and publicly reachable https:// URL.
70
+ */
71
+ readonly issuer: pulumi.Output<string>;
72
+ /**
73
+ * Scopes to grant to the federated identity. See https://tailscale.com/kb/1623/ for a list of available scopes.
74
+ */
75
+ readonly scopes: pulumi.Output<string[]>;
76
+ /**
77
+ * The pattern used when matching against the `sub` claim from an OIDC identity token. Patterns can include `*` characters to match against any character.
78
+ */
79
+ readonly subject: pulumi.Output<string>;
80
+ /**
81
+ * A list of tags that access tokens generated for the federated identity will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
82
+ */
83
+ readonly tags: pulumi.Output<string[] | undefined>;
84
+ /**
85
+ * The updated timestamp of the key in RFC3339 format
86
+ */
87
+ readonly updatedAt: pulumi.Output<string>;
88
+ /**
89
+ * ID of the user who created this federated identity, empty for federated identities created by other trust credentials.
90
+ */
91
+ readonly userId: pulumi.Output<string>;
92
+ /**
93
+ * Create a FederatedIdentity resource with the given unique name, arguments, and options.
94
+ *
95
+ * @param name The _unique_ name of the resource.
96
+ * @param args The arguments to use to populate this resource's properties.
97
+ * @param opts A bag of options that control this resource's behavior.
98
+ */
99
+ constructor(name: string, args: FederatedIdentityArgs, opts?: pulumi.CustomResourceOptions);
100
+ }
101
+ /**
102
+ * Input properties used for looking up and filtering FederatedIdentity resources.
103
+ */
104
+ export interface FederatedIdentityState {
105
+ /**
106
+ * The value used when matching against the `aud` claim from an OIDC identity token. Specifying the audience is optional as Tailscale will generate a secure audience at creation time by default. It is recommended to let Tailscale generate the audience unless the identity provider you are integrating with requires a specific audience format.
107
+ */
108
+ audience?: pulumi.Input<string>;
109
+ /**
110
+ * The creation timestamp of the key in RFC3339 format
111
+ */
112
+ createdAt?: pulumi.Input<string>;
113
+ /**
114
+ * A map of claim names to pattern strings used to match against arbitrary claims in the OIDC identity token. Patterns can include `*` characters to match against any character.
115
+ */
116
+ customClaimRules?: pulumi.Input<{
117
+ [key: string]: pulumi.Input<string>;
118
+ }>;
119
+ /**
120
+ * A description of the federated identity consisting of alphanumeric characters. Defaults to `""`.
121
+ */
122
+ description?: pulumi.Input<string>;
123
+ /**
124
+ * The issuer of the OIDC identity token used in the token exchange. Must be a valid and publicly reachable https:// URL.
125
+ */
126
+ issuer?: pulumi.Input<string>;
127
+ /**
128
+ * Scopes to grant to the federated identity. See https://tailscale.com/kb/1623/ for a list of available scopes.
129
+ */
130
+ scopes?: pulumi.Input<pulumi.Input<string>[]>;
131
+ /**
132
+ * The pattern used when matching against the `sub` claim from an OIDC identity token. Patterns can include `*` characters to match against any character.
133
+ */
134
+ subject?: pulumi.Input<string>;
135
+ /**
136
+ * A list of tags that access tokens generated for the federated identity will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
137
+ */
138
+ tags?: pulumi.Input<pulumi.Input<string>[]>;
139
+ /**
140
+ * The updated timestamp of the key in RFC3339 format
141
+ */
142
+ updatedAt?: pulumi.Input<string>;
143
+ /**
144
+ * ID of the user who created this federated identity, empty for federated identities created by other trust credentials.
145
+ */
146
+ userId?: pulumi.Input<string>;
147
+ }
148
+ /**
149
+ * The set of arguments for constructing a FederatedIdentity resource.
150
+ */
151
+ export interface FederatedIdentityArgs {
152
+ /**
153
+ * The value used when matching against the `aud` claim from an OIDC identity token. Specifying the audience is optional as Tailscale will generate a secure audience at creation time by default. It is recommended to let Tailscale generate the audience unless the identity provider you are integrating with requires a specific audience format.
154
+ */
155
+ audience?: pulumi.Input<string>;
156
+ /**
157
+ * A map of claim names to pattern strings used to match against arbitrary claims in the OIDC identity token. Patterns can include `*` characters to match against any character.
158
+ */
159
+ customClaimRules?: pulumi.Input<{
160
+ [key: string]: pulumi.Input<string>;
161
+ }>;
162
+ /**
163
+ * A description of the federated identity consisting of alphanumeric characters. Defaults to `""`.
164
+ */
165
+ description?: pulumi.Input<string>;
166
+ /**
167
+ * The issuer of the OIDC identity token used in the token exchange. Must be a valid and publicly reachable https:// URL.
168
+ */
169
+ issuer: pulumi.Input<string>;
170
+ /**
171
+ * Scopes to grant to the federated identity. See https://tailscale.com/kb/1623/ for a list of available scopes.
172
+ */
173
+ scopes: pulumi.Input<pulumi.Input<string>[]>;
174
+ /**
175
+ * The pattern used when matching against the `sub` claim from an OIDC identity token. Patterns can include `*` characters to match against any character.
176
+ */
177
+ subject: pulumi.Input<string>;
178
+ /**
179
+ * A list of tags that access tokens generated for the federated identity will be able to assign to devices. Mandatory if the scopes include "devices:core" or "authKeys".
180
+ */
181
+ tags?: pulumi.Input<pulumi.Input<string>[]>;
182
+ }
@@ -0,0 +1,108 @@
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.FederatedIdentity = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * The federatedIdentity resource allows you to create federated identities to programmatically interact with the Tailscale API using workload identity federation.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as tailscale from "@pulumi/tailscale";
16
+ *
17
+ * const exampleFederatedIdentity = new tailscale.FederatedIdentity("example_federated_identity", {
18
+ * description: "Example federated identity",
19
+ * scopes: [
20
+ * "auth_keys",
21
+ * "devices:core",
22
+ * ],
23
+ * tags: ["tag:test"],
24
+ * issuer: "https://example.com",
25
+ * subject: "example-sub-*",
26
+ * customClaimRules: {
27
+ * repo_name: "example-repo-name",
28
+ * },
29
+ * });
30
+ * ```
31
+ *
32
+ * ## Import
33
+ *
34
+ * The `pulumi import` command can be used, for example:
35
+ *
36
+ * ```sh
37
+ * $ pulumi import tailscale:index/federatedIdentity:FederatedIdentity example k1234511CNTRL-kZDRvszg8621CNTRL
38
+ * ```
39
+ */
40
+ class FederatedIdentity extends pulumi.CustomResource {
41
+ /**
42
+ * Get an existing FederatedIdentity resource's state with the given name, ID, and optional extra
43
+ * properties used to qualify the lookup.
44
+ *
45
+ * @param name The _unique_ name of the resulting resource.
46
+ * @param id The _unique_ provider ID of the resource to lookup.
47
+ * @param state Any extra arguments used during the lookup.
48
+ * @param opts Optional settings to control the behavior of the CustomResource.
49
+ */
50
+ static get(name, id, state, opts) {
51
+ return new FederatedIdentity(name, state, { ...opts, id: id });
52
+ }
53
+ /**
54
+ * Returns true if the given object is an instance of FederatedIdentity. This is designed to work even
55
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
56
+ */
57
+ static isInstance(obj) {
58
+ if (obj === undefined || obj === null) {
59
+ return false;
60
+ }
61
+ return obj['__pulumiType'] === FederatedIdentity.__pulumiType;
62
+ }
63
+ constructor(name, argsOrState, opts) {
64
+ let resourceInputs = {};
65
+ opts = opts || {};
66
+ if (opts.id) {
67
+ const state = argsOrState;
68
+ resourceInputs["audience"] = state?.audience;
69
+ resourceInputs["createdAt"] = state?.createdAt;
70
+ resourceInputs["customClaimRules"] = state?.customClaimRules;
71
+ resourceInputs["description"] = state?.description;
72
+ resourceInputs["issuer"] = state?.issuer;
73
+ resourceInputs["scopes"] = state?.scopes;
74
+ resourceInputs["subject"] = state?.subject;
75
+ resourceInputs["tags"] = state?.tags;
76
+ resourceInputs["updatedAt"] = state?.updatedAt;
77
+ resourceInputs["userId"] = state?.userId;
78
+ }
79
+ else {
80
+ const args = argsOrState;
81
+ if (args?.issuer === undefined && !opts.urn) {
82
+ throw new Error("Missing required property 'issuer'");
83
+ }
84
+ if (args?.scopes === undefined && !opts.urn) {
85
+ throw new Error("Missing required property 'scopes'");
86
+ }
87
+ if (args?.subject === undefined && !opts.urn) {
88
+ throw new Error("Missing required property 'subject'");
89
+ }
90
+ resourceInputs["audience"] = args?.audience;
91
+ resourceInputs["customClaimRules"] = args?.customClaimRules;
92
+ resourceInputs["description"] = args?.description;
93
+ resourceInputs["issuer"] = args?.issuer;
94
+ resourceInputs["scopes"] = args?.scopes;
95
+ resourceInputs["subject"] = args?.subject;
96
+ resourceInputs["tags"] = args?.tags;
97
+ resourceInputs["createdAt"] = undefined /*out*/;
98
+ resourceInputs["updatedAt"] = undefined /*out*/;
99
+ resourceInputs["userId"] = undefined /*out*/;
100
+ }
101
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
102
+ super(FederatedIdentity.__pulumiType, name, resourceInputs, opts);
103
+ }
104
+ }
105
+ exports.FederatedIdentity = FederatedIdentity;
106
+ /** @internal */
107
+ FederatedIdentity.__pulumiType = 'tailscale:index/federatedIdentity:FederatedIdentity';
108
+ //# sourceMappingURL=federatedIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"federatedIdentity.js","sourceRoot":"","sources":["../federatedIdentity.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,iBAAkB,SAAQ,MAAM,CAAC,cAAc;IACxD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA8B,EAAE,IAAmC;QAC5H,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAO,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IACxE,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,iBAAiB,CAAC,YAAY,CAAC;IAClE,CAAC;IAmDD,YAAY,IAAY,EAAE,WAA4D,EAAE,IAAmC;QACvH,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAiD,CAAC;YAChE,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC;YAC7C,cAAc,CAAC,WAAW,CAAC,GAAG,KAAK,EAAE,SAAS,CAAC;YAC/C,cAAc,CAAC,kBAAkB,CAAC,GAAG,KAAK,EAAE,gBAAgB,CAAC;YAC7D,cAAc,CAAC,aAAa,CAAC,GAAG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c,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,IAAI,CAAC;YACpC,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;YAChD,cAAc,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;SAChD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,iBAAiB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACtE,CAAC;;AApHL,8CAqHC;AAvGG,gBAAgB;AACO,8BAAY,GAAG,qDAAqD,CAAC"}
package/getAcl.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as pulumi from "@pulumi/pulumi";
2
2
  /**
3
- * The acl data source gets the Tailscale ACL for a tailnet
3
+ * The acl data source gets the Tailscale policy file for a tailnet
4
+ *
5
+ * > **Note:** The naming of this data source predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This data source fetches a tailnet's entire policy file and not just the ACLs section within it.
4
6
  */
5
7
  export declare function getAcl(opts?: pulumi.InvokeOptions): Promise<GetAclResult>;
6
8
  /**
@@ -21,6 +23,8 @@ export interface GetAclResult {
21
23
  readonly json: string;
22
24
  }
23
25
  /**
24
- * The acl data source gets the Tailscale ACL for a tailnet
26
+ * The acl data source gets the Tailscale policy file for a tailnet
27
+ *
28
+ * > **Note:** The naming of this data source predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This data source fetches a tailnet's entire policy file and not just the ACLs section within it.
25
29
  */
26
30
  export declare function getAclOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAclResult>;
package/getAcl.js CHANGED
@@ -6,7 +6,9 @@ exports.getAclOutput = exports.getAcl = void 0;
6
6
  const pulumi = require("@pulumi/pulumi");
7
7
  const utilities = require("./utilities");
8
8
  /**
9
- * The acl data source gets the Tailscale ACL for a tailnet
9
+ * The acl data source gets the Tailscale policy file for a tailnet
10
+ *
11
+ * > **Note:** The naming of this data source predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This data source fetches a tailnet's entire policy file and not just the ACLs section within it.
10
12
  */
11
13
  function getAcl(opts) {
12
14
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
@@ -14,7 +16,9 @@ function getAcl(opts) {
14
16
  }
15
17
  exports.getAcl = getAcl;
16
18
  /**
17
- * The acl data source gets the Tailscale ACL for a tailnet
19
+ * The acl data source gets the Tailscale policy file for a tailnet
20
+ *
21
+ * > **Note:** The naming of this data source predates Tailscale's usage of the term "policy file" to refer to the centralized configuration file for a tailnet. This data source fetches a tailnet's entire policy file and not just the ACLs section within it.
18
22
  */
19
23
  function getAclOutput(opts) {
20
24
  opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
package/getAcl.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"getAcl.js","sourceRoot":"","sources":["../getAcl.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;GAEG;AACH,SAAgB,MAAM,CAAC,IAA2B;IAC9C,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,+BAA+B,EAAE,EAC7D,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AAJD,wBAIC;AAmBD;;GAEG;AACH,SAAgB,YAAY,CAAC,IAAiC;IAC1D,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC,OAAO,CAAC,YA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