Skip to main content

AWS Resources (in Go)

A Pulumi program that demonstrates creating various AWS resources in Golang

This example lives in the pulumi/examples repository. Check out just this directory to use it:

Get started with this example
git clone --filter=blob:none --sparse https://github.com/pulumi/examples pulumi-examples
git -C pulumi-examples sparse-checkout set aws-go-resources
cd pulumi-examples/aws-go-resources

A Pulumi program that demonstrates creating various AWS resources in Golang

Deploying the App#

To deploy your infrastructure, follow the below steps.

Prerequisites#

  1. Install Go
  2. Install Pulumi
  3. Configure AWS Credentials

Steps#

After cloning this repo, from this working directory, run these commands:

  1. Next, create a new Pulumi stack, which is an isolated deployment target for this example:

    Terminal window
    pulumi stack init
  2. Set the required configuration variables for this program:

    Terminal window
    pulumi config set aws:region us-west-2
  3. Run pulumi up to preview and deploy changes:

    Terminal window
    pulumi up
    Previewing update (dev):
    ...
    Updating (dev):
    ...
    Resources:
    + 28 created
    Duration: 44s

Clean up#

  1. Run pulumi destroy to tear down all resources.

  2. To delete the stack itself, run pulumi stack rm. Note that this command deletes all deployment history from the Pulumi console.

Related

The infrastructure as code platform for any cloud.