-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Remove agent_script data source to simplify resources (#8)
This adds a new resource for associating instance IDs, which will only need to be used in edge-cases. We'll auto-detect instance identifiers for the most popular cases, and perform zero-trust authentication. It seemed weird to separate the agent script and agent itself. This also led to difficulties previewing the operating system prior to start.
- Loading branch information
Showing
12 changed files
with
254 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "coder_agent_instance Resource - terraform-provider-coder" | ||
subcategory: "" | ||
description: |- | ||
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for "googlecomputeinstance", "awsinstance", "azurermlinuxvirtualmachine", and "azurermwindowsvirtual_machine" resources. | ||
--- | ||
|
||
# coder_agent_instance (Resource) | ||
|
||
Use this resource to associate an instance ID with an agent for zero-trust authentication. This association is done automatically for "google_compute_instance", "aws_instance", "azurerm_linux_virtual_machine", and "azurerm_windows_virtual_machine" resources. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "coder_agent" "dev" { | ||
os = "linux" | ||
arch = "amd64" | ||
auth = "google-instance-identity" | ||
} | ||
resource "google_compute_instance" "dev" { | ||
zone = "us-central1-a" | ||
} | ||
resource "coder_agent_instance" "dev" { | ||
agent_id = coder_agent.dev.id | ||
instance_id = google_compute_instance.dev.instance_id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `agent_id` (String) The "id" property of a "coder_agent" resource to associate with. | ||
- `instance_id` (String) The instance identifier of a provisioned resource. | ||
|
||
### Optional | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "coder_agent" "dev" { | ||
os = "linux" | ||
arch = "amd64" | ||
auth = "google-instance-identity" | ||
} | ||
|
||
resource "google_compute_instance" "dev" { | ||
zone = "us-central1-a" | ||
} | ||
|
||
resource "coder_agent_instance" "dev" { | ||
agent_id = coder_agent.dev.id | ||
instance_id = google_compute_instance.dev.instance_id | ||
} |
Oops, something went wrong.