Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
soufi committed Dec 1, 2021
1 parent 0e06693 commit 0b7c4b6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 3 deletions.
45 changes: 42 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Terraform Provider Anypoint
This is the first terraform provider for anypoint platform! We aim to provide a sustainable tool to automate your actions in anypoint.

This project was initiated by Mulesoft's consultants and architects from the professional team. We welcome any volunteers interested in joining the initiative no matter where you're from !

## How it works
This provider uses the anypoint platform APIs to perform actions for each one of the implemented resources.

![alt text](resources/imgs/provider-arch.png)

We use the **anypoint client library** as an abstraction layer to perform actions on the platform.

For better maintainability and in order to speed up the development process, the **anypoint client library** is a library generated from OAS3 specifications written by the community.

The following image describes the delivery cycle:

![alt text](resources/imgs/provider-deliver.png)

The cycle is composed of 3 steps:
1. Pick one resource and understand how it works using tools like Postman, anypoint's documentation and your favorite browser's inspector.
2. Create the OAS3 specification. The specification should at least contain GET, POST and DELETE operations.
The specification should be contributed [here](https://github.com/mulesoft-consulting/anypoint-automation-client-generator). Using the OAS spec, a go module will be generated and pushed [here](https://github.com/mulesoft-consulting/anypoint-client-go).

![alt text](resources/imgs/provider-cycle.png)

3. Implement the resource and related data sources in the provider using the generated library.


## How to use
Run the following command to build the provider

```bash
Expand Down Expand Up @@ -42,7 +69,6 @@ $ terraform init && terraform apply -var-file="params.tfvars.json"
```

## Debugging mode

First build the project using
```bash
$ go build
Expand Down Expand Up @@ -70,13 +96,26 @@ $ TF_REATTACH_PROVIDERS='{"anypoint.mulesoft.com/automation/anypoint":{"Protocol
```

### How to log

Use `log` package to log. Here's an exampe:

```go
log.Println("[DEBUG] Something happened!")
```

## Documentation
In order to generate a documentation, we use [tfplugindocs](https://github.com/hashicorp/terraform-plugin-docs).


## Create Release
Follow [documentation](https://www.terraform.io/docs/registry/providers/publishing.html#using-goreleaser-locally).


## How to contribute
You can contribute by:
* Testing the tool and letting us know of any problems you encounter.
* Contributing specifications for resources [here](https://github.com/mulesoft-consulting/anypoint-automation-client-generator).
* Contributing code in the provider itself here.


Follow [documentation](https://www.terraform.io/docs/registry/providers/publishing.html#using-goreleaser-locally)
## Credits
Made with love.
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ github.com/mulesoft-consulting/cloudhub-client-go/team v0.0.2 h1:naQ90l7zyzqz+Ro
github.com/mulesoft-consulting/cloudhub-client-go/team v0.0.2/go.mod h1:qZB6apWiLUIO6mKFKcGFKEOTZZfwZyZWr6GxKoINvxo=
github.com/mulesoft-consulting/cloudhub-client-go/team v0.1.0 h1:P6RWdCQ2BGXpvVtwd9Yny1+KCDQ+KQVdacfkO1obpOE=
github.com/mulesoft-consulting/cloudhub-client-go/team v0.1.0/go.mod h1:qZB6apWiLUIO6mKFKcGFKEOTZZfwZyZWr6GxKoINvxo=
github.com/mulesoft-consulting/cloudhub-client-go/team_group_mappings v0.0.3 h1:JDDDLB3X4dEQ2CYy5A6iy8bKC45fHkdDN0PStYU5A0I=
github.com/mulesoft-consulting/cloudhub-client-go/team_group_mappings v0.0.3/go.mod h1:Pd6lr8d/gbB6BH5h2h63GeeyFRdb7scwjyXLNtLLkkM=
github.com/mulesoft-consulting/cloudhub-client-go/team_members v0.0.1 h1:8nTVcg5dW2e4O03/26k/fE8OTYFOdNbKSEqt7lz3nV8=
github.com/mulesoft-consulting/cloudhub-client-go/team_members v0.0.1/go.mod h1:bD8Vt2iDmyzPMM8vW1GnOdXLXtowLq3PuFfZ9ebUgYE=
github.com/mulesoft-consulting/cloudhub-client-go/team_members v0.0.2 h1:1Vn5kI+ggECNR2eNeIP7AKP9Kke8iFSndofQkkLwefQ=
Expand Down
Binary file added resources/imgs/provider-arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/provider-cycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/imgs/provider-deliver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b7c4b6

Please sign in to comment.