initial commit
This commit is contained in:
46
sdk/dotnet/Config/Config.cs
generated
Normal file
46
sdk/dotnet/Config/Config.cs
generated
Normal file
@@ -0,0 +1,46 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
using System;
|
||||
using System.Collections.Immutable;
|
||||
|
||||
namespace Pulumi.Xyz
|
||||
{
|
||||
public static class Config
|
||||
{
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "IDE1006", Justification =
|
||||
"Double underscore prefix used to avoid conflicts with variable names.")]
|
||||
private sealed class __Value<T>
|
||||
{
|
||||
private readonly Func<T> _getter;
|
||||
private T _value = default!;
|
||||
private bool _set;
|
||||
|
||||
public __Value(Func<T> getter)
|
||||
{
|
||||
_getter = getter;
|
||||
}
|
||||
|
||||
public T Get() => _set ? _value : _getter();
|
||||
|
||||
public void Set(T value)
|
||||
{
|
||||
_value = value;
|
||||
_set = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("xyz");
|
||||
|
||||
private static readonly __Value<Pulumi.Xyz.Region.Region?> _region = new __Value<Pulumi.Xyz.Region.Region?>(() => __config.GetObject<Pulumi.Xyz.Region.Region>("region"));
|
||||
/// <summary>
|
||||
/// A region which should be used.
|
||||
/// </summary>
|
||||
public static Pulumi.Xyz.Region.Region? Region
|
||||
{
|
||||
get => _region.Get();
|
||||
set => _region.Set(value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
1
sdk/dotnet/Config/README.md
generated
Normal file
1
sdk/dotnet/Config/README.md
generated
Normal file
@@ -0,0 +1 @@
|
||||
A Pulumi package for creating and managing xyz cloud resources.
|
||||
67
sdk/dotnet/GetDataSource.cs
generated
Normal file
67
sdk/dotnet/GetDataSource.cs
generated
Normal file
@@ -0,0 +1,67 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Threading.Tasks;
|
||||
using Pulumi.Serialization;
|
||||
|
||||
namespace Pulumi.Xyz
|
||||
{
|
||||
public static class GetDataSource
|
||||
{
|
||||
public static Task<GetDataSourceResult> InvokeAsync(GetDataSourceArgs args, InvokeOptions? options = null)
|
||||
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetDataSourceResult>("xyz:index/getDataSource:getDataSource", args ?? new GetDataSourceArgs(), options.WithDefaults());
|
||||
|
||||
public static Output<GetDataSourceResult> Invoke(GetDataSourceInvokeArgs args, InvokeOptions? options = null)
|
||||
=> global::Pulumi.Deployment.Instance.Invoke<GetDataSourceResult>("xyz:index/getDataSource:getDataSource", args ?? new GetDataSourceInvokeArgs(), options.WithDefaults());
|
||||
|
||||
public static Output<GetDataSourceResult> Invoke(GetDataSourceInvokeArgs args, InvokeOutputOptions options)
|
||||
=> global::Pulumi.Deployment.Instance.Invoke<GetDataSourceResult>("xyz:index/getDataSource:getDataSource", args ?? new GetDataSourceInvokeArgs(), options.WithDefaults());
|
||||
}
|
||||
|
||||
|
||||
public sealed class GetDataSourceArgs : global::Pulumi.InvokeArgs
|
||||
{
|
||||
[Input("sampleAttribute", required: true)]
|
||||
public string SampleAttribute { get; set; } = null!;
|
||||
|
||||
public GetDataSourceArgs()
|
||||
{
|
||||
}
|
||||
public static new GetDataSourceArgs Empty => new GetDataSourceArgs();
|
||||
}
|
||||
|
||||
public sealed class GetDataSourceInvokeArgs : global::Pulumi.InvokeArgs
|
||||
{
|
||||
[Input("sampleAttribute", required: true)]
|
||||
public Input<string> SampleAttribute { get; set; } = null!;
|
||||
|
||||
public GetDataSourceInvokeArgs()
|
||||
{
|
||||
}
|
||||
public static new GetDataSourceInvokeArgs Empty => new GetDataSourceInvokeArgs();
|
||||
}
|
||||
|
||||
|
||||
[OutputType]
|
||||
public sealed class GetDataSourceResult
|
||||
{
|
||||
/// <summary>
|
||||
/// The provider-assigned unique ID for this managed resource.
|
||||
/// </summary>
|
||||
public readonly string Id;
|
||||
public readonly string SampleAttribute;
|
||||
|
||||
[OutputConstructor]
|
||||
private GetDataSourceResult(
|
||||
string id,
|
||||
|
||||
string sampleAttribute)
|
||||
{
|
||||
Id = id;
|
||||
SampleAttribute = sampleAttribute;
|
||||
}
|
||||
}
|
||||
}
|
||||
59
sdk/dotnet/Provider.cs
generated
Normal file
59
sdk/dotnet/Provider.cs
generated
Normal file
@@ -0,0 +1,59 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Threading.Tasks;
|
||||
using Pulumi.Serialization;
|
||||
|
||||
namespace Pulumi.Xyz
|
||||
{
|
||||
/// <summary>
|
||||
/// The provider type for the xyz package. By default, resources use package-wide configuration
|
||||
/// settings, however an explicit `Provider` instance may be created and passed during resource
|
||||
/// construction to achieve fine-grained programmatic control over provider settings. See the
|
||||
/// [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
||||
/// </summary>
|
||||
[XyzResourceType("pulumi:providers:xyz")]
|
||||
public partial class Provider : global::Pulumi.ProviderResource
|
||||
{
|
||||
/// <summary>
|
||||
/// Create a Provider resource with the given unique name, arguments, and options.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">The unique name of the resource</param>
|
||||
/// <param name="args">The arguments used to populate this resource's properties</param>
|
||||
/// <param name="options">A bag of options that control this resource's behavior</param>
|
||||
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null)
|
||||
: base("xyz", name, args ?? new ProviderArgs(), MakeResourceOptions(options, ""))
|
||||
{
|
||||
}
|
||||
|
||||
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
|
||||
{
|
||||
var defaultOptions = new CustomResourceOptions
|
||||
{
|
||||
Version = Utilities.Version,
|
||||
};
|
||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||
// Override the ID if one was specified for consistency with other language SDKs.
|
||||
merged.Id = id ?? merged.Id;
|
||||
return merged;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ProviderArgs : global::Pulumi.ResourceArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// A region which should be used.
|
||||
/// </summary>
|
||||
[Input("region", json: true)]
|
||||
public Input<Pulumi.Xyz.Region.Region>? Region { get; set; }
|
||||
|
||||
public ProviderArgs()
|
||||
{
|
||||
}
|
||||
public static new ProviderArgs Empty => new ProviderArgs();
|
||||
}
|
||||
}
|
||||
61
sdk/dotnet/Pulumi.Xyz.csproj
generated
Normal file
61
sdk/dotnet/Pulumi.Xyz.csproj
generated
Normal file
@@ -0,0 +1,61 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Authors>Pulumi</Authors>
|
||||
<Company>Pulumi</Company>
|
||||
<Description>A Pulumi package for creating and managing xyz cloud resources.</Description>
|
||||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
|
||||
<PackageProjectUrl>https://www.pulumi.com</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/pulumi/pulumi-xyz</RepositoryUrl>
|
||||
<PackageIcon>logo.png</PackageIcon>
|
||||
<Version>1.0.0-alpha.0+dev</Version>
|
||||
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>1701;1702;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="version.txt" />
|
||||
<None Include="version.txt" Pack="True" PackagePath="content" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="pulumi-plugin.json" />
|
||||
<None Include="pulumi-plugin.json" Pack="True" PackagePath="content" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pulumi" Version="3.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="logo.png">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
0
sdk/dotnet/Pulumi.yaml
generated
Normal file
0
sdk/dotnet/Pulumi.yaml
generated
Normal file
1
sdk/dotnet/README.md
generated
Normal file
1
sdk/dotnet/README.md
generated
Normal file
@@ -0,0 +1 @@
|
||||
A Pulumi package for creating and managing xyz cloud resources.
|
||||
37
sdk/dotnet/Region/Enums.cs
generated
Normal file
37
sdk/dotnet/Region/Enums.cs
generated
Normal file
@@ -0,0 +1,37 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using Pulumi;
|
||||
|
||||
namespace Pulumi.Xyz.Region
|
||||
{
|
||||
[EnumType]
|
||||
public readonly struct Region : IEquatable<Region>
|
||||
{
|
||||
private readonly string _value;
|
||||
|
||||
private Region(string value)
|
||||
{
|
||||
_value = value ?? throw new ArgumentNullException(nameof(value));
|
||||
}
|
||||
|
||||
public static Region Here { get; } = new Region("HERE");
|
||||
public static Region OverThere { get; } = new Region("OVER_THERE");
|
||||
|
||||
public static bool operator ==(Region left, Region right) => left.Equals(right);
|
||||
public static bool operator !=(Region left, Region right) => !left.Equals(right);
|
||||
|
||||
public static explicit operator string(Region value) => value._value;
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override bool Equals(object? obj) => obj is Region other && Equals(other);
|
||||
public bool Equals(Region other) => string.Equals(_value, other._value, StringComparison.Ordinal);
|
||||
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
|
||||
|
||||
public override string ToString() => _value;
|
||||
}
|
||||
}
|
||||
1
sdk/dotnet/Region/README.md
generated
Normal file
1
sdk/dotnet/Region/README.md
generated
Normal file
@@ -0,0 +1 @@
|
||||
A Pulumi package for creating and managing xyz cloud resources.
|
||||
92
sdk/dotnet/Resource.cs
generated
Normal file
92
sdk/dotnet/Resource.cs
generated
Normal file
@@ -0,0 +1,92 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Threading.Tasks;
|
||||
using Pulumi.Serialization;
|
||||
|
||||
namespace Pulumi.Xyz
|
||||
{
|
||||
[XyzResourceType("xyz:index/resource:Resource")]
|
||||
public partial class Resource : global::Pulumi.CustomResource
|
||||
{
|
||||
/// <summary>
|
||||
/// Sample attribute.
|
||||
/// </summary>
|
||||
[Output("sampleAttribute")]
|
||||
public Output<string?> SampleAttribute { get; private set; } = null!;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create a Resource resource with the given unique name, arguments, and options.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">The unique name of the resource</param>
|
||||
/// <param name="args">The arguments used to populate this resource's properties</param>
|
||||
/// <param name="options">A bag of options that control this resource's behavior</param>
|
||||
public Resource(string name, ResourceArgs? args = null, CustomResourceOptions? options = null)
|
||||
: base("xyz:index/resource:Resource", name, args ?? new ResourceArgs(), MakeResourceOptions(options, ""))
|
||||
{
|
||||
}
|
||||
|
||||
private Resource(string name, Input<string> id, ResourceState? state = null, CustomResourceOptions? options = null)
|
||||
: base("xyz:index/resource:Resource", name, state, MakeResourceOptions(options, id))
|
||||
{
|
||||
}
|
||||
|
||||
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
|
||||
{
|
||||
var defaultOptions = new CustomResourceOptions
|
||||
{
|
||||
Version = Utilities.Version,
|
||||
};
|
||||
var merged = CustomResourceOptions.Merge(defaultOptions, options);
|
||||
// Override the ID if one was specified for consistency with other language SDKs.
|
||||
merged.Id = id ?? merged.Id;
|
||||
return merged;
|
||||
}
|
||||
/// <summary>
|
||||
/// Get an existing Resource resource's state with the given name, ID, and optional extra
|
||||
/// properties used to qualify the lookup.
|
||||
/// </summary>
|
||||
///
|
||||
/// <param name="name">The unique name of the resulting resource.</param>
|
||||
/// <param name="id">The unique provider ID of the resource to lookup.</param>
|
||||
/// <param name="state">Any extra arguments used during the lookup.</param>
|
||||
/// <param name="options">A bag of options that control this resource's behavior</param>
|
||||
public static Resource Get(string name, Input<string> id, ResourceState? state = null, CustomResourceOptions? options = null)
|
||||
{
|
||||
return new Resource(name, id, state, options);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ResourceArgs : global::Pulumi.ResourceArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Sample attribute.
|
||||
/// </summary>
|
||||
[Input("sampleAttribute")]
|
||||
public Input<string>? SampleAttribute { get; set; }
|
||||
|
||||
public ResourceArgs()
|
||||
{
|
||||
}
|
||||
public static new ResourceArgs Empty => new ResourceArgs();
|
||||
}
|
||||
|
||||
public sealed class ResourceState : global::Pulumi.ResourceArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Sample attribute.
|
||||
/// </summary>
|
||||
[Input("sampleAttribute")]
|
||||
public Input<string>? SampleAttribute { get; set; }
|
||||
|
||||
public ResourceState()
|
||||
{
|
||||
}
|
||||
public static new ResourceState Empty => new ResourceState();
|
||||
}
|
||||
}
|
||||
90
sdk/dotnet/Utilities.cs
generated
Normal file
90
sdk/dotnet/Utilities.cs
generated
Normal file
@@ -0,0 +1,90 @@
|
||||
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
||||
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
namespace Pulumi.Xyz
|
||||
{
|
||||
static class Utilities
|
||||
{
|
||||
public static string? GetEnv(params string[] names)
|
||||
{
|
||||
foreach (var n in names)
|
||||
{
|
||||
var value = global::System.Environment.GetEnvironmentVariable(n);
|
||||
if (value != null)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static string[] trueValues = { "1", "t", "T", "true", "TRUE", "True" };
|
||||
static string[] falseValues = { "0", "f", "F", "false", "FALSE", "False" };
|
||||
public static bool? GetEnvBoolean(params string[] names)
|
||||
{
|
||||
var s = GetEnv(names);
|
||||
if (s != null)
|
||||
{
|
||||
if (global::System.Array.IndexOf(trueValues, s) != -1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (global::System.Array.IndexOf(falseValues, s) != -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static int? GetEnvInt32(params string[] names) => int.TryParse(GetEnv(names), out int v) ? (int?)v : null;
|
||||
|
||||
public static double? GetEnvDouble(params string[] names) => double.TryParse(GetEnv(names), out double v) ? (double?)v : null;
|
||||
|
||||
[global::System.Obsolete("Please use WithDefaults instead")]
|
||||
public static global::Pulumi.InvokeOptions WithVersion(this global::Pulumi.InvokeOptions? options)
|
||||
{
|
||||
var dst = options ?? new global::Pulumi.InvokeOptions{};
|
||||
dst.Version = options?.Version ?? Version;
|
||||
return dst;
|
||||
}
|
||||
|
||||
public static global::Pulumi.InvokeOptions WithDefaults(this global::Pulumi.InvokeOptions? src)
|
||||
{
|
||||
var dst = src ?? new global::Pulumi.InvokeOptions{};
|
||||
dst.Version = src?.Version ?? Version;
|
||||
return dst;
|
||||
}
|
||||
|
||||
public static global::Pulumi.InvokeOutputOptions WithDefaults(this global::Pulumi.InvokeOutputOptions? src)
|
||||
{
|
||||
var dst = src ?? new global::Pulumi.InvokeOutputOptions{};
|
||||
dst.Version = src?.Version ?? Version;
|
||||
return dst;
|
||||
}
|
||||
|
||||
private readonly static string version;
|
||||
public static string Version => version;
|
||||
|
||||
static Utilities()
|
||||
{
|
||||
var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly;
|
||||
using var stream = assembly.GetManifestResourceStream("Pulumi.Xyz.version.txt");
|
||||
using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file"));
|
||||
version = reader.ReadToEnd().Trim();
|
||||
var parts = version.Split("\n");
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
// The first part is the provider name.
|
||||
version = parts[1].Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class XyzResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute
|
||||
{
|
||||
public XyzResourceTypeAttribute(string type) : base(type, Utilities.Version)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
3
sdk/dotnet/go.mod
generated
Normal file
3
sdk/dotnet/go.mod
generated
Normal file
@@ -0,0 +1,3 @@
|
||||
module fake_dotnet_module // Exclude this directory from Go tools
|
||||
|
||||
go 1.17
|
||||
BIN
sdk/dotnet/logo.png
generated
Normal file
BIN
sdk/dotnet/logo.png
generated
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
5
sdk/dotnet/pulumi-plugin.json
generated
Normal file
5
sdk/dotnet/pulumi-plugin.json
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"resource": true,
|
||||
"name": "xyz",
|
||||
"version": "1.0.0-alpha.0+dev"
|
||||
}
|
||||
Reference in New Issue
Block a user