docs: Add README.md to the Stack

This commit is contained in:
Dan Anglin 2023-02-22 22:40:12 +00:00
parent 9ff85d3438
commit f62bcf101f
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
2 changed files with 17 additions and 0 deletions

1
README.md Normal file
View file

@ -0,0 +1 @@
# The Flow Platform

16
main.go
View file

@ -2,6 +2,7 @@ package main
import (
"fmt"
"os"
"strconv"
"github.com/pulumi/pulumi-linode/sdk/v3/go/linode"
@ -44,6 +45,10 @@ func infra(ctx *pulumi.Context) error {
return fmt.Errorf("unable to manage the volumes; %w", err)
}
if err := readme(ctx); err != nil {
return fmt.Errorf("unable to add the README to the Stack; %w", err)
}
return nil
}
@ -171,3 +176,14 @@ func volumes(ctx *pulumi.Context, cfg *platform, instanceID int) error {
return nil
}
func readme(ctx *pulumi.Context) error {
readmeData, err := os.ReadFile("./README.md")
if err != nil {
return fmt.Errorf("unable to read README.md; %w", err)
}
ctx.Export("readme", pulumi.String(string(readmeData)))
return nil
}