Skip to content

Commit

Permalink
fix(docs): fix formatting issues in upgrade guide for version 2 (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali authored Nov 28, 2024
1 parent d15e8d1 commit 9a97161
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
14 changes: 8 additions & 6 deletions docs/guides/version-2-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Upgrade topics:

- [Provider Version Configuration](#provider-version-configuration)
- [Provider Arguments](#provider-arguments)
- [Data Source: [`coder_git_auth`](#data-source-coder_git_auth)
- [Data Source: [`coder_workspace`](#data-source-coder_workspace)
- [Data Source: `coder_git_auth`](#data-source-coder_git_auth)
- [Data Source: `coder_workspace`](#data-source-coder_workspace)

## Provider Version Configuration

Expand Down Expand Up @@ -60,9 +60,9 @@ provider "coder" {}
Version 2.0.0 removes the [`feature_use_managed_variables`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs#feature_use_managed_variables-1) argument from the `provider` block.


## Data Source: [`coder_git_auth`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/git_auth)
## Data Source: `coder_git_auth`

If you are using this data source, you must replace it with the [`coder_external_auth`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/external_auth) data source. The `coder_external_auth` data source is a more generic data source that can be used to create any external authentication provider which supports OAuth2.
If you are using the [`coder_git_auth`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/git_auth) data source, you must replace it with the [`coder_external_auth`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/external_auth) data source. The `coder_external_auth` data source is a more generic data source that can be used to create any external authentication provider which supports OAuth2.

For example, given the previous configuration:

Expand All @@ -80,14 +80,16 @@ data "coder_external_auth" "example" {
}
```

## Data Source: [`coder_workspace`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/workspace)
## Data Source: `coder_workspace`

If you are using the `owner` properties of the `coder_workspace` data source, you must remove them and use the [`coder_workspace_owner`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner) data source instead. The `coder_workspace_owner` data source provides additional properties of the workspace owner.
If you are using the `owner` properties of the [`coder_workspace`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/workspace) data source, you must remove them and use the [`coder_workspace_owner`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner) data source instead. The `coder_workspace_owner` data source provides additional properties of the workspace owner.

Update your Terraform configuration to use the `coder_workspace_owner` data source instead and update the following attributes:

```terraform
data "coder_workspace_owner" "me" {}
```

- Remove `owner_id` attribute. Use [`data.coder_workspace_owner.me.id`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner#id) instead.
Expand Down
14 changes: 8 additions & 6 deletions templates/guides/version-2-upgrade.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Upgrade topics:

- [Provider Version Configuration](#provider-version-configuration)
- [Provider Arguments](#provider-arguments)
- [Data Source: [`coder_git_auth`](#data-source-coder_git_auth)
- [Data Source: [`coder_workspace`](#data-source-coder_workspace)
- [Data Source: `coder_git_auth`](#data-source-coder_git_auth)
- [Data Source: `coder_workspace`](#data-source-coder_workspace)

## Provider Version Configuration

Expand Down Expand Up @@ -60,9 +60,9 @@ provider "coder" {}
Version 2.0.0 removes the [`feature_use_managed_variables`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs#feature_use_managed_variables-1) argument from the `provider` block.


## Data Source: [`coder_git_auth`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/git_auth)
## Data Source: `coder_git_auth`

If you are using this data source, you must replace it with the [`coder_external_auth`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/external_auth) data source. The `coder_external_auth` data source is a more generic data source that can be used to create any external authentication provider which supports OAuth2.
If you are using the [`coder_git_auth`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/git_auth) data source, you must replace it with the [`coder_external_auth`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/external_auth) data source. The `coder_external_auth` data source is a more generic data source that can be used to create any external authentication provider which supports OAuth2.

For example, given the previous configuration:

Expand All @@ -80,14 +80,16 @@ data "coder_external_auth" "example" {
}
```

## Data Source: [`coder_workspace`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/workspace)
## Data Source: `coder_workspace`

If you are using the `owner` properties of the `coder_workspace` data source, you must remove them and use the [`coder_workspace_owner`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner) data source instead. The `coder_workspace_owner` data source provides additional properties of the workspace owner.
If you are using the `owner` properties of the [`coder_workspace`](https://registry.terraform.io/providers/coder/coder/1.0.4/docs/data-sources/workspace) data source, you must remove them and use the [`coder_workspace_owner`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner) data source instead. The `coder_workspace_owner` data source provides additional properties of the workspace owner.

Update your Terraform configuration to use the `coder_workspace_owner` data source instead and update the following attributes:

```terraform

data "coder_workspace_owner" "me" {}

```

- Remove `owner_id` attribute. Use [`data.coder_workspace_owner.me.id`](https://registry.terraform.io/providers/coder/coder/2.0.0/docs/data-sources/workspace_owner#id) instead.
Expand Down

0 comments on commit 9a97161

Please sign in to comment.