2f22c1c59c
Pulumi HCL2 IR: - Add support for invokes - Add support for resource options, incl. ranged resources - Allow the apply rewriter to ignore promise-typed values - Add tests for the binder - Add support functions for TF: entries and range NodeJS codegen: - Simplify for expression codegen - Add support for invoke codegen - Add support for entries and range functions - Add tests Python codegen: - Implement codegen for most expression types - Add support for invoke codegen - Add tests
25 lines
607 B
Go
25 lines
607 B
Go
package test
|
|
|
|
import (
|
|
"io/ioutil"
|
|
"path/filepath"
|
|
|
|
"github.com/pulumi/pulumi/pkg/resource/deploy/deploytest"
|
|
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
|
|
)
|
|
|
|
func GetSchema(schemaDirectoryPath, providerName string) ([]byte, error) {
|
|
return ioutil.ReadFile(filepath.Join(schemaDirectoryPath, providerName+".json"))
|
|
}
|
|
|
|
func AWS(schemaDirectoryPath string) (plugin.Provider, error) {
|
|
schema, err := GetSchema(schemaDirectoryPath, "aws")
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &deploytest.Provider{
|
|
GetSchemaF: func(version int) ([]byte, error) {
|
|
return schema, nil
|
|
},
|
|
}, nil
|
|
}
|