You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,10 @@ To this end, this provider supports the following extra specs schema:
108
108
"type": "string",
109
109
"description": "The name of the Key Pair to use for the instance."
110
110
},
111
+
"iam_instance_profile": {
112
+
"type": "string",
113
+
"description": "The ARN of the IAM instance profile to use for the instance."
114
+
},
111
115
"iops": {
112
116
"type": "integer",
113
117
"description": "Specifies the number of IOPS (Input/Output Operations Per Second) provisioned for the volume. Required for io1 and io2 volumes. Optional for gp3 volumes."
@@ -183,6 +187,7 @@ An example extra specs json would look like this:
@@ -205,7 +210,7 @@ An example extra specs json would look like this:
205
210
}
206
211
```
207
212
208
-
*NOTE*: The `extra_context` spec adds a map of key/value pairs that may be expected in the `runner_install_template`.
213
+
> **NOTE**: The `extra_context` spec adds a map of key/value pairs that may be expected in the `runner_install_template`.
209
214
The `runner_install_template` allows us to completely override the script that installs and starts the runner. In the example above, I have added a copy of the current template from `garm-provider-common`, with the adition of:
*NOTE*: `runner_install_template` is a [golang template](https://pkg.go.dev/text/template), which is used to install the runner. An example on how you can extend the currently existing template with a functionthat downloads, extracts and installs Go on the runner is provided above.
224
+
>**NOTE**: `runner_install_template` is a [golang template](https://pkg.go.dev/text/template), which is used to install the runner. An example on how you can extend the currently existing template with a functionthat downloads, extracts and installs Go on the runner is provided above.
225
+
226
+
#### **Warnings Regarding IAM Instance Profiles**
227
+
228
+
When configuring Garm to use [IAM Instance Profiles](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile) for your AWS runners, it’s important to be aware of the potential security implications. IAM Instance Profiles allow the instances to assume a role with permissions that can be broadly scoped, potentially granting more access than intended. Ensure that the IAM roles associated with your instance profiles adhere to the principle of least privilege, granting only the necessary permissions required for the runners to function. This setup is recommended only for private GitHub repositories, as using it with public repositories can expose your AWS environment to additional risks. Public repositories might inadvertently allow unauthorized access to your IAM credentials or resources. Therefore, use IAM Instance Profiles with public repositories at your own risk, and consider using alternative methods to securely manage credentials and permissions. Additionally, monitor and audit the actions performed by the instances regularly to ensure no unintended access to your AWS resources occurs.
SubnetID*string`json:"subnet_id,omitempty" jsonschema:"pattern=^subnet-[0-9a-fA-F]{17}$,description=The ID of the subnet formatted as subnet-xxxxxxxxxxxxxxxxx."`
78
-
SSHKeyName*string`json:"ssh_key_name,omitempty" jsonschema:"description=The name of the Key Pair to use for the instance."`
79
-
Iops*int32`json:"iops,omitempty" jsonschema:"description=Specifies the number of IOPS (Input/Output Operations Per Second) provisioned for the volume. Required for io1 and io2 volumes. Optional for gp3 volumes."`
80
-
Throughput*int32`json:"throughput,omitempty" jsonschema:"description=Specifies the throughput (MiB/s) provisioned for the volume. Valid only for gp3 volumes.,minimum=125,maximum=1000"`
81
-
VolumeSize*int32`json:"volume_size,omitempty" jsonschema:"description=Specifies the size of the volume in GiB. Required unless a snapshot ID is provided."`
82
-
VolumeType types.VolumeType`json:"volume_type,omitempty" jsonschema:"enum=gp2,enum=gp3,enum=io1,enum=io2,enum=st1,enum=sc1,enum=standard,description=Specifies the EBS volume type."`
83
-
SecurityGroupIds []string`json:"security_group_ids,omitempty" jsonschema:"description=The security group IDs to associate with the instance. Default: Amazon EC2 uses the default security group."`
84
-
DisableUpdates*bool`json:"disable_updates,omitempty" jsonschema:"description=Disable automatic updates on the VM."`
85
-
EnableBootDebug*bool`json:"enable_boot_debug,omitempty" jsonschema:"description=Enable boot debug on the VM."`
86
-
ExtraPackages []string`json:"extra_packages,omitempty" jsonschema:"description=Extra packages to install on the VM."`
77
+
SubnetID*string`json:"subnet_id,omitempty" jsonschema:"pattern=^subnet-[0-9a-fA-F]{17}$,description=The ID of the subnet formatted as subnet-xxxxxxxxxxxxxxxxx."`
78
+
SSHKeyName*string`json:"ssh_key_name,omitempty" jsonschema:"description=The name of the Key Pair to use for the instance."`
79
+
IAMInstanceProfile*string`json:"iam_instance_profile,omitempty jsonschema:"description=The IAM instance profile to associate with the instance."`
80
+
Iops*int32`json:"iops,omitempty" jsonschema:"description=Specifies the number of IOPS (Input/Output Operations Per Second) provisioned for the volume. Required for io1 and io2 volumes. Optional for gp3 volumes."`
81
+
Throughput*int32`json:"throughput,omitempty" jsonschema:"description=Specifies the throughput (MiB/s) provisioned for the volume. Valid only for gp3 volumes.,minimum=125,maximum=1000"`
82
+
VolumeSize*int32`json:"volume_size,omitempty" jsonschema:"description=Specifies the size of the volume in GiB. Required unless a snapshot ID is provided."`
83
+
VolumeType types.VolumeType`json:"volume_type,omitempty" jsonschema:"enum=gp2,enum=gp3,enum=io1,enum=io2,enum=st1,enum=sc1,enum=standard,description=Specifies the EBS volume type."`
84
+
SecurityGroupIds []string`json:"security_group_ids,omitempty" jsonschema:"description=The security group IDs to associate with the instance. Default: Amazon EC2 uses the default security group."`
85
+
DisableUpdates*bool`json:"disable_updates,omitempty" jsonschema:"description=Disable automatic updates on the VM."`
86
+
EnableBootDebug*bool`json:"enable_boot_debug,omitempty" jsonschema:"description=Enable boot debug on the VM."`
87
+
ExtraPackages []string`json:"extra_packages,omitempty" jsonschema:"description=Extra packages to install on the VM."`
87
88
cloudconfig.CloudConfigSpec
88
89
}
89
90
@@ -117,20 +118,21 @@ func GetRunnerSpecFromBootstrapParams(cfg *config.Config, data params.BootstrapI
0 commit comments