forked from pulumi/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple GCP instance in go (pulumi#659)
- Loading branch information
Showing
4 changed files
with
372 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) |
Oops, something went wrong.