Skip to content

Commit

Permalink
Upgrade to chronosphere tf provider v1.6.0 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
bg451 authored Nov 7, 2024
1 parent 8736902 commit dab9498
Show file tree
Hide file tree
Showing 11 changed files with 149 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

## v0.9.4

Added:
* Adds support for `labels` in `chronosphere_dashboard`
* Allow `chronosphere_notification_policy` resources without a `team_id`.

Fixed:
* Support dry-run validation of monitor prometheus queries that contain
dynamic expressions that aren't known at plan time.

## v0.9.3

- Allow creating `chronosphere_slack_notifier` with actions without `action_confirm_text`.
Expand Down
18 changes: 18 additions & 0 deletions provider/cmd/pulumi-resource-chronosphere/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2436,6 +2436,12 @@
"dashboardJson": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
},
Expand All @@ -2454,6 +2460,12 @@
"dashboardJson": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
},
Expand All @@ -2474,6 +2486,12 @@
"dashboardJson": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string"
},
Expand Down
2 changes: 1 addition & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ require (
github.com/charmbracelet/bubbletea v0.24.2 // indirect
github.com/charmbracelet/lipgloss v0.7.1 // indirect
github.com/cheggaaa/pb v1.0.29 // indirect
github.com/chronosphereio/terraform-provider-chronosphere v1.5.1 // indirect
github.com/chronosphereio/terraform-provider-chronosphere v1.6.0 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
Expand Down
4 changes: 2 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,8 @@ github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAc
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
github.com/cheggaaa/pb v1.0.29 h1:FckUN5ngEk2LpvuG0fw1GEFx6LtyY2pWI/Z2QgCnEYo=
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
github.com/chronosphereio/terraform-provider-chronosphere v1.5.1 h1:PBIeQv7w6FE0pywpeduYpEwDSmhx8JsxPWodx5UBzDs=
github.com/chronosphereio/terraform-provider-chronosphere v1.5.1/go.mod h1:Aj+ZF3Ncra9gNWU96t3Fk4KghEMv3h8bW8gyeWXZaSo=
github.com/chronosphereio/terraform-provider-chronosphere v1.6.0 h1:WBk3JVQeDE5GpFrR0giGEG2V2jI0lTs0mG4r698F1AU=
github.com/chronosphereio/terraform-provider-chronosphere v1.6.0/go.mod h1:Aj+ZF3Ncra9gNWU96t3Fk4KghEMv3h8bW8gyeWXZaSo=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
Expand Down
19 changes: 19 additions & 0 deletions sdk/dotnet/Dashboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public partial class Dashboard : global::Pulumi.CustomResource
[Output("dashboardJson")]
public Output<string> DashboardJson { get; private set; } = null!;

[Output("labels")]
public Output<ImmutableDictionary<string, string>?> Labels { get; private set; } = null!;

[Output("name")]
public Output<string?> Name { get; private set; } = null!;

Expand Down Expand Up @@ -77,6 +80,14 @@ public sealed class DashboardArgs : global::Pulumi.ResourceArgs
[Input("dashboardJson", required: true)]
public Input<string> DashboardJson { get; set; } = null!;

[Input("labels")]
private InputMap<string>? _labels;
public InputMap<string> Labels
{
get => _labels ?? (_labels = new InputMap<string>());
set => _labels = value;
}

[Input("name")]
public Input<string>? Name { get; set; }

Expand All @@ -97,6 +108,14 @@ public sealed class DashboardState : global::Pulumi.ResourceArgs
[Input("dashboardJson")]
public Input<string>? DashboardJson { get; set; }

[Input("labels")]
private InputMap<string>? _labels;
public InputMap<string> Labels
{
get => _labels ?? (_labels = new InputMap<string>());
set => _labels = value;
}

[Input("name")]
public Input<string>? Name { get; set; }

Expand Down
25 changes: 17 additions & 8 deletions sdk/go/chronosphere/dashboard.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.chronosphere.chronosphere.Utilities;
import io.chronosphere.chronosphere.inputs.DashboardState;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

Expand All @@ -28,6 +29,12 @@ public Output<Optional<String>> collectionId() {
public Output<String> dashboardJson() {
return this.dashboardJson;
}
@Export(name="labels", refs={Map.class,String.class}, tree="[0,1,1]")
private Output</* @Nullable */ Map<String,String>> labels;

public Output<Optional<Map<String,String>>> labels() {
return Codegen.optional(this.labels);
}
@Export(name="name", refs={String.class}, tree="[0]")
private Output</* @Nullable */ String> name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
Expand All @@ -29,6 +30,13 @@ public Output<String> dashboardJson() {
return this.dashboardJson;
}

@Import(name="labels")
private @Nullable Output<Map<String,String>> labels;

public Optional<Output<Map<String,String>>> labels() {
return Optional.ofNullable(this.labels);
}

@Import(name="name")
private @Nullable Output<String> name;

Expand All @@ -48,6 +56,7 @@ private DashboardArgs() {}
private DashboardArgs(DashboardArgs $) {
this.collectionId = $.collectionId;
this.dashboardJson = $.dashboardJson;
this.labels = $.labels;
this.name = $.name;
this.slug = $.slug;
}
Expand Down Expand Up @@ -88,6 +97,15 @@ public Builder dashboardJson(String dashboardJson) {
return dashboardJson(Output.of(dashboardJson));
}

public Builder labels(@Nullable Output<Map<String,String>> labels) {
$.labels = labels;
return this;
}

public Builder labels(Map<String,String> labels) {
return labels(Output.of(labels));
}

public Builder name(@Nullable Output<String> name) {
$.name = name;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
Expand All @@ -29,6 +30,13 @@ public Optional<Output<String>> dashboardJson() {
return Optional.ofNullable(this.dashboardJson);
}

@Import(name="labels")
private @Nullable Output<Map<String,String>> labels;

public Optional<Output<Map<String,String>>> labels() {
return Optional.ofNullable(this.labels);
}

@Import(name="name")
private @Nullable Output<String> name;

Expand All @@ -48,6 +56,7 @@ private DashboardState() {}
private DashboardState(DashboardState $) {
this.collectionId = $.collectionId;
this.dashboardJson = $.dashboardJson;
this.labels = $.labels;
this.name = $.name;
this.slug = $.slug;
}
Expand Down Expand Up @@ -88,6 +97,15 @@ public Builder dashboardJson(String dashboardJson) {
return dashboardJson(Output.of(dashboardJson));
}

public Builder labels(@Nullable Output<Map<String,String>> labels) {
$.labels = labels;
return this;
}

public Builder labels(Map<String,String> labels) {
return labels(Output.of(labels));
}

public Builder name(@Nullable Output<String> name) {
$.name = name;
return this;
Expand Down
5 changes: 5 additions & 0 deletions sdk/nodejs/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export class Dashboard extends pulumi.CustomResource {

public readonly collectionId!: pulumi.Output<string | undefined>;
public readonly dashboardJson!: pulumi.Output<string>;
public readonly labels!: pulumi.Output<{[key: string]: string} | undefined>;
public readonly name!: pulumi.Output<string | undefined>;
public readonly slug!: pulumi.Output<string>;

Expand All @@ -52,6 +53,7 @@ export class Dashboard extends pulumi.CustomResource {
const state = argsOrState as DashboardState | undefined;
resourceInputs["collectionId"] = state ? state.collectionId : undefined;
resourceInputs["dashboardJson"] = state ? state.dashboardJson : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["slug"] = state ? state.slug : undefined;
} else {
Expand All @@ -61,6 +63,7 @@ export class Dashboard extends pulumi.CustomResource {
}
resourceInputs["collectionId"] = args ? args.collectionId : undefined;
resourceInputs["dashboardJson"] = args ? args.dashboardJson : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["slug"] = args ? args.slug : undefined;
}
Expand All @@ -75,6 +78,7 @@ export class Dashboard extends pulumi.CustomResource {
export interface DashboardState {
collectionId?: pulumi.Input<string>;
dashboardJson?: pulumi.Input<string>;
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
name?: pulumi.Input<string>;
slug?: pulumi.Input<string>;
}
Expand All @@ -85,6 +89,7 @@ export interface DashboardState {
export interface DashboardArgs {
collectionId?: pulumi.Input<string>;
dashboardJson: pulumi.Input<string>;
labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
name?: pulumi.Input<string>;
slug?: pulumi.Input<string>;
}
Loading

0 comments on commit dab9498

Please sign in to comment.