Skip to content

Commit cd80e8b

Browse files
committed
aws
1 parent 93daaab commit cd80e8b

File tree

1,343 files changed

+571242
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,343 files changed

+571242
-0
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This GitHub action can publish assets for release when a tag is created.
2+
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
3+
#
4+
# This uses an action (paultyng/ghaction-import-gpg) that assumes you set your
5+
# private key in the `GPG_PRIVATE_KEY` secret and passphrase in the `PASSPHRASE`
6+
# secret. If you would rather own your own GPG handling, please fork this action
7+
# or use an alternative one for key handling.
8+
#
9+
# You will need to pass the `--batch` flag to `gpg` in your signing step
10+
# in `goreleaser` to indicate this is being used in a non-interactive mode.
11+
#
12+
name: release
13+
on:
14+
push:
15+
tags:
16+
- 'v*'
17+
18+
jobs:
19+
goreleaser:
20+
runs-on: ubuntu-latest
21+
steps:
22+
-
23+
name: Checkout
24+
uses: actions/checkout@v2
25+
-
26+
name: Unshallow
27+
run: git fetch --prune --unshallow
28+
-
29+
name: Set up Go
30+
uses: actions/setup-go@v2
31+
with:
32+
go-version: 1.14
33+
-
34+
name: Import GPG key
35+
id: import_gpg
36+
uses: paultyng/ghaction-import-gpg@v2.1.0
37+
env:
38+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
39+
PASSPHRASE: ${{ secrets.PASSPHRASE }}
40+
-
41+
name: Run GoReleaser
42+
uses: goreleaser/goreleaser-action@v2
43+
with:
44+
version: latest
45+
args: release --rm-dist
46+
env:
47+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.DS_Store
2+
terraform-provider-hashicups
3+
bin
4+
5+
# Local .terraform directories
6+
**/.terraform/*
7+
8+
# .tfstate files
9+
*.tfstate
10+
*.tfstate.*
11+
12+
# Crash log files
13+
crash.log
14+
15+
# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
16+
# .tfvars files are managed as part of configuration and so should be included in
17+
# version control.
18+
#
19+
# example.tfvars
20+
21+
# Ignore override files as they are usually used to override resources locally and so
22+
# are not checked in
23+
override.tf
24+
override.tf.json
25+
*_override.tf
26+
*_override.tf.json
27+
28+
# Include override files you do wish to add to version control using negated pattern
29+
#
30+
# !example_override.tf
31+
32+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
33+
# example: *tfplan*
34+
35+
# Ignore CLI configuration files
36+
.terraformrc
37+
terraform.rc
38+
terraform

.goreleaser.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Visit https://goreleaser.com for documentation on how to customize this
2+
# behavior.
3+
before:
4+
hooks:
5+
# this is just an example and not a requirement for provider building/publishing
6+
- go mod tidy
7+
builds:
8+
- env:
9+
# goreleaser does not work with CGO, it could also complicate
10+
# usage by users in CI/CD systems like Terraform Cloud where
11+
# they are unable to install libraries.
12+
- CGO_ENABLED=0
13+
mod_timestamp: '{{ .CommitTimestamp }}'
14+
flags:
15+
- -trimpath
16+
ldflags:
17+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18+
goos:
19+
# - freebsd
20+
# - windows
21+
- linux
22+
# - darwin
23+
goarch:
24+
- amd64
25+
# - '386'
26+
# - arm
27+
# - arm64
28+
ignore:
29+
- goos: darwin
30+
goarch: '386'
31+
binary: '{{ .ProjectName }}_v{{ .Version }}'
32+
archives:
33+
- format: zip
34+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
35+
checksum:
36+
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
37+
algorithm: sha256
38+
signs:
39+
- artifacts: checksum
40+
args:
41+
# if you are using this is a GitHub action or some other automated pipeline, you
42+
# need to pass the batch flag to indicate its not interactive.
43+
- "--batch"
44+
- "--local-user"
45+
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key
46+
- "--output"
47+
- "${signature}"
48+
- "--detach-sign"
49+
- "${artifact}"
50+
release:
51+
# If you want to manually examine the release before its live, uncomment this line:
52+
# draft: true
53+
changelog:
54+
skip: true

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
TEST?=$$(go list ./... | grep -v 'vendor')
2+
HOSTNAME=github.com
3+
NAMESPACE=iterative
4+
NAME=iterative
5+
VERSION=0.1
6+
OS_ARCH=darwin_amd64
7+
#OS_ARCH=linux_amd64
8+
BINARY=terraform-provider-${NAME}
9+
10+
default: install
11+
12+
build:
13+
go build -o ${BINARY}
14+
15+
release:
16+
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
17+
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
18+
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
19+
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm
20+
GOOS=linux GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_linux_386
21+
GOOS=linux GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_linux_amd64
22+
GOOS=linux GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_linux_arm
23+
GOOS=openbsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_openbsd_386
24+
GOOS=openbsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_openbsd_amd64
25+
GOOS=solaris GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_solaris_amd64
26+
GOOS=windows GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_windows_386
27+
GOOS=windows GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_windows_amd64
28+
29+
install: build
30+
mkdir -p ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
31+
mv ${BINARY} ~/.terraform.d/plugins/${HOSTNAME}/${NAMESPACE}/${NAME}/${VERSION}/${OS_ARCH}
32+
33+
test:
34+
go test -i $(TEST) || exit 1
35+
echo $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
36+
37+
testacc:
38+
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# cml-terraform-provider
22
Terraform provider for CML
3+
4+
```sh
5+
go mod vendor
6+
make install
7+
```

examples/main.tf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
terraform {
2+
required_providers {
3+
iterative = {
4+
versions = ["0.1"]
5+
source = "github.com/iterative/iterative"
6+
}
7+
}
8+
}
9+
10+
provider "iterative" {}
11+
12+
resource "iterative_machine" "machine" {
13+
region = "us-west-1"
14+
instance_ami = "ami-03ba3948f6c37a4b0"
15+
}

go.mod

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module terraform-provider-iterative
2+
3+
go 1.14
4+
5+
require (
6+
github.com/aws/aws-sdk-go v1.34.13
7+
github.com/hashicorp/terraform-plugin-sdk/v2 v2.0.1
8+
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
9+
)

0 commit comments

Comments
 (0)