@@ -35,7 +35,7 @@ The module exposes the following parameters to workspace users:
35
35
``` hcl
36
36
module "ami_snapshot" {
37
37
source = "registry.coder.com/modules/aws-ami-snapshot"
38
-
38
+
39
39
instance_id = aws_instance.workspace.id
40
40
default_ami_id = data.aws_ami.ubuntu.id
41
41
template_name = "aws-linux"
@@ -44,7 +44,7 @@ module "ami_snapshot" {
44
44
resource "aws_instance" "workspace" {
45
45
ami = module.ami_snapshot.ami_id
46
46
instance_type = "t3.micro"
47
-
47
+
48
48
# Prevent Terraform from recreating instance when AMI changes
49
49
lifecycle {
50
50
ignore_changes = [ami]
@@ -57,14 +57,14 @@ resource "aws_instance" "workspace" {
57
57
``` hcl
58
58
module "ami_snapshot" {
59
59
source = "registry.coder.com/modules/aws-ami-snapshot"
60
-
60
+
61
61
instance_id = aws_instance.workspace.id
62
62
default_ami_id = data.aws_ami.ubuntu.id
63
63
template_name = "aws-linux"
64
64
enable_dlm_cleanup = true
65
65
dlm_role_arn = aws_iam_role.dlm_lifecycle_role.arn
66
66
snapshot_retention_count = 5
67
-
67
+
68
68
tags = {
69
69
Environment = "development"
70
70
Project = "my-project"
@@ -148,25 +148,25 @@ Users need the following IAM permissions for full functionality:
148
148
149
149
## Variables
150
150
151
- | Name | Description | Type | Default | Required |
152
- | ------| -------------| ------| ---------| ----------|
153
- | instance_id | The EC2 instance ID to create snapshots from | string | n/a | yes |
154
- | default_ami_id | The default AMI ID to use when not restoring from a snapshot | string | n/a | yes |
155
- | template_name | The name of the Coder template using this module | string | n/a | yes |
156
- | tags | Additional tags to apply to snapshots | map(string) | {} | no |
157
- | enable_dlm_cleanup | Enable Data Lifecycle Manager for automated snapshot cleanup | bool | false | no |
158
- | dlm_role_arn | ARN of the IAM role for DLM | string | "" | no |
159
- | snapshot_retention_count | Number of snapshots to retain when using DLM cleanup | number | 7 | no |
151
+ | Name | Description | Type | Default | Required |
152
+ | ------------------------ | ------------------------------------------------------------ | ----------- | ------- | -------- |
153
+ | instance_id | The EC2 instance ID to create snapshots from | string | n/a | yes |
154
+ | default_ami_id | The default AMI ID to use when not restoring from a snapshot | string | n/a | yes |
155
+ | template_name | The name of the Coder template using this module | string | n/a | yes |
156
+ | tags | Additional tags to apply to snapshots | map(string) | {} | no |
157
+ | enable_dlm_cleanup | Enable Data Lifecycle Manager for automated snapshot cleanup | bool | false | no |
158
+ | dlm_role_arn | ARN of the IAM role for DLM | string | "" | no |
159
+ | snapshot_retention_count | Number of snapshots to retain when using DLM cleanup | number | 7 | no |
160
160
161
161
## Outputs
162
162
163
- | Name | Description |
164
- | ------| -------------|
165
- | ami_id | The AMI ID to use for the workspace instance |
166
- | is_using_snapshot | Whether the workspace is using a snapshot AMI |
167
- | snapshot_ami_id | The AMI ID of the created snapshot (if any) |
163
+ | Name | Description |
164
+ | ------------------- | ----------------------------------------------------- |
165
+ | ami_id | The AMI ID to use for the workspace instance |
166
+ | is_using_snapshot | Whether the workspace is using a snapshot AMI |
167
+ | snapshot_ami_id | The AMI ID of the created snapshot (if any) |
168
168
| available_snapshots | List of available snapshot AMI IDs for this workspace |
169
- | snapshot_info | Detailed information about available snapshots |
169
+ | snapshot_info | Detailed information about available snapshots |
170
170
171
171
## Considerations
172
172
@@ -179,6 +179,7 @@ Users need the following IAM permissions for full functionality:
179
179
## Examples
180
180
181
181
See the updated AWS templates that use this module:
182
+
182
183
- ` coder/templates/aws-linux `
183
184
- ` coder/templates/aws-windows `
184
- - ` coder/templates/aws-devcontainer `
185
+ - ` coder/templates/aws-devcontainer `
0 commit comments