Skip to content

Commit

Permalink
Reduce patch set (#357)
Browse files Browse the repository at this point in the history
#352 failed to update
automatically because of patch conflicts. This reduces the patch while
improving docs, and so makes it less likely that we will have such
conflicts in the future.
  • Loading branch information
iwahbe authored Oct 24, 2023
1 parent 2410054 commit 3251d2a
Show file tree
Hide file tree
Showing 30 changed files with 110 additions and 146 deletions.
24 changes: 24 additions & 0 deletions patches/0001-docs-fixups.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ian Wahbe <[email protected]>
Date: Tue, 24 Oct 2023 11:57:12 -0700
Subject: [PATCH] docs fixups


diff --git a/docs/resources/dashboard_list.md b/docs/resources/dashboard_list.md
index 7e38f433..6e27b53a 100644
--- a/docs/resources/dashboard_list.md
+++ b/docs/resources/dashboard_list.md
@@ -15,6 +15,11 @@ Provides a Datadog dashboard_list resource. This can be used to create and manag
```terraform
# Create a new Dashboard List with two Dashboards
resource "datadog_dashboard_list" "new_list" {
- name = "Terraform Created List"
+ depends_on = [
+ datadog_dashboard.screen,
+ datadog_dashboard.time
+ ]
+
+ name = "Automated Created List"
dash_item {
type = "custom_timeboard"
dash_id = datadog_dashboard.time.id
78 changes: 0 additions & 78 deletions patches/0001-fork.patch

This file was deleted.

16 changes: 8 additions & 8 deletions provider/cmd/pulumi-resource-datadog/schema.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package datadog

import (
// Allow embedding files
"bytes"
"context"
_ "embed"
"fmt"
Expand Down Expand Up @@ -81,6 +82,7 @@ func Provider() tfbridge.ProviderInfo {
MetadataInfo: tfbridge.NewProviderMetadata(metadata),
Version: version.Version,
UpstreamRepoPath: "./upstream",
DocRules: &tfbridge.DocRuleInfo{EditRules: docEditRules},
Resources: map[string]*tfbridge.ResourceInfo{
"datadog_dashboard": {Tok: makeResource(datadogMod, "Dashboard")},
"datadog_downtime": {Tok: makeResource(datadogMod, "Downtime")},
Expand Down Expand Up @@ -259,3 +261,15 @@ func Provider() tfbridge.ProviderInfo {

return prov
}

func docEditRules(defaults []tfbridge.DocsEdit) []tfbridge.DocsEdit {
return append(defaults, tfbridge.DocsEdit{
Path: "*",
Edit: func(_ string, b []byte) ([]byte, error) {
b = bytes.ReplaceAll(b,
[]byte("Created using the Datadog provider in Terraform"),
[]byte("Created using the Datadog provider in Pulumi"))
return b, nil
},
})
}
2 changes: 1 addition & 1 deletion sdk/dotnet/DashboardJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Pulumi.Datadog
/// {
/// Dashboard = @"{
/// ""title"":""Ordered Layout Dashboard"",
/// ""description"":""Created using the Datadog provider in Terraform"",
/// ""description"":""Created using the Datadog provider in Pulumi"",
/// ""widgets"":[
/// {
/// ""id"":719369537777170,
Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/DashboardList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace Pulumi.Datadog
/// var time = new Datadog.Dashboard("time", new()
/// {
/// Title = "TF Test Layout Dashboard",
/// Description = "Created using the Datadog provider",
/// Description = "Created using the Datadog provider in Pulumi",
/// LayoutType = "ordered",
/// IsReadOnly = true,
/// Widgets = new[]
Expand All @@ -46,7 +46,7 @@ namespace Pulumi.Datadog
/// var screen = new Datadog.Dashboard("screen", new()
/// {
/// Title = "TF Test Free Layout Dashboard",
/// Description = "Created using the Datadog provider",
/// Description = "Created using the Datadog provider in Pulumi",
/// LayoutType = "free",
/// IsReadOnly = false,
/// Widgets = new[]
Expand Down
4 changes: 2 additions & 2 deletions sdk/dotnet/GetDashboardList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static class GetDashboardList
/// {
/// test.Apply(getDashboardListResult =&gt; getDashboardListResult.Id),
/// },
/// Description = "Created using the Datadog provider in Terraform",
/// Description = "Created using the Datadog provider in Pulumi",
/// IsReadOnly = true,
/// LayoutType = "ordered",
/// Title = "TF Test Layout Dashboard",
Expand Down Expand Up @@ -92,7 +92,7 @@ public static Task<GetDashboardListResult> InvokeAsync(GetDashboardListArgs args
/// {
/// test.Apply(getDashboardListResult =&gt; getDashboardListResult.Id),
/// },
/// Description = "Created using the Datadog provider in Terraform",
/// Description = "Created using the Datadog provider in Pulumi",
/// IsReadOnly = true,
/// LayoutType = "ordered",
/// Title = "TF Test Layout Dashboard",
Expand Down
1 change: 1 addition & 0 deletions sdk/dotnet/PagerDuty/Integration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Pulumi.Datadog.PagerDuty
///
/// return await Deployment.RunAsync(() =&gt;
/// {
/// // Services as Individual Resources
/// var pd = new Datadog.PagerDuty.Integration("pd", new()
/// {
/// ApiToken = "38457822378273432587234242874",
Expand Down
6 changes: 3 additions & 3 deletions sdk/dotnet/PagerDuty/ServiceObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace Pulumi.Datadog.PagerDuty
public partial class ServiceObject : global::Pulumi.CustomResource
{
/// <summary>
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts.
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts to have it destroyed and recreated.
/// </summary>
[Output("serviceKey")]
public Output<string> ServiceKey { get; private set; } = null!;
Expand Down Expand Up @@ -106,7 +106,7 @@ public sealed class ServiceObjectArgs : global::Pulumi.ResourceArgs
private Input<string>? _serviceKey;

/// <summary>
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts.
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts to have it destroyed and recreated.
/// </summary>
public Input<string>? ServiceKey
{
Expand Down Expand Up @@ -136,7 +136,7 @@ public sealed class ServiceObjectState : global::Pulumi.ResourceArgs
private Input<string>? _serviceKey;

/// <summary>
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts.
/// Your Service name associated service key in PagerDuty. Note: Since the Datadog API never returns service keys, it is impossible to detect drifts to have it destroyed and recreated.
/// </summary>
public Input<string>? ServiceKey
{
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/datadog/dashboardJson.go

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

4 changes: 2 additions & 2 deletions sdk/go/datadog/dashboardList.go

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

2 changes: 1 addition & 1 deletion sdk/go/datadog/getDashboardList.go

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

12 changes: 6 additions & 6 deletions sdk/go/datadog/pagerduty/serviceObject.go

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

4 changes: 2 additions & 2 deletions sdk/java/src/main/java/com/pulumi/datadog/Dashboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
*
* public static void stack(Context ctx) {
* var orderedDashboard = new Dashboard(&#34;orderedDashboard&#34;, DashboardArgs.builder()
* .description(&#34;Created using the Datadog provider in Terraform&#34;)
* .description(&#34;Created using the Datadog provider in Pulumi&#34;)
* .isReadOnly(true)
* .layoutType(&#34;ordered&#34;)
* .templateVariables(
Expand Down Expand Up @@ -323,7 +323,7 @@
* .build());
*
* var freeDashboard = new Dashboard(&#34;freeDashboard&#34;, DashboardArgs.builder()
* .description(&#34;Created using the Datadog provider in Terraform&#34;)
* .description(&#34;Created using the Datadog provider in Pulumi&#34;)
* .isReadOnly(false)
* .layoutType(&#34;free&#34;)
* .templateVariables(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* .dashboard(&#34;&#34;&#34;
* {
* &#34;title&#34;:&#34;Ordered Layout Dashboard&#34;,
* &#34;description&#34;:&#34;Created using the Datadog provider in Terraform&#34;,
* &#34;description&#34;:&#34;Created using the Datadog provider in Pulumi&#34;,
* &#34;widgets&#34;:[
* {
* &#34;id&#34;:719369537777170,
Expand Down
4 changes: 2 additions & 2 deletions sdk/java/src/main/java/com/pulumi/datadog/DashboardList.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* public static void stack(Context ctx) {
* var time = new Dashboard(&#34;time&#34;, DashboardArgs.builder()
* .title(&#34;TF Test Layout Dashboard&#34;)
* .description(&#34;Created using the Datadog provider&#34;)
* .description(&#34;Created using the Datadog provider in Pulumi&#34;)
* .layoutType(&#34;ordered&#34;)
* .isReadOnly(true)
* .widgets(DashboardWidgetArgs.builder()
Expand All @@ -66,7 +66,7 @@
*
* var screen = new Dashboard(&#34;screen&#34;, DashboardArgs.builder()
* .title(&#34;TF Test Free Layout Dashboard&#34;)
* .description(&#34;Created using the Datadog provider&#34;)
* .description(&#34;Created using the Datadog provider in Pulumi&#34;)
* .layoutType(&#34;free&#34;)
* .isReadOnly(false)
* .widgets(DashboardWidgetArgs.builder()
Expand Down
Loading

0 comments on commit 3251d2a

Please sign in to comment.