docs: Add README.md to the Stack
This commit is contained in:
parent
9ff85d3438
commit
f62bcf101f
2 changed files with 17 additions and 0 deletions
1
README.md
Normal file
1
README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# The Flow Platform
|
16
main.go
16
main.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue