Skip to content
Merged
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
3 changes: 2 additions & 1 deletion cmd/plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"type": "external",
"tier": "community",
"minEngineVersion": "0.68.2",
"minEngineVersion": "0.69.1",
"required_secrets": [
{
"name": "DIGITALOCEAN_TOKEN",
Expand All @@ -26,6 +26,7 @@
"workflow.plugin.external.iac.IaCProviderLogCapture",
"workflow.plugin.external.iac.IaCProviderRequirementMapper",
"workflow.plugin.external.iac.IaCProviderRegionLister",
"workflow.plugin.external.iac.IaCProviderOwnership",
"workflow.plugin.external.iac.IaCProviderFinalizer",
"workflow.plugin.external.iac.ResourceDriver",
"workflow.plugin.external.iac.IaCStateBackend"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/GoCodeAlone/workflow-plugin-digitalocean
go 1.26.0

require (
github.com/GoCodeAlone/workflow v0.68.2
github.com/GoCodeAlone/workflow v0.69.1
github.com/aws/aws-sdk-go-v2 v1.41.6
github.com/aws/aws-sdk-go-v2/config v1.32.16
github.com/aws/aws-sdk-go-v2/credentials v1.19.15
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ github.com/GoCodeAlone/modular/modules/jsonschema v1.17.0 h1:zoWioqUvuNNDfnjHA1s
github.com/GoCodeAlone/modular/modules/jsonschema v1.17.0/go.mod h1:GDU/jsD6AddmXKedj0wZwieUIaQsTBSGMzuj+XHXMrw=
github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.10.0 h1:+2M/ecyCxDiXfJM4ibcERuu/BBeIbLTQNcVgRsllR64=
github.com/GoCodeAlone/modular/modules/reverseproxy/v2 v2.10.0/go.mod h1:tlVH1mA5yuU8CB7R7+HXIRaBixZoNid6h+5tew5u3FU=
github.com/GoCodeAlone/workflow v0.68.2 h1:U0ksQOkIwDReuw+nz4kRoCeYwahoBaItqLzwYIRm758=
github.com/GoCodeAlone/workflow v0.68.2/go.mod h1:4UwFYm1cM8a/AvGNb1CZAuob0b0gq7552sxcNMdDALA=
github.com/GoCodeAlone/workflow v0.69.1 h1:X9smiC8ZkRAtD7d5d0IVfWEZzNfHeQPSwLtm0jcEiWI=
github.com/GoCodeAlone/workflow v0.69.1/go.mod h1:4UwFYm1cM8a/AvGNb1CZAuob0b0gq7552sxcNMdDALA=
github.com/GoCodeAlone/yaegi v0.17.2 h1:WK6Y6e0t1a6U7r+S2dN3CGWW1PizYD3zO0zneToZPxM=
github.com/GoCodeAlone/yaegi v0.17.2/go.mod h1:z5Pr6Wse6QJcQvpgxTxzMAevFarH0N37TG88Y9dprx0=
github.com/IBM/sarama v1.47.0 h1:GcQFEd12+KzfPYeLgN69Fh7vLCtYRhVIx0rO4TZO318=
Expand Down
5 changes: 5 additions & 0 deletions internal/drivers/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,15 @@ func (d *CacheDriver) Scale(ctx context.Context, ref interfaces.ResourceRef, rep
}

func cacheOutput(db *godo.Database) *interfaces.ResourceOutput {
tags := make([]any, 0, len(db.Tags))
for _, tag := range db.Tags {
tags = append(tags, tag)
}
outputs := map[string]any{
"engine": db.EngineSlug,
"region": db.RegionSlug,
"size": db.SizeSlug,
"tags": tags,
"version": db.VersionSlug,
}
if db.Connection != nil {
Expand Down
5 changes: 5 additions & 0 deletions internal/drivers/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,16 @@ func trustedSourceFirewallRulesFromConfig(cfg map[string]any) ([]*godo.DatabaseF
}

func dbOutput(db *godo.Database) *interfaces.ResourceOutput {
tags := make([]any, 0, len(db.Tags))
for _, tag := range db.Tags {
tags = append(tags, tag)
}
outputs := map[string]any{
"engine": db.EngineSlug,
"num_nodes": float64(db.NumNodes),
"region": db.RegionSlug,
"size": db.SizeSlug,
"tags": tags,
"version": db.VersionSlug,
}
if db.Connection != nil {
Expand Down
2 changes: 2 additions & 0 deletions internal/iacserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type doIaCServer struct {
pb.UnimplementedIaCProviderLogCaptureServer
pb.UnimplementedIaCProviderRequirementMapperServer
pb.UnimplementedIaCProviderRegionListerServer
pb.UnimplementedIaCProviderOwnershipServer
// pb.UnimplementedIaCProviderFinalizerServer satisfies the
// mustEmbedUnimplementedIaCProviderFinalizerServer() forward-compat
// requirement on pb.IaCProviderFinalizerServer (workflow#695 Phase 2.5).
Expand Down Expand Up @@ -121,6 +122,7 @@ var (
_ pb.IaCProviderLogCaptureServer = (*doIaCServer)(nil)
_ pb.IaCProviderRequirementMapperServer = (*doIaCServer)(nil)
_ pb.IaCProviderRegionListerServer = (*doIaCServer)(nil)
_ pb.IaCProviderOwnershipServer = (*doIaCServer)(nil)
// IaCProviderFinalizer is the workflow#695 Phase 2.5 optional service
// — DO plugin implements FinalizeApply server-side to host the
// deferred-flush iteration previously held inline in the v1
Expand Down
4 changes: 2 additions & 2 deletions internal/iacserver_mapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ func TestPluginManifestAdvertisesRequirementMapper(t *testing.T) {
if err := json.Unmarshal(data, &manifest); err != nil {
t.Fatalf("parse plugin.json: %v", err)
}
if manifest.MinEngineVersion != "0.68.2" {
t.Fatalf("minEngineVersion = %q, want 0.68.2", manifest.MinEngineVersion)
if manifest.MinEngineVersion != "0.69.1" {
t.Fatalf("minEngineVersion = %q, want 0.69.1", manifest.MinEngineVersion)
}
const mapperService = "workflow.plugin.external.iac.IaCProviderRequirementMapper"
for _, svc := range manifest.IaCServices {
Expand Down
Loading
Loading