-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set url in environment instead of variables (#23)
* set url in environment instead of variables * fix linter --------- Co-authored-by: Pauline ESPALIEU <[email protected]>
- Loading branch information
Pauline Espalieu
and
Pauline ESPALIEU
authored
Aug 27, 2024
1 parent
0b1ca31
commit 1bb9d10
Showing
6 changed files
with
65 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,64 @@ | ||
# Terraform Provider Autonomi | ||
|
||
The autonomi provider enables Terraform to manage autonomi resources. | ||
Use the Autonomi provider to interact with the many resources supported by Autonomi. You must configure the provider with the proper credential before you can use it. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
autonomi = { | ||
source = "hashicorp.com/intercloud/autonomi" | ||
} | ||
} | ||
} | ||
provider "autonomi" { | ||
terms_and_conditions = true | ||
} | ||
resource "autonomi_workspace" "workspace_test" { | ||
name = "Workspace created with Terraform" | ||
description = "from autonomi with <3" | ||
} | ||
``` | ||
|
||
## Authentication and Configuration | ||
|
||
Configuration for the AWS Provider can be derived from several sources, which are applied in the following order: | ||
|
||
1. Parameters in the provider configuration | ||
2. Environment variables | ||
|
||
### Provider configuration | ||
|
||
Access can be allowed by adding a personal access token to the autonomi provider block. | ||
The [terms and conditions](https://docs.autonomi-platform.com/docs/legal) must be accepted to be able to deploy resources. | ||
|
||
Usage: | ||
|
||
```terraform | ||
provider "autonomi" { | ||
terms_and_conditions = true | ||
personal_access_token = "my-personnal-access-token" | ||
} | ||
``` | ||
|
||
### Environment Variables | ||
|
||
Access can be allowed by using the `AUTONOMI_PAT` environment variables. For a local usage the variables `AUTONOMI_HOST_URL` and `AUTONOMI_CATALOG_URL` must also be set. | ||
|
||
For example: | ||
|
||
```terraform | ||
provider "autonomi" { | ||
terms_and_conditions = true | ||
} | ||
``` | ||
|
||
```bash | ||
export AUTONOMI_PAT=<my-personal-access-token> | ||
export AUTONOMI_HOST_URL=<autonomi-api-url> | ||
export AUTONOMI_CATALOG_URL=<autonomi-catalog-url> | ||
terraform plan | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
host_url = "https://api.autonomi.io" | ||
catalog_url = "https://catalog.autonomi.io" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
provider "autonomi" { | ||
host_url = var.host_url | ||
terms_and_conditions = true | ||
personal_access_token = var.pat_token | ||
catalog_url = var.catalog_url | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters