Skip to content

Commit

Permalink
Merge pull request #126 from pulumiverse/remove-shim
Browse files Browse the repository at this point in the history
Removed shim & upgraded to TF provider v2.14.3
  • Loading branch information
ringods authored Mar 26, 2024
2 parents be8cea1 + 70d44ba commit 6fed0f1
Show file tree
Hide file tree
Showing 26 changed files with 1,047 additions and 438 deletions.
10 changes: 8 additions & 2 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VT
github.com/apache/arrow/go/v10 v10.0.1 h1:n9dERvixoC/1JjDmBcs9FPaEryoANa2sCgVFo6ez9cI=
github.com/apache/arrow/go/v11 v11.0.0 h1:hqauxvFQxww+0mEU/2XHG6LT7eZternCZq+A5Yly2uM=
github.com/apache/arrow/go/v12 v12.0.0 h1:xtZE63VWl7qLdB0JObIXvvhGjoVNrQ9ciIHG2OK5cmc=
github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw=
github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY=
github.com/apparentlymart/go-textseg v1.0.0 h1:rRmlIsPEEhUTIKQb7T++Nz/A5Q6C9IuX2wFoYVvnCs0=
github.com/apparentlymart/go-textseg/v12 v12.0.0 h1:bNEQyAGak9tojivJNkoqWErVCQbjdL7GzRt3F8NvfJ0=
Expand Down Expand Up @@ -527,8 +528,6 @@ github.com/go-ldap/ldap/v3 v3.1.10 h1:7WsKqasmPThNvdl0Q5GPpbTDD/ZD98CfuawrMIuh7q
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI=
Expand Down Expand Up @@ -723,6 +722,7 @@ github.com/grafana/grafana-openapi-client-go v0.0.0-20231127132426-27eaf0090f74
github.com/grafana/grafana-openapi-client-go v0.0.0-20231127132426-27eaf0090f74/go.mod h1:nPuLRjbjyil4xL658KpMAjKodgI0pUt/OdaCJ11lJQM=
github.com/grafana/grafana-openapi-client-go v0.0.0-20231215124113-30c79ed880b9 h1:yRvxeTz934brAilk3YaRK0f43Q079rBMU6t81ereQkI=
github.com/grafana/grafana-openapi-client-go v0.0.0-20231215124113-30c79ed880b9/go.mod h1:wc6Hbh3K2TgCUSfBC/BOzabItujtHMESZeFk5ZhdxhQ=
github.com/grafana/loki/pkg/push v0.0.0-20240305220717-0ddf6fc49d58/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0=
github.com/grafana/machine-learning-go-client v0.3.0 h1:QmDPt9kFvw7RsVZE92V4tSbng2dHsOsVsHvNczLpNy8=
github.com/grafana/machine-learning-go-client v0.3.0/go.mod h1:QFfZz8NkqVF8++skjkKQXJEZfpCYd8S0yTWJUpsLLTA=
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww=
Expand Down Expand Up @@ -808,6 +808,7 @@ github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtd
github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8=
github.com/hashicorp/terraform-plugin-framework v1.4.2 h1:P7a7VP1GZbjc4rv921Xy5OckzhoiO3ig6SGxwelD2sI=
github.com/hashicorp/terraform-plugin-framework v1.4.2/go.mod h1:GWl3InPFZi2wVQmdVnINPKys09s9mLmTZr95/ngLnbY=
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0/go.mod h1:jfHGE/gzjxYz6XoUwi/aYiiKrJDeutQNUtGQXkaHklg=
github.com/hashicorp/terraform-plugin-go v0.12.0/go.mod h1:kwhmaWHNDvT1B3QiSJdAtrB/D4RaKSY/v3r2BuoWK4M=
github.com/hashicorp/terraform-plugin-go v0.14.1/go.mod h1:Bc/K6K26BQ2FHqIELPbpKtt2CzzbQou+0UQF3/0NsCQ=
github.com/hashicorp/terraform-plugin-log v0.6.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4=
Expand Down Expand Up @@ -1079,6 +1080,7 @@ github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk=
github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA=
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM=
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI=
Expand All @@ -1090,6 +1092,7 @@ github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGy
github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ=
github.com/prometheus/common v0.47.0 h1:p5Cz0FNHo7SnWOmWmoRozVcjEp0bIVU8cV7OShpjL1k=
github.com/prometheus/common v0.47.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ=
github.com/prometheus/common/assets v0.2.0 h1:0P5OrzoHrYBOSM1OigWL3mY8ZvV2N4zIE/5AahrSrfM=
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
github.com/prometheus/exporter-toolkit v0.10.0/go.mod h1:+sVFzuvV5JDyw+Ih6p3zFxZNVnKQa3x5qPmDSiPu4ZY=
Expand All @@ -1105,6 +1108,7 @@ github.com/prometheus/prometheus v0.44.0/go.mod h1:aPsmIK3py5XammeTguyqTmuqzX/je
github.com/prometheus/prometheus v0.48.0/go.mod h1:SRw624aMAxTfryAcP8rOjg4S/sHHaetx2lyJJ2nM83g=
github.com/prometheus/prometheus v0.50.0 h1:gf+SN6jtbsZ70KkIGg7S3LuB4kHyUfatZLCGwZ1/aec=
github.com/prometheus/prometheus v0.50.0/go.mod h1:FvE8dtQ1Ww63IlyKBn1V4s+zMwF9kHkVNkQBR1pM4CU=
github.com/prometheus/prometheus v0.50.1/go.mod h1:FvE8dtQ1Ww63IlyKBn1V4s+zMwF9kHkVNkQBR1pM4CU=
github.com/prometheus/prometheus v1.8.2-0.20200727090838-6f296594a852/go.mod h1:yzkxU+U4d5ZgVH/ywg/zONKN91UPLKsKCYkcyGOBH18=
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
github.com/pulumi/pulumi-terraform-bridge/v3 v3.33.1-0.20221206123933-cdc390c674b1 h1:zzYNG7f2TDRlqDC5ppwSaLLHBviylfreHYV20++knx0=
Expand Down Expand Up @@ -1188,6 +1192,7 @@ github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfP
github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphbHd00=
github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c h1:aqg5Vm5dwtvL+YgDpBcK1ITf3o96N/K7/wsRXQnUTEs=
github.com/shurcooL/httpfs v0.0.0-20230704072500-f1e31cf0ba5c/go.mod h1:owqhoLW1qZoYLZzLnBw+QkPP9WZnjlSWihhxAJC1+/M=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
Expand Down Expand Up @@ -1347,6 +1352,7 @@ go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiW
go.opentelemetry.io/otel/sdk v1.17.0/go.mod h1:U87sE0f5vQB7hwUoW98pW5Rz4ZDuCFBZFNUBlSgmDFQ=
go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw=
go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc=
go.opentelemetry.io/otel/sdk v1.24.0/go.mod h1:KVrIYw6tEubO9E96HQpcmpTKDVn9gdv35HoYiQWGDFg=
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 h1:c5VRjxCXdQlx1HjzwGdQHzZaVI82b5EbBgOu2ljD92g=
go.opentelemetry.io/otel/sdk/metric v0.20.0 h1:7ao1wpzHRVKf0OQ7GIxiQJA6X7DLX9o14gmVon7mMK8=
go.opentelemetry.io/otel/trace v1.17.0 h1:/SWhSRHmDPOImIAetP1QAeMnZYiQXrTy4fMMYOdSKWQ=
Expand Down
96 changes: 96 additions & 0 deletions provider/cmd/pulumi-resource-grafana/bridge-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,19 @@
}
}
}
},
"notification_settings": {
"maxItemsOne": true,
"elem": {
"fields": {
"group_by": {
"maxItemsOne": false
},
"mute_timings": {
"maxItemsOne": false
}
}
}
}
}
}
Expand Down Expand Up @@ -1075,6 +1088,89 @@
}
}
},
"mux": {
"resources": {
"grafana:index/annotation:Annotation": 0,
"grafana:index/apiKey:ApiKey": 0,
"grafana:index/cloudAccessPolicy:CloudAccessPolicy": 0,
"grafana:index/cloudAccessPolicyToken:CloudAccessPolicyToken": 0,
"grafana:index/cloudApiKey:CloudApiKey": 0,
"grafana:index/cloudPluginInstallation:CloudPluginInstallation": 0,
"grafana:index/cloudStack:CloudStack": 0,
"grafana:index/cloudStackApiKey:CloudStackApiKey": 0,
"grafana:index/cloudStackServiceAccount:CloudStackServiceAccount": 0,
"grafana:index/cloudStackServiceAccountToken:CloudStackServiceAccountToken": 0,
"grafana:index/contactPoint:ContactPoint": 0,
"grafana:index/dashboard:Dashboard": 0,
"grafana:index/dashboardPermission:DashboardPermission": 0,
"grafana:index/dashboardPublic:DashboardPublic": 0,
"grafana:index/dataSource:DataSource": 0,
"grafana:index/dataSourcePermission:DataSourcePermission": 0,
"grafana:index/folder:Folder": 0,
"grafana:index/folderPermission:FolderPermission": 0,
"grafana:index/libraryPanel:LibraryPanel": 0,
"grafana:index/machineLearningHoliday:MachineLearningHoliday": 0,
"grafana:index/machineLearningJob:MachineLearningJob": 0,
"grafana:index/machineLearningOutlierDetector:MachineLearningOutlierDetector": 0,
"grafana:index/messageTemplate:MessageTemplate": 0,
"grafana:index/muteTiming:MuteTiming": 0,
"grafana:index/notificationPolicy:NotificationPolicy": 0,
"grafana:index/oncallEscalation:OncallEscalation": 0,
"grafana:index/oncallEscalationChain:OncallEscalationChain": 0,
"grafana:index/oncallIntegration:OncallIntegration": 0,
"grafana:index/oncallOnCallShift:OncallOnCallShift": 0,
"grafana:index/oncallOutgoingWebhook:OncallOutgoingWebhook": 0,
"grafana:index/oncallRoute:OncallRoute": 0,
"grafana:index/oncallSchedule:OncallSchedule": 0,
"grafana:index/organization:Organization": 0,
"grafana:index/organizationPreference:OrganizationPreference": 0,
"grafana:index/playlist:Playlist": 0,
"grafana:index/report:Report": 0,
"grafana:index/role:Role": 0,
"grafana:index/roleAssignment:RoleAssignment": 0,
"grafana:index/ruleGroup:RuleGroup": 0,
"grafana:index/sLO:SLO": 0,
"grafana:index/serviceAccount:ServiceAccount": 0,
"grafana:index/serviceAccountPermission:ServiceAccountPermission": 0,
"grafana:index/serviceAccountToken:ServiceAccountToken": 0,
"grafana:index/ssoSettings:SsoSettings": 0,
"grafana:index/syntheticMonitoringCheck:SyntheticMonitoringCheck": 0,
"grafana:index/syntheticMonitoringInstallation:SyntheticMonitoringInstallation": 0,
"grafana:index/syntheticMonitoringProbe:SyntheticMonitoringProbe": 0,
"grafana:index/team:Team": 0,
"grafana:index/teamExternalGroup:TeamExternalGroup": 0,
"grafana:index/user:User": 0
},
"functions": {
"grafana:index/getCloudIps:getCloudIps": 0,
"grafana:index/getCloudOrganization:getCloudOrganization": 0,
"grafana:index/getCloudStack:getCloudStack": 0,
"grafana:index/getDashboard:getDashboard": 0,
"grafana:index/getDashboards:getDashboards": 0,
"grafana:index/getDataSource:getDataSource": 0,
"grafana:index/getFolder:getFolder": 0,
"grafana:index/getFolders:getFolders": 0,
"grafana:index/getLibraryPanel:getLibraryPanel": 0,
"grafana:index/getOnCallSlackChannel:getOnCallSlackChannel": 0,
"grafana:index/getOncallAction:getOncallAction": 0,
"grafana:index/getOncallEscalationChain:getOncallEscalationChain": 0,
"grafana:index/getOncallOutgoingWebhook:getOncallOutgoingWebhook": 0,
"grafana:index/getOncallSchedule:getOncallSchedule": 0,
"grafana:index/getOncallTeam:getOncallTeam": 0,
"grafana:index/getOncallUser:getOncallUser": 0,
"grafana:index/getOncallUserGroup:getOncallUserGroup": 0,
"grafana:index/getOrganization:getOrganization": 0,
"grafana:index/getOrganizationPreferences:getOrganizationPreferences": 0,
"grafana:index/getRole:getRole": 0,
"grafana:index/getServiceAccount:getServiceAccount": 0,
"grafana:index/getSlos:getSlos": 0,
"grafana:index/getSyntheticMonitoringProbe:getSyntheticMonitoringProbe": 0,
"grafana:index/getSyntheticMonitoringProbes:getSyntheticMonitoringProbes": 0,
"grafana:index/getTeam:getTeam": 0,
"grafana:index/getUser:getUser": 0,
"grafana:index/getUsers:getUsers": 0
}
},
"renames": {
"resources": {
"grafana:index/annotation:Annotation": "grafana_annotation",
Expand Down
6 changes: 3 additions & 3 deletions provider/cmd/pulumi-resource-grafana/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
package main

import (
"context"
_ "embed"

"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
grafana "github.com/pulumiverse/pulumi-grafana/provider"
"github.com/pulumiverse/pulumi-grafana/provider/pkg/version"
)

//go:embed schema-embed.json
var pulumiSchema []byte

func main() {
// Modify the path to point to the new provider
tfbridge.Main("grafana", version.Version, grafana.Provider(), pulumiSchema)
tfbridge.MainWithMuxer(context.Background(), "grafana", grafana.Provider(), pulumiSchema)
}
60 changes: 54 additions & 6 deletions provider/cmd/pulumi-resource-grafana/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2475,6 +2475,10 @@
"type": "string",
"description": "Describes what state to enter when the rule's query returns No Data. Options are OK, NoData, and Alerting. Defaults to `NoData`.\n"
},
"notificationSettings": {
"$ref": "#/types/grafana:index/RuleGroupRuleNotificationSettings:RuleGroupRuleNotificationSettings",
"description": "Notification settings for the rule. If specified, it overrides the notification policies. Available since Grafana 10.4, requires feature flag 'alertingSimplifiedRouting' enabled.\n"
},
"uid": {
"type": "string",
"description": "The unique identifier of the alert rule.\n"
Expand Down Expand Up @@ -2545,6 +2549,44 @@
"to"
]
},
"grafana:index/RuleGroupRuleNotificationSettings:RuleGroupRuleNotificationSettings": {
"properties": {
"contactPoint": {
"type": "string",
"description": "The contact point to route notifications that match this rule to.\n"
},
"groupBies": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of alert labels to group alerts into notifications by. Use the special label `...` to group alerts by all labels, effectively disabling grouping. If empty, no grouping is used. If specified, requires labels 'alertname' and 'grafana_folder' to be included.\n"
},
"groupInterval": {
"type": "string",
"description": "Minimum time interval between two notifications for the same group. Default is 5 minutes.\n"
},
"groupWait": {
"type": "string",
"description": "Time to wait to buffer alerts of the same group before sending a notification. Default is 30 seconds.\n"
},
"muteTimings": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of mute timing names to apply to alerts that match this policy.\n"
},
"repeatInterval": {
"type": "string",
"description": "Minimum time interval for re-sending a notification if an alert is still firing. Default is 4 hours.\n"
}
},
"type": "object",
"required": [
"contactPoint"
]
},
"grafana:index/SLOAlerting:SLOAlerting": {
"properties": {
"annotations": {
Expand Down Expand Up @@ -5506,7 +5548,8 @@
},
"role": {
"type": "string",
"description": "The basic role of the service account in the organization.\n"
"description": "The basic role of the service account in the organization.\n",
"willReplaceOnChanges": true
},
"stackSlug": {
"type": "string",
Expand All @@ -5531,7 +5574,8 @@
},
"role": {
"type": "string",
"description": "The basic role of the service account in the organization.\n"
"description": "The basic role of the service account in the organization.\n",
"willReplaceOnChanges": true
},
"stackSlug": {
"type": "string",
Expand Down Expand Up @@ -11394,13 +11438,16 @@
"description": "A collection of values returned by getFolder.\n",
"properties": {
"id": {
"type": "integer",
"description": "The numerical ID of the Grafana folder.\n"
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
},
"orgId": {
"type": "string",
"description": "The Organization ID. If not set, the Org ID defined in the provider block will be used.\n"
},
"parentFolderUid": {
"type": "string"
},
"title": {
"type": "string",
"description": "The name of the Grafana folder.\n"
Expand All @@ -11416,10 +11463,11 @@
},
"type": "object",
"required": [
"id",
"parentFolderUid",
"title",
"uid",
"url"
"url",
"id"
]
}
},
Expand Down
5 changes: 2 additions & 3 deletions provider/cmd/pulumi-tfgen-grafana/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package main

import (
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfgen"
grafana "github.com/pulumiverse/pulumi-grafana/provider"
"github.com/pulumiverse/pulumi-grafana/provider/pkg/version"
)

func main() {
// Modify the path to point to the new provider
tfgen.Main("grafana", version.Version, grafana.Provider())
tfgen.MainWithMuxer("grafana", grafana.Provider())
}
Loading

0 comments on commit 6fed0f1

Please sign in to comment.