Skip to content

Commit

Permalink
Docs azure e2e (#13)
Browse files Browse the repository at this point in the history
* [WIP]

* Azure docs

* Add azure support
  • Loading branch information
saamalik authored Jan 3, 2021
1 parent 42be8b7 commit f2d19c5
Show file tree
Hide file tree
Showing 41 changed files with 337 additions and 461 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ terraform.tfstate
.terraform.lock.hcl
.terraform.tfstate.lock.info
terraform.tfvars

kubeconfig_*
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,19 @@

Terraform Provider for Spectro Cloud.

## Usage

## Build provider

Run the following command to build the provider

```shell
$ go build -o terraform-provider-spectrocloud
```
For an end end-to-end example of cluster provisioning, take a look at the [examples/e2e/](examples/e2e/) directory. If your cloud of choice, doesn't
have an end-to-end example, review the corresponding _cluster_ example in [examples/resources/](examples/resources/).

## Test sample configuration
Additionally, detailed documentation on supported data sources and resources are available on the
[Terraform Spectro Cloud Provider Documentation](https://registry.terraform.io/providers/spectrocloud/spectrocloud/latest/docs).

First, build and install the provider.

```shell
$ make install
```
## Build provider

Then, navigate to the `examples` directory, and see the available examples.
Run the following command to build the provider

```shell
$ cd examples
$ go build -o terraform-provider-spectrocloud
```

For instance, navigate to the azure/e2e example and read the README.md instructions.
12 changes: 5 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ infrastructure stacks.

## Spectro Cloud account

This provider requires access to a valid Spectro Cloud account.

If you haven't already, please signup for a free Spectro Cloud account here: [Spectro Cloud Signup](https://www.spectrocloud.com/free-trial/).
This provider requires access to a valid Spectro Cloud account. Sign up for a free account [here](https://www.spectrocloud.com/free-trial/).

## Example Usage

Expand Down Expand Up @@ -58,17 +56,17 @@ project_name = "Default" # Project name (e.g: Default)
->
Be sure to populate the `username`, `password`, and other terraform vars.

Ok

-> Be sure to populate the `username`, `password`, and other terraform vars.
Copy one of the resource configuration files (e.g: spectrocloud_cluster_profile) from the _Resources_ documentation. Be sure to specify
all required parameters.

Next, run terraform using:

terraform init && terraform apply

Detailed schema definitions for each resource are listed in the _Resources_ menu on the left.

For an end-to-end example of provisioning Spectro Cloud resources, visit: [...](https://github.com).
For an end-to-end example of provisioning Spectro Cloud resources, visit:
[Spectro Cloud E2E Examples](https://github.com/spectrocloud/terraform-provider-spectrocloud/tree/main/examples/e2e).

## Support

Expand Down
6 changes: 3 additions & 3 deletions docs/resources/cloudaccount_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ description: |-
```terraform
resource "spectrocloud_cloudaccount_azure" "azure-1" {
name = "azure-1"
azure_tenant_id = "<....>"
azure_client_id = "<....>"
azure_client_secret = "<....>"
azure_tenant_id = var.azure_tenant_id
azure_client_id = var.azure_client_id
azure_client_secret = var.azure_client_secret
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/cloudaccount_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: |-
## Example Usage

```terraform
resource "spectrocloud_cloudaccount_gcp" "azure-1" {
resource "spectrocloud_cloudaccount_gcp" "gcp-1" {
name = "gcp-1"
gcp_json_credentials = var.gcp_serviceaccount_json
}
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ resource "spectrocloud_cluster_aws" "cluster" {
### Read-only

- **cloud_config_id** (String)
- **kubeconfig** (String)

<a id="nestedblock--cloud_config"></a>
### Nested Schema for `cloud_config`
Expand Down
9 changes: 1 addition & 8 deletions docs/resources/cluster_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ data "spectrocloud_cluster_profile" "profile" {
name = var.cluster_cluster_profile_name
}
# resource "spectrocloud_cloudaccount_azure" "azure-1" {
# name = "azure-1"
# azure_tenant_id = "<....>"
# azure_client_id = "<....>"
# azure_client_secret = "<....>"
# }
resource "spectrocloud_cluster_azure" "cluster" {
name = var.cluster_name
cluster_profile_id = data.spectrocloud_cluster_profile.profile.id
Expand Down Expand Up @@ -102,6 +94,7 @@ resource "spectrocloud_cluster_azure" "cluster" {
### Read-only

- **cloud_config_id** (String)
- **kubeconfig** (String)

<a id="nestedblock--cloud_config"></a>
### Nested Schema for `cloud_config`
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ resource "spectrocloud_cluster_gcp" "cluster" {
### Read-only

- **cloud_config_id** (String)
- **kubeconfig** (String)

<a id="nestedblock--cloud_config"></a>
### Nested Schema for `cloud_config`
Expand Down
1 change: 1 addition & 0 deletions docs/resources/cluster_vsphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ description: |-
### Read-only

- **cloud_config_id** (String)
- **kubeconfig** (String)

<a id="nestedblock--cloud_config"></a>
### Nested Schema for `cloud_config`
Expand Down
17 changes: 0 additions & 17 deletions examples/azure/cluster/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions examples/azure/cluster/outputs.tf

This file was deleted.

15 changes: 0 additions & 15 deletions examples/azure/cluster/providers.tf

This file was deleted.

20 changes: 0 additions & 20 deletions examples/azure/cluster/terraform.template.tfvars

This file was deleted.

47 changes: 0 additions & 47 deletions examples/azure/cluster/variables.tf

This file was deleted.

14 changes: 0 additions & 14 deletions examples/azure/clusterprofile_only/README.md

This file was deleted.

Loading

0 comments on commit f2d19c5

Please sign in to comment.