Skip to content

Commit 60df602

Browse files
authored
Merge pull request #17 from volcengine/Feat/oidc
Feat/OIDC
2 parents 3ad223c + b2c726d commit 60df602

54 files changed

Lines changed: 6819 additions & 1256 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

provider/cmd/pulumi-resource-volcengine/schema.json

Lines changed: 519 additions & 11 deletions
Large diffs are not rendered by default.

provider/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/hashicorp/terraform-plugin-sdk v1.9.1
1313
github.com/pulumi/pulumi-terraform-bridge/v3 v3.81.0
1414
github.com/pulumi/pulumi/sdk/v3 v3.113.0
15-
github.com/volcengine/terraform-provider-volcengine v0.0.176
15+
github.com/volcengine/terraform-provider-volcengine v0.0.177
1616
)
1717

1818
require (

provider/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,8 +1795,8 @@ github.com/vmihailenco/msgpack/v5 v5.4.1/go.mod h1:GaZTsDaehaPpQVyxrf5mtQlH+pc21
17951795
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
17961796
github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g=
17971797
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
1798-
github.com/volcengine/terraform-provider-volcengine v0.0.176 h1:iLs1VIP4QR3mRt4sdzK36ZHHcqArDpVnPL+rx0JSgqo=
1799-
github.com/volcengine/terraform-provider-volcengine v0.0.176/go.mod h1:nHE+W7UPw526nvKfFuuUbxRPhzFOmz2Gt37FhaYXYnI=
1798+
github.com/volcengine/terraform-provider-volcengine v0.0.177 h1:6Hr/ODqKDNU34hY3sIKuteyHwsBgDa2xvm/q/GIhwMk=
1799+
github.com/volcengine/terraform-provider-volcengine v0.0.177/go.mod h1:nHE+W7UPw526nvKfFuuUbxRPhzFOmz2Gt37FhaYXYnI=
18001800
github.com/volcengine/volc-sdk-golang v1.0.23 h1:anOslb2Qp6ywnsbyq9jqR0ljuO63kg9PY+4OehIk5R8=
18011801
github.com/volcengine/volc-sdk-golang v1.0.23/go.mod h1:AfG/PZRUkHJ9inETvbjNifTDgut25Wbkm2QoYBTbvyU=
18021802
github.com/volcengine/volcengine-go-sdk v1.0.75 h1:FLNABNe7D5adaul3hLs4Co3oFC4xqIK5+QpKAdW/49Y=

provider/resources.go

Lines changed: 1186 additions & 1181 deletions
Large diffs are not rendered by default.

sdk/dotnet/Config/Config.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ public static Pulumi.Volcengine.Config.Types.AssumeRole? AssumeRole
4949
set => _assumeRole.Set(value);
5050
}
5151

52+
private static readonly __Value<Pulumi.Volcengine.Config.Types.AssumeRoleWithOidc?> _assumeRoleWithOidc = new __Value<Pulumi.Volcengine.Config.Types.AssumeRoleWithOidc?>(() => __config.GetObject<Pulumi.Volcengine.Config.Types.AssumeRoleWithOidc>("assumeRoleWithOidc"));
53+
public static Pulumi.Volcengine.Config.Types.AssumeRoleWithOidc? AssumeRoleWithOidc
54+
{
55+
get => _assumeRoleWithOidc.Get();
56+
set => _assumeRoleWithOidc.Set(value);
57+
}
58+
5259
private static readonly __Value<string?> _customerEndpointSuffix = new __Value<string?>(() => __config.Get("customerEndpointSuffix"));
5360
/// <summary>
5461
/// CUSTOMER ENDPOINT SUFFIX for Volcengine Provider
@@ -171,6 +178,30 @@ public class AssumeRole
171178
/// </summary>
172179
public string? Policy { get; set; } = null!;
173180
}
181+
182+
public class AssumeRoleWithOidc
183+
{
184+
/// <summary>
185+
/// The duration of the session when making the AssumeRole call. Its value ranges from 900 to 43200(seconds), and default is 3600 seconds.
186+
/// </summary>
187+
public int DurationSeconds { get; set; }
188+
/// <summary>
189+
/// The OIDC token to use when making the AssumeRole call.
190+
/// </summary>
191+
public string OidcToken { get; set; }
192+
/// <summary>
193+
/// A more restrictive policy when making the AssumeRole call.
194+
/// </summary>
195+
public string? Policy { get; set; } = null!;
196+
/// <summary>
197+
/// The session name to use when making the AssumeRole call.
198+
/// </summary>
199+
public string RoleSessionName { get; set; }
200+
/// <summary>
201+
/// The TRN of the role to assume, in the format `trn:iam:${AccountId}:role/${RoleName}`.
202+
/// </summary>
203+
public string RoleTrn { get; set; }
204+
}
174205
}
175206
}
176207
}

sdk/dotnet/Iam/GetOidcProviders.cs

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
3+
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Collections.Immutable;
7+
using System.Threading.Tasks;
8+
using Pulumi.Serialization;
9+
10+
namespace Pulumi.Volcengine.Iam
11+
{
12+
public static class GetOidcProviders
13+
{
14+
/// <summary>
15+
/// Use this data source to query detailed information of iam oidc providers
16+
/// ## Example Usage
17+
///
18+
/// ```csharp
19+
/// using System.Collections.Generic;
20+
/// using System.Linq;
21+
/// using Pulumi;
22+
/// using Volcengine = Pulumi.Volcengine;
23+
///
24+
/// return await Deployment.RunAsync(() =&gt;
25+
/// {
26+
/// var foo = Volcengine.Iam.GetOidcProviders.Invoke();
27+
///
28+
/// });
29+
/// ```
30+
/// </summary>
31+
public static Task<GetOidcProvidersResult> InvokeAsync(GetOidcProvidersArgs? args = null, InvokeOptions? options = null)
32+
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetOidcProvidersResult>("volcengine:iam/getOidcProviders:getOidcProviders", args ?? new GetOidcProvidersArgs(), options.WithDefaults());
33+
34+
/// <summary>
35+
/// Use this data source to query detailed information of iam oidc providers
36+
/// ## Example Usage
37+
///
38+
/// ```csharp
39+
/// using System.Collections.Generic;
40+
/// using System.Linq;
41+
/// using Pulumi;
42+
/// using Volcengine = Pulumi.Volcengine;
43+
///
44+
/// return await Deployment.RunAsync(() =&gt;
45+
/// {
46+
/// var foo = Volcengine.Iam.GetOidcProviders.Invoke();
47+
///
48+
/// });
49+
/// ```
50+
/// </summary>
51+
public static Output<GetOidcProvidersResult> Invoke(GetOidcProvidersInvokeArgs? args = null, InvokeOptions? options = null)
52+
=> global::Pulumi.Deployment.Instance.Invoke<GetOidcProvidersResult>("volcengine:iam/getOidcProviders:getOidcProviders", args ?? new GetOidcProvidersInvokeArgs(), options.WithDefaults());
53+
}
54+
55+
56+
public sealed class GetOidcProvidersArgs : global::Pulumi.InvokeArgs
57+
{
58+
/// <summary>
59+
/// File name where to save data source results.
60+
/// </summary>
61+
[Input("outputFile")]
62+
public string? OutputFile { get; set; }
63+
64+
public GetOidcProvidersArgs()
65+
{
66+
}
67+
public static new GetOidcProvidersArgs Empty => new GetOidcProvidersArgs();
68+
}
69+
70+
public sealed class GetOidcProvidersInvokeArgs : global::Pulumi.InvokeArgs
71+
{
72+
/// <summary>
73+
/// File name where to save data source results.
74+
/// </summary>
75+
[Input("outputFile")]
76+
public Input<string>? OutputFile { get; set; }
77+
78+
public GetOidcProvidersInvokeArgs()
79+
{
80+
}
81+
public static new GetOidcProvidersInvokeArgs Empty => new GetOidcProvidersInvokeArgs();
82+
}
83+
84+
85+
[OutputType]
86+
public sealed class GetOidcProvidersResult
87+
{
88+
/// <summary>
89+
/// The provider-assigned unique ID for this managed resource.
90+
/// </summary>
91+
public readonly string Id;
92+
/// <summary>
93+
/// The collection of query.
94+
/// </summary>
95+
public readonly ImmutableArray<Outputs.GetOidcProvidersOidcProviderResult> OidcProviders;
96+
public readonly string? OutputFile;
97+
/// <summary>
98+
/// The total count of query.
99+
/// </summary>
100+
public readonly int TotalCount;
101+
102+
[OutputConstructor]
103+
private GetOidcProvidersResult(
104+
string id,
105+
106+
ImmutableArray<Outputs.GetOidcProvidersOidcProviderResult> oidcProviders,
107+
108+
string? outputFile,
109+
110+
int totalCount)
111+
{
112+
Id = id;
113+
OidcProviders = oidcProviders;
114+
OutputFile = outputFile;
115+
TotalCount = totalCount;
116+
}
117+
}
118+
}

0 commit comments

Comments
 (0)