Skip to content

Commit

Permalink
SCALRCORE-28573 Docs updated to suit terraform registry
Browse files Browse the repository at this point in the history
  • Loading branch information
petroprotsakh committed Oct 9, 2023
1 parent ee02e37 commit 8c481fa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "provider_overview"
order: 0
hidden: false
---
# Scalr Provider

The Scalr Terraform provider can be used to manage objects in Scalr with Terraform.

Using the Scalr Terraform provider is a best practice as you scale your Terraform and Scalr operations. It is not required, but many customers have a Scalr admin environment and workspace(s), which use the provider to manage all other objects in Scalr.
Expand Down Expand Up @@ -54,7 +56,7 @@ If you have tokens stored in files locally, the `~/.terraform.d/credentials.tfrc

As mentioned, a best practice is to use the Scalr Terraform provider to manage objects within Scalr.

If you are using Scalr to execute the Terraform runs that call the Scalr provider, you must override a default token set for each run. The default token has minimal permissions to allow for the run execution, which means the run will fail if you don't set the `SCALR_TOKEN` variable in the workspace. It is recommended to use a [service account](/docs/identity-and-access-management#service-accounts) for the token.
If you are using Scalr to execute the Terraform runs that call the Scalr provider, you must override a default token set for each run. The default token has minimal permissions to allow for the run execution, which means the run will fail if you don't set the `SCALR_TOKEN` variable in the workspace. It is recommended to use a [service account](https://docs.scalr.io/docs/identity-and-access-management#service-accounts) for the token.

![SCALR_TOKEN Variable](https://files.readme.io/2a1d8e3-Screen_Shot_2022-11-28_at_12.19.04_PM.png)

Expand All @@ -68,4 +70,4 @@ Not sure where to get started? Take a look at the Ignite repo, which will deploy
### Optional

- `hostname` (String) The Scalr hostname to connect to. Defaults to `scalr.io`. Can be overridden by setting the `SCALR_HOSTNAME` environment variable.
- `token` (String) The token used to authenticate with Scalr. Can be overridden by setting the `SCALR_TOKEN` environment variable. See [Scalr provider configuration](/docs/scalr) for information on generating a token.
- `token` (String) The token used to authenticate with Scalr. Can be overridden by setting the `SCALR_TOKEN` environment variable. See [Scalr provider configuration](https://docs.scalr.io/docs/scalr) for information on generating a token.
2 changes: 1 addition & 1 deletion docs/resources/provider_configuration_default.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ order: 12

Manage defaults of provider configurations for environments in Scalr. Create and destroy.

**Note:** To make the provider configuration default, it must be shared with the specified environment. See the definition of the resource [`scalr_provider_configuration`](provider_configuration.md) and attribute `environments` to learn more.
**Note:** To make the provider configuration default, it must be shared with the specified environment. See the definition of the resource [`scalr_provider_configuration`](provider_resource_scalr_provider_configuration) and attribute `environments` to learn more.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion scalr/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func Provider() *schema.Provider {
Optional: true,
Description: "The token used to authenticate with Scalr." +
" Can be overridden by setting the `SCALR_TOKEN` environment variable." +
" See [Scalr provider configuration](/docs/scalr)" +
" See [Scalr provider configuration](https://docs.scalr.io/docs/scalr)" +
" for information on generating a token.",
DefaultFunc: schema.EnvDefaultFunc("SCALR_TOKEN", nil),
},
Expand Down
2 changes: 1 addition & 1 deletion scalr/resource_scalr_provider_configuration_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func resourceScalrProviderConfigurationDefault() *schema.Resource {
return &schema.Resource{
Description: "Manage defaults of provider configurations for environments in Scalr. Create and destroy." +
"\n\n**Note:** To make the provider configuration default, it must be shared with the specified environment." +
" See the definition of the resource [`scalr_provider_configuration`](provider_configuration.md)" +
" See the definition of the resource [`scalr_provider_configuration`](provider_resource_scalr_provider_configuration)" +
" and attribute `environments` to learn more.",
CreateContext: resourceScalrProviderConfigurationDefaultCreate,
ReadContext: resourceScalrProviderConfigurationDefaultRead,
Expand Down
4 changes: 3 additions & 1 deletion templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "provider_overview"
order: 0
hidden: false
---
# {{.ProviderShortName | title}} Provider

The Scalr Terraform provider can be used to manage objects in Scalr with Terraform.

Using the Scalr Terraform provider is a best practice as you scale your Terraform and Scalr operations. It is not required, but many customers have a Scalr admin environment and workspace(s), which use the provider to manage all other objects in Scalr.
Expand Down Expand Up @@ -40,7 +42,7 @@ If you have tokens stored in files locally, the `~/.terraform.d/credentials.tfrc

As mentioned, a best practice is to use the Scalr Terraform provider to manage objects within Scalr.

If you are using Scalr to execute the Terraform runs that call the Scalr provider, you must override a default token set for each run. The default token has minimal permissions to allow for the run execution, which means the run will fail if you don't set the `SCALR_TOKEN` variable in the workspace. It is recommended to use a [service account](/docs/identity-and-access-management#service-accounts) for the token.
If you are using Scalr to execute the Terraform runs that call the Scalr provider, you must override a default token set for each run. The default token has minimal permissions to allow for the run execution, which means the run will fail if you don't set the `SCALR_TOKEN` variable in the workspace. It is recommended to use a [service account](https://docs.scalr.io/docs/identity-and-access-management#service-accounts) for the token.

![SCALR_TOKEN Variable](https://files.readme.io/2a1d8e3-Screen_Shot_2022-11-28_at_12.19.04_PM.png)

Expand Down

0 comments on commit 8c481fa

Please sign in to comment.