Skip to content

Commit

Permalink
Merge pull request #195 from pulumi/stack72/v3.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stack72 authored Jul 25, 2022
2 parents 5c8d5c6 + 8d1ffa3 commit 79dee8a
Show file tree
Hide file tree
Showing 107 changed files with 6,115 additions and 837 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ yarn.lock
**/pulumiManifest.go

ci-scripts
**/schema.go
**/schema-embed.json
**/version.txt
**/nuget
**/dist
15 changes: 10 additions & 5 deletions provider/cmd/pulumi-resource-datadog/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// +build ignore
//go:build ignore

package main

import (
"encoding/json"
"fmt"
"errors"
"io/fs"
"io/ioutil"
"log"
"os"
Expand Down Expand Up @@ -49,9 +50,13 @@ func main() {
log.Fatalf("cannot reserialize schema: %v", err)
}

err = ioutil.WriteFile("./schema.go", []byte(fmt.Sprintf(`package main
var pulumiSchema = %#v
`, versionedContents)), 0600)
// Clean up schema.go as it may be present & gitignored and tolerate an error if the file isn't present.
err = os.Remove("./schema.go")
if err != nil && !errors.Is(err, fs.ErrNotExist) {
log.Fatal(err)
}

err = ioutil.WriteFile("./schema-embed.json", versionedContents, 0600)
if err != nil {
log.Fatal(err)
}
Expand Down
5 changes: 5 additions & 0 deletions provider/cmd/pulumi-resource-datadog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
package main

import (
_ "embed"

datadog "github.com/pulumi/pulumi-datadog/provider/v4"
"github.com/pulumi/pulumi-datadog/provider/v4/pkg/version"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
)

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

func main() {
tfbridge.Main("datadog", version.Version, datadog.Provider(), pulumiSchema)
}
Loading

0 comments on commit 79dee8a

Please sign in to comment.