Skip to content

Commit c0fb526

Browse files
committed
move to templates
1 parent 7451a92 commit c0fb526

File tree

3 files changed

+47
-3
lines changed

3 files changed

+47
-3
lines changed

docs/guides/v1-to-v2-migration.md

-2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@ If you are using the `owner` properties of the `coder_workspace` data source, yo
4242
| `data.coder_workspace.me.owner_oidc_access_token` | `data.coder_workspace_owner.me.oidc_access_token` |
4343
| `data.coder_workspace.me.owner_session_token` | `data.coder_workspace_owner.me.session_token` |
4444

45-
```terraform
46-
4745
->While we do not anticipate these changes to affect existing resources, we strongly advice reviewing the plan produced by Terraform to ensure no resources are accidentally removed or altered in an undesired way. If you encounter any unexpected behavior, please report it by opening a GitHub [issue](https://github.com/coder/terraform-provider-coder/issues).

docs/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
page_title: "Coder Provider"
44
subcategory: "Infrastructure"
55
description: |-
6+
Terraform provider for Coder. Coder is a self-hosted cloud development environment that allows enterprises to create consistent, secure, and scalable development environments for their teams.
67
78
---
89

@@ -12,7 +13,7 @@ The Coder provider is used to help create [Coder](https://coder.com) templates.
1213

1314
-> Requires Coder v2.13.0 or later.
1415

15-
!> `coder_git_auth` and owner related fields of `coder_workspace` data source have been removed. Follow the [v0 to v1migration guide](https://registry.terraform.io/providers/codercom/coder/latest/docs/guides/v0-to-v1-migration) to update your code.
16+
!> `coder_git_auth` and owner related fields of `coder_workspace` data source have been removed. Follow the [v0 to v1migration guide](https://registry.terraform.io/providers/codercom/coder/latest/docs/guides/v1-to-v2-migration) to update your code.
1617

1718
## Example
1819

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
page_title: "Migrate from v1 to v2"
3+
---
4+
5+
# Migrate from v1 to v2
6+
7+
Version 2.0.0 of the Coder provider for Terraform is a major release that removes the following deprecated data sources and their properties:
8+
9+
- `coder_git_auth` data source
10+
- All owner properties from the [`coder_workspace`](../docs/data-sources/workspace.md) data source
11+
12+
## Migrating `coder_git_auth` data source
13+
14+
If you are using this data source, you must replace it with the [`coder_external_auth`](../docs/data-sources/external-auth.md) data source. The `coder_external_auth` data source is a more generic data source that can be used to create any external authentication provider.
15+
16+
### v1.0.0
17+
```terraform
18+
19+
data "coder_git_auth" "example" {
20+
id = "example"
21+
}
22+
```
23+
### v2.0.0
24+
```terraform
25+
data "coder_external_auth" "example" {
26+
id = "example"
27+
}
28+
```
29+
30+
31+
## Migrating `coder_workspace` data source
32+
33+
If you are using the `owner` properties of the `coder_workspace` data source, you must remove them and use the `coder_workspace_owner` data source instead. The `coder_workspace_owner` data source is a more generic data source that provide additional properties of the workspace owner.
34+
35+
| `v1.0.0` | `v2.0.0` |
36+
|-----------|----------|
37+
| `data.coder_workspace.me.owner_id` | `data.coder_workspace_owner.me.id` |
38+
| `data.coder_workspace.me.owner` | `data.coder_workspace_owner.me.name` |
39+
| `data.coder_workspace.me.owner_name` | `data.coder_workspace_owner.me.full_name` |
40+
| `data.coder_workspace.me.owner_email` | `data.coder_workspace_owner.me.email` |
41+
| `data.coder_workspace.me.owner_groups` | `data.coder_workspace_owner.me.groups` |
42+
| `data.coder_workspace.me.owner_oidc_access_token` | `data.coder_workspace_owner.me.oidc_access_token` |
43+
| `data.coder_workspace.me.owner_session_token` | `data.coder_workspace_owner.me.session_token` |
44+
45+
->While we do not anticipate these changes to affect existing resources, we strongly advice reviewing the plan produced by Terraform to ensure no resources are accidentally removed or altered in an undesired way. If you encounter any unexpected behavior, please report it by opening a GitHub [issue](https://github.com/coder/terraform-provider-coder/issues).

0 commit comments

Comments
 (0)