Skip to content

Commit

Permalink
Merge branch 'develop' into feature/SCALRCORE-22796
Browse files Browse the repository at this point in the history
  • Loading branch information
ostasyuk committed Aug 9, 2022
2 parents 82a709b + 9b511db commit ba44407
Show file tree
Hide file tree
Showing 37 changed files with 139 additions and 403 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Expand Up @@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `scalr_provider_configuration` data source: added new filter argument `account_id` ([163](https://github.com/Scalr/terraform-provider-scalr/pull/163))

### Required

- scalr-server >= `8.30.0`

## [1.0.0-rc35] - 2022-08-05

### Added

- **New data source:** `scalr_tag` ([#160](https://github.com/Scalr/terraform-provider-scalr/pull/160))
- **New resource:** `scalr_tag` ([#160](https://github.com/Scalr/terraform-provider-scalr/pull/160))
- `scalr_workspace`: added new attribute `tag_ids` ([#160](https://github.com/Scalr/terraform-provider-scalr/pull/160))
Expand Down Expand Up @@ -478,7 +488,8 @@ Requires Scalr 8.0.1-beta.20200625 at least

- Initial release.

[Unreleased]: https://github.com/Scalr/terraform-provider-scalr/compare/v1.0.0-rc34...HEAD
[Unreleased]: https://github.com/Scalr/terraform-provider-scalr/compare/v1.0.0-rc35...HEAD
[1.0.0-rc34]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc34
[1.0.0-rc34]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc34
[1.0.0-rc33]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc33
[1.0.0-rc32]: https://github.com/Scalr/terraform-provider-scalr/releases/tag/v1.0.0-rc32
Expand Down
51 changes: 0 additions & 51 deletions docs/data-sources/scalr_access_policy.md

This file was deleted.

17 changes: 5 additions & 12 deletions docs/data-sources/scalr_agent_pool.md
@@ -1,14 +1,7 @@
---
layout: "scalr"
page_title: "Scalr: scalr_agent_pool"
sidebar_current: "docs-datasource-scalr-agent-pool"
description: |-
Get information on the agent pool.
---

# scalr_agent_pool Data Source
# Data Source `scalr_agent_pool`

This data source is used to retrieve details of an agent pool.
Retrieves the details of an agent pool.

## Example Usage

Expand All @@ -23,9 +16,9 @@ data "scalr_agent_pool" "default" {

## Argument Reference

* `name` - (Required) Name of the agent pool.
* `account_id` - (Required) ID of the account.
* `environment_id` - (Optional) ID of the environment.
* `name` - (Required) A name of the agent pool.
* `account_id` - (Required) An identifier of the Scalr account.
* `environment_id` - (Optional) An identifier of the Scalr environment.

## Attribute Reference

Expand Down
25 changes: 8 additions & 17 deletions docs/data-sources/scalr_current_run.md
@@ -1,14 +1,7 @@
---
layout: "scalr"
page_title: "Scalr: scalr_current_run"
sidebar_current: "docs-datasource-scalr-current-run-x"
description: |-
Get information on the current run.
---

# scalr_current_run Data Source
# Data Source `scalr_current_run`

This data source allows you to get information about the current Terraform run when using a Scalr remote backend workspace, including VCS (Git) metadata.
Allows you to get information about the current Terraform run when using a Scalr remote backend workspace, including VCS (Git) metadata.

## Example Usage

Expand All @@ -19,20 +12,18 @@ data scalr_current_run example {

## Argument Reference

No arguments required. This data source returns details of the current run.
No arguments are required. The data source returns details of the current run based on the `SCALR_RUN_ID` shell variable that is automatically exported in the Scalr remoted backend.

## Attribute Reference

All arguments plus:

* `id` - The ID of the run, in the format `run-<RANDOM STRING>`
* `environment_id` - The ID of the environment, in the format `env-<RANDOM STRING>`
* `workspace_name` - Workspace name.
* `vcs` - Contains details of the VCS configuration if the workspace is linked to a VCS repo.
* `is_destroy` - Boolean indicates if this is a "destroy" run.
* `is_dry` - Boolean indicates if this is a dry run, i.e. triggered by a Pull Request (PR). No apply phase if this is true.
* `message` - Message describing how the run was triggered
* `source` - The source of the run (VCS, api, Manual).
* `source` - The source of the run (VCS, API, Manual).

The `vcs` block contains:

Expand All @@ -44,10 +35,10 @@ The `vcs.commit` block contains:

* `message` - Message for the last commit.
* `sha` - SHA of the last commit.
* `author` - Details of the commit author.
* `author` - Details of the author of the last commit.

The `vcs.commit.author` block contains:

* `email` - email_address of author in the VCS.
* `name` - Name of author in the VCS.
* `username` - Username of author in the VCS.
* `email` - email_address of the author in the VCS.
* `name` - Name of the author in the VCS.
* `username` - Username of the author in the VCS.
17 changes: 8 additions & 9 deletions docs/data-sources/scalr_endpoint.md
@@ -1,14 +1,7 @@
---
layout: "scalr"
page_title: "Scalr: scalr_endpoint"
sidebar_current: "docs-datasource-scalr-endpoint-x"
description: |-
Get information on an endpoint.
---

# scalr_endpoint Data Source
# Data Source `scalr_endpoint`

This data source is used to retrieve details of an endpoint.
Retrieves the details of a webhook endpoint.

## Example Usage

Expand All @@ -24,6 +17,12 @@ data "scalr_endpoint" "example" {
}
```

```javascript
data "scalr_endpoint" "example" {
name = "endpoint_name"
}
```

## Argument Reference

* `id` - (Optional) The endpoint ID, in the format `env-<RANDOM STRING>`.
Expand Down
15 changes: 4 additions & 11 deletions docs/data-sources/scalr_environment.md
@@ -1,21 +1,14 @@
---
layout: "scalr"
page_title: "Scalr: scalr_environment"
sidebar_current: "docs-datasource-scalr-environment-x"
description: |-
Get information on an environment.
---

# scalr_environment Data Source
# Data Source `scalr_environment`

This data source is used to retrieve details of an environment.
Retrieves the details of a Scalr environment.

## Example Usage

```hcl
data "scalr_environment" "test" {
id = "env-xxxxxxxxxx" # optional, can only use id or name for the environment filter, if both are used there will be a conflict.
account_id = "acc-xxxxxxxx" # mandatory if user has access to few accounts and environment name is not unique
account_id = "acc-xxxxxxxx" # mandatory if a user has access to a few accounts and the environment name is not unique
name = "environment-name" # optional, can only use id or name for the environment filter, if both are used there will be a conflict.
}
```
Expand All @@ -34,7 +27,7 @@ All arguments plus:

* `created_by` - Details of the user that created the environment.
* `cost_estimation_enabled` - Boolean indicates if cost estimation is enabled for the environment.
* `status` - Shows status of the environment.
* `status` - The status of an environment.
* `cloud_credentials` - List of the environment cloud-credentials IDs, in the format `cred-<RANDOM STRING>`.
* `policy_groups` - List of the environment policy-groups IDs, in the format `pgrp-<RANDOM STRING>`.

Expand Down
11 changes: 2 additions & 9 deletions docs/data-sources/scalr_iam_team.md
@@ -1,12 +1,5 @@
---
layout: "scalr"
page_title: "Scalr: scalr_iam_team"
sidebar_current: "docs-datasource-scalr-iam-team-x"
description: |-
Get information on a team.
---

# scalr_iam_team Data Source

# Data Source `scalr_iam_team`

Retrieves the details of a team by the name and account_id.

Expand Down
11 changes: 2 additions & 9 deletions docs/data-sources/scalr_iam_user.md
@@ -1,12 +1,5 @@
---
layout: "scalr"
page_title: "Scalr: scalr_iam_user"
sidebar_current: "docs-datasource-scalr-iam-user-x"
description: |-
Get information on a user.
---

# scalr_iam_user Data Source

# Data Source `scalr_iam_user`

Retrieves the details of a Scalr user by the email.

Expand Down
10 changes: 2 additions & 8 deletions docs/data-sources/scalr_module_version.md
@@ -1,13 +1,7 @@
---
layout: "scalr"
page_title: "Scalr: scalr_module_version"
sidebar_current: "docs-datasource-module-version-x"
description: |- Get information on the module version.
---

# scalr_module_version Data Source
# Data Source `scalr_module_version`

This data source is used to retrieve module version data by module source and semantic version.
Retrieves the module version data by module source and semantic version.

## Example Usage

Expand Down
17 changes: 5 additions & 12 deletions docs/data-sources/scalr_policy_group.md
@@ -1,12 +1,5 @@
---
layout: "scalr"
page_title: "Scalr: scalr_policy_group"
sidebar_current: "docs-datasource-scalr-policy-group-x"
description: |-
Get information on a policy group.
---

# scalr_policy_group Data Source
# Data Source `scalr_policy_group`

Retrieves the details of a policy group by the name and account_id.

Expand All @@ -31,12 +24,12 @@ All arguments plus:
* `id` - An identifier of the policy group.
* `status` - A system status of the policy group.
* `error_message` - An error details if Scalr failed to process the policy group.
* `opa_version` - A version of Open Policy Agent the policy group verify run on.
* `vcs_provider_id` - An identifier of a VCS provider the policy group is create from. In the format `vcs-<RANDOM STRING>`.
* `vcs_repo` - Contains VCS-related meta-data the policy group is created from.
* `opa_version` - The version of the Open Policy Agent that the policy group is using.
* `vcs_provider_id` - The VCS provider idenitfier for the repository where the policy group resides. In the format `vcs-<RANDOM STRING>`.
* `vcs_repo` - Contains VCS-related meta-data for the policy group.
* `policies` - A list of the OPA policies the policy group verifies each run.
* `environments` - A list of the environments the policy group is linked to.
* `workspaces` - A list of the workspaces this policy group verify runs for.
* `workspaces` - A list of the workspaces this policy group verifies runs for.

The `vcs_repo` object contains:

Expand Down
14 changes: 4 additions & 10 deletions docs/data-sources/scalr_provider_configuration.md
@@ -1,18 +1,11 @@
---
layout: "scalr"
page_title: "Scalr: scalr_provider_configuration"
sidebar_current: "docs-datasource-scalr-provider-configuration"
description: |-
Get information on a provider configuration.
---

# scalr_provider_configuration Data Source
# Data Source `scalr_provider_configuration`

This data source is used to retrieve the id of a single provider configuration by name or type.
Retrieves the id of a single provider configuration by name or type.

## Example Usage

```hcl
```javascript
data "scalr_provider_configuration" "aws_dev" {
name = "aws_dev"
}
Expand All @@ -28,6 +21,7 @@ The following arguments are supported:

* `name` - (Optional) The name of a Scalr provider configuration.
* `provider_name` - (Optional) The name of a Terraform provider.
* `account_id` - (Optional) The identifier of the Scalr account, in the format `acc-<RANDOM STRING>`.

## Attribute Reference

Expand Down
14 changes: 4 additions & 10 deletions docs/data-sources/scalr_provider_configurations.md
@@ -1,18 +1,11 @@
---
layout: "scalr"
page_title: "Scalr: scalr_provider_configurations"
sidebar_current: "docs-datasource-scalr-provider-configurations"
description: |-
Get information on provider configurations.
---

# scalr_provider_configurations Data Source
# Data Source `scalr_provider_configurations`

This data source is used to retrieve list of provider configuration ids by name or type.
Retrieves a list of provider configuration ids by name or type.

## Example Usage

```hcl
```javascript
data "scalr_provider_configurations" "aws" {
name = "in:aws_dev,aws_demo,aws_prod"
}
Expand All @@ -28,6 +21,7 @@ The following arguments are supported:

* `name` - (Optional) The query used in a Scalr provider configuration name filter.
* `provider_name` - (Optional) The name of a Terraform provider.
* `account_id` - (Optional) The identifier of the Scalr account, in the format `acc-<RANDOM STRING>`.

## Attribute Reference

Expand Down
11 changes: 2 additions & 9 deletions docs/data-sources/scalr_role.md
@@ -1,18 +1,11 @@
---
layout: "scalr"
page_title: "Scalr: scalr_role"
sidebar_current: "docs-datasource-scalr-role-x"
description: |-
Get information on a IAM role.
---

# scalr_role Data Source
# Data Source `scalr_role`

This data source is used to retrieve details of a single role by name and account_id.

## Example Usage

To retrieve a custom role, an account id and the role name is required, for example:
To retrieve a custom role, an account id and role name are required, for example:

```hcl
data "scalr_role" "example" {
Expand Down

0 comments on commit ba44407

Please sign in to comment.