Skip to content

Commit

Permalink
Simple GCP instance in go (pulumi#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBoyle committed Apr 21, 2020
1 parent c564956 commit 50026f1
Show file tree
Hide file tree
Showing 4 changed files with 372 additions and 0 deletions.
48 changes: 48 additions & 0 deletions gcp-go-instance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[![Deploy](https://get.pulumi.com/new/button.svg)](https://app.pulumi.com/new)

# GCP Instance

Create a GCP instance using Pulumi + Go.

## Running the App

1. Create a new stack:

```
$ pulumi stack init gcp-instance
```

1. Configure the project:

```
$ pulumi config set gcp:project YOURGOOGLECLOUDPROJECT
$ pulumi config set gcp:zone us-central1-a
```

1. Run `pulumi up` to preview and deploy changes:

```
$ pulumi up
Previewing update (gcp-instance):
...
Updating (gcp-instance):
Type Name Status
+ pulumi:pulumi:Stack gcp-instance created
+ └─ gcp:compute:Instance instance created
Outputs:
instanceName: "instance-6beb431"
Resources:
+ 2 created
Duration: 23s
```

1. Cleanup

```
$ pulumi destroy
$ pulumi stack rm
```
8 changes: 8 additions & 0 deletions gcp-go-instance/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module qsgcp

go 1.13

require (
github.com/pulumi/pulumi-gcp/sdk/v3 v3.0.1
github.com/pulumi/pulumi/sdk/v2 v2.0.0
)
Loading

0 comments on commit 50026f1

Please sign in to comment.