Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: improvecoderd_license docs#140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 2 commits intomainfromlilac/improve-license-docs
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletionsdocs/resources/license.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,19 +4,29 @@ page_title: "coderd_license Resource - terraform-provider-coderd"
subcategory: ""
description: |-
A license for a Coder deployment.
It's recommended tocreate multiple instances ofthis resource when updating alicense. Modifying an existinglicensewillcause the resourcetobe replaced,which mayresult in a brief unlicensed period.
It's recommended toset create_before_destroy https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#create_before_destroy on license resources. Without settingthis, Terraform will remove the oldlicense before adding the updatedlicense. Thiswillresult in a temporary disruptiontoyour users; duringwhichtheymaybe unable to use features that require a license.
Terraform does not guarantee this resource will be created before other resources or attributes that require a licensed deployment. The depends_on meta-argument is instead recommended.
---

# coderd_license (Resource)

A license for a Coder deployment.

It's recommended tocreate multiple instances ofthis resource when updating alicense. Modifying an existinglicensewillcause the resourcetobe replaced,which mayresult in a brief unlicensed period.
It's recommended toset [`create_before_destroy`](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#create_before_destroy) on license resources. Without settingthis, Terraform will remove the oldlicense before adding the updatedlicense. Thiswillresult in a temporary disruptiontoyour users; duringwhichtheymaybe unable to use features that require a license.

Terraform does not guarantee this resource will be created before other resources or attributes that require a licensed deployment. The `depends_on` meta-argument is instead recommended.

## Example Usage

```terraform
resource "coderd_license" "license" {
license = "<…>"

lifecycle {
create_before_destroy = true
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down
7 changes: 7 additions & 0 deletionsexamples/resources/coderd_license/resource.tf
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
resource "coderd_license" "license" {
license = "<…>"

lifecycle {
create_before_destroy = true
}
}
9 changes: 6 additions & 3 deletionsinternal/provider/license_resource.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,9 +39,12 @@ func (r *LicenseResource) Metadata(ctx context.Context, req resource.MetadataReq

func (r *LicenseResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "A license for a Coder deployment.\n\nIt's recommended to create multiple instances of this " +
"resource when updating a license. Modifying an existing license will cause the resource to be replaced, " +
"which may result in a brief unlicensed period.\n\n" +
MarkdownDescription: "A license for a Coder deployment.\n\nIt's recommended to set " +
"[`create_before_destroy`](https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#create_before_destroy) " +
"on license resources. Without setting this, Terraform will remove the old " +
"license before adding the updated license. This will result in a temporary " +
"disruption to your users; during which they may be unable to use features " +
"that require a license.\n\n" +
"Terraform does not guarantee this resource " +
"will be created before other resources or attributes that require a licensed deployment. " +
"The `depends_on` meta-argument is instead recommended.",
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp