Skip to content

Commit

Permalink
Merge branch 'main' into feat-azure-oidc-#755
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerHeber authored Dec 13, 2023
2 parents 5c8b265 + 5d8d820 commit c105dce
Show file tree
Hide file tree
Showing 57 changed files with 586 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Updated Paths
uses: actions/labeler@main # Reads from .github/labeler.yml
uses: actions/labeler@v4 # Reads from .github/labeler.yml
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions client/configuration_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const (
ScopeEnvironment Scope = "ENVIRONMENT"
ScopeDeployment Scope = "DEPLOYMENT"
ScopeDeploymentLog Scope = "DEPLOYMENT_LOG"
ScopeWorkflow Scope = "WORKFLOW"
)

type Format string
Expand Down Expand Up @@ -104,6 +105,8 @@ func (client *ApiClient) ConfigurationVariablesByScope(scope Scope, scopeId stri
return nil, errors.New("no api to fetch configuration variables by deployment")
case scope == ScopeDeploymentLog:
params["deploymentLogId"] = scopeId
case scope == ScopeWorkflow:
params["workflowEnvironmentId"] = scopeId
}
err = client.http.Get("/configuration", params, &result)
if err != nil {
Expand Down
13 changes: 13 additions & 0 deletions docs/data-sources/agent_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ description: |-



## Example Usage

```terraform
resource "env0_project" "project" {
name = "project"
}
data "env0_agents" "agents" {}
resource "env0_agent_project_assignment" "gent_project_assignment" {
agent_id = data.env0_agents.agents.0.agent_key
project_id = env0_project.project.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_agent_values" "agent_values" {
agent_key = "pr12"
}
output "values" {
value = data.env0_agent_values.agent_values.values
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/aws_cost_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_aws_cost_credentials" "aws_cost_credentials_by_name" {
name = "aws cost credentials"
}
data "env0_aws_cost_credentials" "aws_cost_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/aws_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_aws_credentials" "aws_credentials_by_name" {
name = "aws credentials"
}
data "env0_aws_credentials" "aws_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/azure_cost_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_azure_cost_credentials" "azure_cost_credentials_by_name" {
name = "azure cost credentials"
}
data "env0_azure_cost_credentials" "azure_cost_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/azure_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_azure_credentials" "azure_credentials_by_name" {
name = "azure credentials"
}
data "env0_azure_credentials" "azure_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/cloud_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ data "env0_aws_credentials" "aws_credentials" {
}
output "credentials_name" {
value = var.second_run ? data.env0_aws_credentials.aws_credentials["Test Role arn1"].name : ""
value = data.env0_aws_credentials.aws_credentials["Test Role arn1"].name
}
```

Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/custom_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_custom_flow" "custom_flow_by_name" {
name = "custom flow 12345"
}
data "env0_custom_flow" "custom_flow_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/gcp_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_gcp_credentials" "gcp_credentials_by_name" {
name = "gcp credentials"
}
data "env0_gcp_credentials" "gcp_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/google_cost_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_google_cost_credentials" "google_cost_credentials_by_name" {
name = "google cost credentials"
}
data "env0_google_cost_credentials" "google_cost_credentials_by_id" {
id = "12345676safsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/gpg_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_gpg_key" "gpg_key_by_name" {
name = "gpg key fegsdfg"
}
data "env0_gpg_key" "gpg_key_by_id" {
id = "sdfsdxcvxc-sdfsd-fsdfsd-dsda"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
14 changes: 12 additions & 2 deletions docs/data-sources/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ description: |-
data "env0_project" "default_project" {
name = "Default Organization Project"
}
data "env0_project" "with_parent_name_filter" {
name = "Default Organization Project"
parent_project_name = "parent projet name"
}
data "env0_project" "with_parent_id_filter" {
name = "Default Organization Project"
parent_project_id = "parent-projet-id"
}
```

<!-- schema generated by tfplugindocs -->
Expand All @@ -25,11 +35,11 @@ data "env0_project" "default_project" {

- `id` (String) id of the project
- `name` (String) the name of the project
- `parent_project_name` (String) the name of the parent project. Can be used when there are multiple subprojects with the same name under different parent projects
- `parent_project_id` (String) the id of the parent project. Can be used as a filter when there are multiple subprojects with the same name under different parent projects
- `parent_project_name` (String) the name of the parent project. Can be used as a filter when there are multiple subprojects with the same name under different parent projects

### Read-Only

- `created_by` (String) textual description of the entity who created the project
- `description` (String) textual description of the project
- `parent_project_id` (String) if the project is a sub-project, returns the parent of this sub-project
- `role` (String) role of the authenticated user (through api key) in the project
10 changes: 10 additions & 0 deletions docs/data-sources/project_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_project" "project" {
name = "project"
}
data "env0_project_policy" "project_policy" {
project_id = data.env0_project.project.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
6 changes: 6 additions & 0 deletions docs/data-sources/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ description: |-



## Example Usage

```terraform
data "env0_provider" "provider" {
id = "adsdasdasd-asdasdas"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
10 changes: 10 additions & 0 deletions docs/data-sources/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-



## Example Usage

```terraform
data "env0_team" "by_id" {
id = "asdasdas-asdas-dasdsa"
}
data "env0_team" "by_name" {
name = "team-12345"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
22 changes: 21 additions & 1 deletion docs/resources/approval_policy_assignment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,27 @@ description: |-




## Example Usage

```terraform
data "env0_project" "project" {
name = "project"
}
resource "env0_approval_policy" "approval_policy" {
name = "approval policy"
repository = "reopository"
github_installation_id = 4234234234
path = "misc/null-resource"
}
resource "env0_approval_policy_assignment" "approval_policy_assignment" {
scope = "PROJECT"
scope_id = data.env0_project.project.id
blueprint_id = env0_approval_policy.approval_policy.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
17 changes: 17 additions & 0 deletions docs/resources/aws_cost_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ description: |-



## Example Usage

```terraform
resource "env0_aws_cost_credentials" "aws_cost_credentials" {
name = "cost credentials"
arn = "arn"
duration = 3600
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -27,3 +35,12 @@ description: |-
### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import env0_aws_cost_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e
terraform import env0_aws_cost_credentials.by_name "cost credentials name"
```
21 changes: 20 additions & 1 deletion docs/resources/azure_cost_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@ description: |-




## Example Usage

```terraform
resource "env0_azure_cost_credentials" "azure_cost_credentials" {
name = "cost credentials"
client_id = "client id"
client_secret = "client secret"
subscription_id = "43242342dsdfsdfsdf"
tenant_id = "fsdf-fsdfdsfs-fsdfsdfsd-fsdfsd"
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand All @@ -26,3 +36,12 @@ description: |-
### Read-Only

- `id` (String) The ID of this resource.

## Import

Import is supported using the following syntax:

```shell
terraform import env0_azure_cost_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e
terraform import env0_azure_cost_credentials.by_name "cost credentials name"
```
Loading

0 comments on commit c105dce

Please sign in to comment.