Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: move logging to own package #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
}
},
"ionoscloud_logging_pipeline": {
"current": "ionoscloud:index/loggingPipeline:LoggingPipeline",
"current": "ionoscloud:logging/pipeline:Pipeline",
"fields": {
"log": {
"maxItemsOne": false,
Expand Down
284 changes: 142 additions & 142 deletions provider/cmd/pulumi-resource-ionoscloud/schema.json

Large diffs are not rendered by default.

26 changes: 15 additions & 11 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ const (
// registries for nodejs and python:
mainPkg = "ionoscloud"
// modules:
mainMod = "index" // the ionoscloud module
computeModule = "compute" // the ionoscloud module
dbaasModule = "dbaas" // the ionoscloud module
k8sModule = "k8s" // the ionoscloud module
certModule = "cert" // the ionoscloud module
dsaasModule = "dsaas" // the ionoscloud module
nfsModule = "nfs" // the ionoscloud module
vpnModule = "vpn" // the ionoscloud module
cdnModule = "cdn" // the ionoscloud module
dnsModule = "dns" // the ionoscloud module
cregModule = "creg" // the ionoscloud module
mainMod = "index"
computeModule = "compute"
dbaasModule = "dbaas"
k8sModule = "k8s"
certModule = "cert"
dsaasModule = "dsaas"
nfsModule = "nfs"
vpnModule = "vpn"
cdnModule = "cdn"
dnsModule = "dns"
cregModule = "creg"
loggingModule = "logging"
)

//go:embed cmd/pulumi-resource-ionoscloud/bridge-metadata.json
Expand Down Expand Up @@ -328,6 +329,9 @@ func Provider() tfbridge.ProviderInfo {
"ionoscloud_container_registry_token": {
Tok: tfbridge.MakeResource(mainPkg, cregModule, "RegistryToken"),
},
"ionoscloud_logging_pipeline": {
Tok: tfbridge.MakeResource(mainPkg, loggingModule, "Pipeline"),
},
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Inputs
namespace Pulumi.Ionoscloud.Logging.Inputs
{

public sealed class LoggingPipelineLogArgs : global::Pulumi.ResourceArgs
public sealed class PipelineLogArgs : global::Pulumi.ResourceArgs
{
[Input("destinations")]
private InputList<Inputs.LoggingPipelineLogDestinationArgs>? _destinations;
private InputList<Inputs.PipelineLogDestinationArgs>? _destinations;

/// <summary>
/// [list] The configuration of the logs datastore, a list that contains elements with the following structure:
/// </summary>
public InputList<Inputs.LoggingPipelineLogDestinationArgs> Destinations
public InputList<Inputs.PipelineLogDestinationArgs> Destinations
{
get => _destinations ?? (_destinations = new InputList<Inputs.LoggingPipelineLogDestinationArgs>());
get => _destinations ?? (_destinations = new InputList<Inputs.PipelineLogDestinationArgs>());
set => _destinations = value;
}

Expand Down Expand Up @@ -48,9 +48,9 @@ public InputList<Inputs.LoggingPipelineLogDestinationArgs> Destinations
[Input("tag", required: true)]
public Input<string> Tag { get; set; } = null!;

public LoggingPipelineLogArgs()
public PipelineLogArgs()
{
}
public static new LoggingPipelineLogArgs Empty => new LoggingPipelineLogArgs();
public static new PipelineLogArgs Empty => new PipelineLogArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Inputs
namespace Pulumi.Ionoscloud.Logging.Inputs
{

public sealed class LoggingPipelineLogDestinationArgs : global::Pulumi.ResourceArgs
public sealed class PipelineLogDestinationArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// [int] Defines the number of days a log record should be kept in loki. Works with loki destination type only. Can be one of: 7, 14, 30.
Expand All @@ -24,9 +24,9 @@ public sealed class LoggingPipelineLogDestinationArgs : global::Pulumi.ResourceA
[Input("type")]
public Input<string>? Type { get; set; }

public LoggingPipelineLogDestinationArgs()
public PipelineLogDestinationArgs()
{
}
public static new LoggingPipelineLogDestinationArgs Empty => new LoggingPipelineLogDestinationArgs();
public static new PipelineLogDestinationArgs Empty => new PipelineLogDestinationArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Inputs
namespace Pulumi.Ionoscloud.Logging.Inputs
{

public sealed class LoggingPipelineLogDestinationGetArgs : global::Pulumi.ResourceArgs
public sealed class PipelineLogDestinationGetArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// [int] Defines the number of days a log record should be kept in loki. Works with loki destination type only. Can be one of: 7, 14, 30.
Expand All @@ -24,9 +24,9 @@ public sealed class LoggingPipelineLogDestinationGetArgs : global::Pulumi.Resour
[Input("type")]
public Input<string>? Type { get; set; }

public LoggingPipelineLogDestinationGetArgs()
public PipelineLogDestinationGetArgs()
{
}
public static new LoggingPipelineLogDestinationGetArgs Empty => new LoggingPipelineLogDestinationGetArgs();
public static new PipelineLogDestinationGetArgs Empty => new PipelineLogDestinationGetArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Inputs
namespace Pulumi.Ionoscloud.Logging.Inputs
{

public sealed class LoggingPipelineLogGetArgs : global::Pulumi.ResourceArgs
public sealed class PipelineLogGetArgs : global::Pulumi.ResourceArgs
{
[Input("destinations")]
private InputList<Inputs.LoggingPipelineLogDestinationGetArgs>? _destinations;
private InputList<Inputs.PipelineLogDestinationGetArgs>? _destinations;

/// <summary>
/// [list] The configuration of the logs datastore, a list that contains elements with the following structure:
/// </summary>
public InputList<Inputs.LoggingPipelineLogDestinationGetArgs> Destinations
public InputList<Inputs.PipelineLogDestinationGetArgs> Destinations
{
get => _destinations ?? (_destinations = new InputList<Inputs.LoggingPipelineLogDestinationGetArgs>());
get => _destinations ?? (_destinations = new InputList<Inputs.PipelineLogDestinationGetArgs>());
set => _destinations = value;
}

Expand Down Expand Up @@ -48,9 +48,9 @@ public InputList<Inputs.LoggingPipelineLogDestinationGetArgs> Destinations
[Input("tag", required: true)]
public Input<string> Tag { get; set; } = null!;

public LoggingPipelineLogGetArgs()
public PipelineLogGetArgs()
{
}
public static new LoggingPipelineLogGetArgs Empty => new LoggingPipelineLogGetArgs();
public static new PipelineLogGetArgs Empty => new PipelineLogGetArgs();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Outputs
namespace Pulumi.Ionoscloud.Logging.Outputs
{

[OutputType]
public sealed class LoggingPipelineLog
public sealed class PipelineLog
{
/// <summary>
/// [list] The configuration of the logs datastore, a list that contains elements with the following structure:
/// </summary>
public readonly ImmutableArray<Outputs.LoggingPipelineLogDestination> Destinations;
public readonly ImmutableArray<Outputs.PipelineLogDestination> Destinations;
/// <summary>
/// [string] "Protocol to use as intake. Possible values are: http, tcp."
/// </summary>
Expand All @@ -35,8 +35,8 @@ public sealed class LoggingPipelineLog
public readonly string Tag;

[OutputConstructor]
private LoggingPipelineLog(
ImmutableArray<Outputs.LoggingPipelineLogDestination> destinations,
private PipelineLog(
ImmutableArray<Outputs.PipelineLogDestination> destinations,

string protocol,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud.Outputs
namespace Pulumi.Ionoscloud.Logging.Outputs
{

[OutputType]
public sealed class LoggingPipelineLogDestination
public sealed class PipelineLogDestination
{
/// <summary>
/// [int] Defines the number of days a log record should be kept in loki. Works with loki destination type only. Can be one of: 7, 14, 30.
Expand All @@ -23,7 +23,7 @@ public sealed class LoggingPipelineLogDestination
public readonly string? Type;

[OutputConstructor]
private LoggingPipelineLogDestination(
private PipelineLogDestination(
int? retentionInDays,

string? type)
Expand Down
50 changes: 25 additions & 25 deletions sdk/dotnet/LoggingPipeline.cs → sdk/dotnet/Logging/Pipeline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Ionoscloud
namespace Pulumi.Ionoscloud.Logging
{
/// <summary>
/// ## Import
Expand All @@ -23,11 +23,11 @@ namespace Pulumi.Ionoscloud
/// The resource can be imported using the `location` and `pipeline_id`, for example:
///
/// ```sh
/// $ pulumi import ionoscloud:index/loggingPipeline:LoggingPipeline example {location}:{pipeline_id}
/// $ pulumi import ionoscloud:logging/pipeline:Pipeline example {location}:{pipeline_id}
/// ```
/// </summary>
[IonoscloudResourceType("ionoscloud:index/loggingPipeline:LoggingPipeline")]
public partial class LoggingPipeline : global::Pulumi.CustomResource
[IonoscloudResourceType("ionoscloud:logging/pipeline:Pipeline")]
public partial class Pipeline : global::Pulumi.CustomResource
{
/// <summary>
/// [string] The address of the client's grafana instance.
Expand All @@ -45,7 +45,7 @@ public partial class LoggingPipeline : global::Pulumi.CustomResource
/// [list] Pipeline logs, a list that contains elements with the following structure:
/// </summary>
[Output("logs")]
public Output<ImmutableArray<Outputs.LoggingPipelineLog>> Logs { get; private set; } = null!;
public Output<ImmutableArray<Outputs.PipelineLog>> Logs { get; private set; } = null!;

/// <summary>
/// [string] The name of the Logging pipeline.
Expand All @@ -55,19 +55,19 @@ public partial class LoggingPipeline : global::Pulumi.CustomResource


/// <summary>
/// Create a LoggingPipeline resource with the given unique name, arguments, and options.
/// Create a Pipeline 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 LoggingPipeline(string name, LoggingPipelineArgs args, CustomResourceOptions? options = null)
: base("ionoscloud:index/loggingPipeline:LoggingPipeline", name, args ?? new LoggingPipelineArgs(), MakeResourceOptions(options, ""))
public Pipeline(string name, PipelineArgs args, CustomResourceOptions? options = null)
: base("ionoscloud:logging/pipeline:Pipeline", name, args ?? new PipelineArgs(), MakeResourceOptions(options, ""))
{
}

private LoggingPipeline(string name, Input<string> id, LoggingPipelineState? state = null, CustomResourceOptions? options = null)
: base("ionoscloud:index/loggingPipeline:LoggingPipeline", name, state, MakeResourceOptions(options, id))
private Pipeline(string name, Input<string> id, PipelineState? state = null, CustomResourceOptions? options = null)
: base("ionoscloud:logging/pipeline:Pipeline", name, state, MakeResourceOptions(options, id))
{
}

Expand All @@ -83,21 +83,21 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions?
return merged;
}
/// <summary>
/// Get an existing LoggingPipeline resource's state with the given name, ID, and optional extra
/// Get an existing Pipeline 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 LoggingPipeline Get(string name, Input<string> id, LoggingPipelineState? state = null, CustomResourceOptions? options = null)
public static Pipeline Get(string name, Input<string> id, PipelineState? state = null, CustomResourceOptions? options = null)
{
return new LoggingPipeline(name, id, state, options);
return new Pipeline(name, id, state, options);
}
}

public sealed class LoggingPipelineArgs : global::Pulumi.ResourceArgs
public sealed class PipelineArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// [string] The location of the Logging pipeline. Default: `de/txl` One of `de/fra`, `de/txl`, `gb/lhr`, `es/vit`, `fr/par`.
Expand All @@ -106,14 +106,14 @@ public sealed class LoggingPipelineArgs : global::Pulumi.ResourceArgs
public Input<string>? Location { get; set; }

[Input("logs", required: true)]
private InputList<Inputs.LoggingPipelineLogArgs>? _logs;
private InputList<Inputs.PipelineLogArgs>? _logs;

/// <summary>
/// [list] Pipeline logs, a list that contains elements with the following structure:
/// </summary>
public InputList<Inputs.LoggingPipelineLogArgs> Logs
public InputList<Inputs.PipelineLogArgs> Logs
{
get => _logs ?? (_logs = new InputList<Inputs.LoggingPipelineLogArgs>());
get => _logs ?? (_logs = new InputList<Inputs.PipelineLogArgs>());
set => _logs = value;
}

Expand All @@ -123,13 +123,13 @@ public InputList<Inputs.LoggingPipelineLogArgs> Logs
[Input("name")]
public Input<string>? Name { get; set; }

public LoggingPipelineArgs()
public PipelineArgs()
{
}
public static new LoggingPipelineArgs Empty => new LoggingPipelineArgs();
public static new PipelineArgs Empty => new PipelineArgs();
}

public sealed class LoggingPipelineState : global::Pulumi.ResourceArgs
public sealed class PipelineState : global::Pulumi.ResourceArgs
{
/// <summary>
/// [string] The address of the client's grafana instance.
Expand All @@ -144,14 +144,14 @@ public sealed class LoggingPipelineState : global::Pulumi.ResourceArgs
public Input<string>? Location { get; set; }

[Input("logs")]
private InputList<Inputs.LoggingPipelineLogGetArgs>? _logs;
private InputList<Inputs.PipelineLogGetArgs>? _logs;

/// <summary>
/// [list] Pipeline logs, a list that contains elements with the following structure:
/// </summary>
public InputList<Inputs.LoggingPipelineLogGetArgs> Logs
public InputList<Inputs.PipelineLogGetArgs> Logs
{
get => _logs ?? (_logs = new InputList<Inputs.LoggingPipelineLogGetArgs>());
get => _logs ?? (_logs = new InputList<Inputs.PipelineLogGetArgs>());
set => _logs = value;
}

Expand All @@ -161,9 +161,9 @@ public InputList<Inputs.LoggingPipelineLogGetArgs> Logs
[Input("name")]
public Input<string>? Name { get; set; }

public LoggingPipelineState()
public PipelineState()
{
}
public static new LoggingPipelineState Empty => new LoggingPipelineState();
public static new PipelineState Empty => new PipelineState();
}
}
1 change: 1 addition & 0 deletions sdk/dotnet/Logging/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A Pulumi package for creating and managing ionoscloud cloud resources.
Loading
Loading