Skip to content

Commit

Permalink
Add iam instance profile support to Packer templates (#1679)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSchultz-clumio authored Mar 5, 2024
1 parent ff76160 commit 5554da8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/usage/al2.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| `docker_version` | Docker is not installed on Kubernetes v1.25+ |
| `enable_fips` | Install openssl and enable fips related kernel parameters |
| `encrypted` | |
| `iam_instance_profile` | The name of an IAM instance profile to launch the EC2 instance with. |
| `instance_type` | |
| `kernel_version` | |
| `kms_key_id` | |
Expand All @@ -40,7 +41,7 @@
| `source_ami_filter_name` | |
| `source_ami_id` | |
| `source_ami_owners` | |
| `ssh_interface` | |
| `ssh_interface` | If using ```session_manager```, you need to specify a non-minimal ami as the minimal version does not have the SSM agent installed. |
| `ssh_username` | |
| `ssm_agent_version` | Version of the SSM agent to install from the S3 bucket provided by the SSM agent project, such as ```latest```. If empty, the latest version of the SSM agent available in the Amazon Linux core repositories will be installed. |
| `subnet_id` | |
Expand Down
3 changes: 2 additions & 1 deletion doc/usage/al2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| `creator` | |
| `enable_fips` | Install openssl and enable fips related kernel parameters |
| `encrypted` | |
| `iam_instance_profile` | The name of an IAM instance profile to launch the EC2 instance with. |
| `instance_type` | |
| `kms_key_id` | |
| `kubernetes_build_date` | |
Expand All @@ -33,7 +34,7 @@
| `source_ami_filter_name` | |
| `source_ami_id` | |
| `source_ami_owners` | |
| `ssh_interface` | |
| `ssh_interface` | If using ```session_manager```, you need to specify a non-minimal ami as the minimal version does not have the SSM agent installed. |
| `ssh_username` | |
| `ssm_agent_version` | Version of the SSM agent to install from the S3 bucket provided by the SSM agent project, such as ```latest```. If empty, the latest version of the SSM agent available in the Amazon Linux core repositories will be installed. |
| `subnet_id` | |
Expand Down
2 changes: 2 additions & 0 deletions templates/al2/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"docker_version": null,
"enable_fips": null,
"encrypted": null,
"iam_instance_profile": null,
"instance_type": null,
"kernel_version": null,
"kms_key_id": null,
Expand Down Expand Up @@ -87,6 +88,7 @@
"max_attempts": 90
},
"ami_regions": "{{user `ami_regions`}}",
"iam_instance_profile": "{{user `iam_instance_profile`}}",
"ssh_username": "{{user `ssh_username`}}",
"ssh_interface": "{{user `ssh_interface`}}",
"temporary_security_group_source_cidrs": "{{user `temporary_security_group_source_cidrs`}}",
Expand Down
1 change: 1 addition & 0 deletions templates/al2/variables-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"encrypted": "false",
"kernel_version": "",
"kms_key_id": "",
"iam_instance_profile": "",
"launch_block_device_mappings_volume_size": "4",
"pause_container_version": "3.5",
"pull_cni_from_github": "true",
Expand Down
1 change: 1 addition & 0 deletions templates/al2023/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"creator": null,
"enable_fips": null,
"encrypted": null,
"iam_instance_profile": null,
"instance_type": null,
"kms_key_id": null,
"kubernetes_build_date": null,
Expand Down
1 change: 1 addition & 0 deletions templates/al2023/variables-default.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"enable_fips": "false",
"encrypted": "false",
"kms_key_id": "",
"iam_instance_profile": "",
"launch_block_device_mappings_volume_size": "20",
"remote_folder": "/tmp",
"runc_version": "*",
Expand Down

0 comments on commit 5554da8

Please sign in to comment.