Skip to content

Commit

Permalink
Switch To Speakeasy generated provider (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alramech authored Jul 10, 2023
1 parent e7cb8f7 commit 6672831
Show file tree
Hide file tree
Showing 172 changed files with 9,936 additions and 4,576 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Generate

on:
workflow_dispatch: # Allows manual triggering of the workflow to generate SDK
inputs:
force:
description: "Force generation of SDKs on main branch"
type: boolean
default: false
schedule:
- cron: 0 0 * * * # Runs every day at midnight
push:
branches:
- '*'
jobs:
generate:
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-generation.yaml@v14
with:
speakeasy_version: latest
openapi_doc_auth_header: Authorization
openapi_docs: |
- https://raw.githubusercontent.com/abbeylabs/edge/main/api/openapi.yaml
languages: |
- terraform
create_release: true
force: ${{ github.event.inputs.force }}
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
openapi_doc_auth_token: ${{ secrets.EDGE_SPEC_TOKEN }}
48 changes: 3 additions & 45 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.terraform
.terraform*
*.tfstate*
# Created by https://www.toptal.com/developers/gitignore/api/go,goland+all,vim,macos,visualstudiocode,git
# Edit at https://www.toptal.com/developers/gitignore?templates=go,goland+all,vim,macos,visualstudiocode,git

### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig

# Created by git when using merge tools for conflicts
*.BACKUP.*
*.BASE.*
Expand All @@ -15,7 +16,6 @@
*_BASE_*.txt
*_LOCAL_*.txt
*_REMOTE_*.txt

### Go ###
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
Expand All @@ -26,43 +26,32 @@
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/

# Go workspace file
go.work

# Go Air live reloading
tmp/

# dotenv and direnv
.envrc
.env

### GoLand+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
Expand All @@ -71,11 +60,9 @@ tmp/
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
Expand All @@ -88,65 +75,46 @@ tmp/
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### GoLand+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.

.idea/*

!.idea/codeStyles
!.idea/runConfigurations

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
Expand All @@ -155,18 +123,15 @@ Icon
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Vim ###
# Swap
[._]*.s[a-v][a-z]
Expand All @@ -175,36 +140,29 @@ Temporary Items
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/go,goland+all,vim,macos,visualstudiocode,git
25 changes: 25 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


## 2023-06-23 20:28:15
### Changes
Based on:
- OpenAPI Doc 0.1.0
- Speakeasy CLI 1.50.1 (2.43.2) https://github.com/speakeasy-api/speakeasy

## 2023-06-23 23:30:03
### Changes
Based on:
- OpenAPI Doc 0.1.0
- Speakeasy CLI 1.50.1 (2.43.2) https://github.com/speakeasy-api/speakeasy

## 2023-07-10 19:36:58
### Changes
Based on:
- OpenAPI Doc 0.1.0
- Speakeasy CLI 1.55.0 (2.59.0) https://github.com/speakeasy-api/speakeasy

## 2023-07-10 21:58:11
### Changes
Based on:
- OpenAPI Doc 0.1.0
- Speakeasy CLI 1.55.0 (2.59.0) https://github.com/speakeasy-api/speakeasy
16 changes: 16 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!-- Start SDK Example Usage -->
## Testing the provider locally

Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.

This also allows for debuggers (e.g. delve) to be attached to the provider.

```sh
go run main.go --debug
# Copy the TF_REATTACH_PROVIDERS env var
# In a new terminal
cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```
<!-- End SDK Example Usage -->
1 change: 1 addition & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# TODO
Loading

0 comments on commit 6672831

Please sign in to comment.