diff --git a/CHANGELOG.md b/CHANGELOG.md
index f3abd1637..737bfe157 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
## 1.34.0 (Unreleased)
+
+FEATURES:
+
+* **New Resource:** `awscc_pcs_compute_node_group`
+* **New Data Source:** `awscc_pcs_compute_node_group`
+
## 1.33.0 (March 13, 2025)
FEATURES:
diff --git a/docs/data-sources/pcs_compute_node_group.md b/docs/data-sources/pcs_compute_node_group.md
new file mode 100644
index 000000000..aed8bbbb3
--- /dev/null
+++ b/docs/data-sources/pcs_compute_node_group.md
@@ -0,0 +1,98 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "awscc_pcs_compute_node_group Data Source - terraform-provider-awscc"
+subcategory: ""
+description: |-
+ Data Source schema for AWS::PCS::ComputeNodeGroup
+---
+
+# awscc_pcs_compute_node_group (Data Source)
+
+Data Source schema for AWS::PCS::ComputeNodeGroup
+
+
+
+
+## Schema
+
+### Required
+
+- `id` (String) Uniquely identifies the resource.
+
+### Read-Only
+
+- `ami_id` (String) The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. If not provided, AWS PCS uses the AMI ID specified in the custom launch template.
+- `arn` (String) The unique Amazon Resource Name (ARN) of the compute node group.
+- `cluster_id` (String) The ID of the cluster of the compute node group.
+- `compute_node_group_id` (String) The generated unique ID of the compute node group.
+- `custom_launch_template` (Attributes) An Amazon EC2 launch template AWS PCS uses to launch compute nodes. (see [below for nested schema](#nestedatt--custom_launch_template))
+- `error_info` (Attributes List) The list of errors that occurred during compute node group provisioning. (see [below for nested schema](#nestedatt--error_info))
+- `iam_instance_profile_arn` (String) The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.
+- `instance_configs` (Attributes List) A list of EC2 instance configurations that AWS PCS can provision in the compute node group. (see [below for nested schema](#nestedatt--instance_configs))
+- `name` (String) The name that identifies the compute node group.
+- `purchase_option` (String) Specifies how EC2 instances are purchased on your behalf. AWS PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option, it defaults to On-Demand.
+- `scaling_configuration` (Attributes) Specifies the boundaries of the compute node group auto scaling. (see [below for nested schema](#nestedatt--scaling_configuration))
+- `slurm_configuration` (Attributes) Additional options related to the Slurm scheduler. (see [below for nested schema](#nestedatt--slurm_configuration))
+- `spot_options` (Attributes) Additional configuration when you specify SPOT as the purchase option. (see [below for nested schema](#nestedatt--spot_options))
+- `status` (String) The provisioning status of the compute node group. The provisioning status doesn't indicate the overall health of the compute node group.
+- `subnet_ids` (List of String) The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.
+- `tags` (Map of String) 1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
+
+
+### Nested Schema for `custom_launch_template`
+
+Read-Only:
+
+- `template_id` (String) The ID of the EC2 launch template to use to provision instances.
+- `version` (String) The version of the EC2 launch template to use to provision instances.
+
+
+
+### Nested Schema for `error_info`
+
+Read-Only:
+
+- `code` (String) The short-form error code.
+- `message` (String) The detailed error information.
+
+
+
+### Nested Schema for `instance_configs`
+
+Read-Only:
+
+- `instance_type` (String) The EC2 instance type that AWS PCS can provision in the compute node group.
+
+
+
+### Nested Schema for `scaling_configuration`
+
+Read-Only:
+
+- `max_instance_count` (Number) The upper bound of the number of instances allowed in the compute fleet.
+- `min_instance_count` (Number) The lower bound of the number of instances allowed in the compute fleet.
+
+
+
+### Nested Schema for `slurm_configuration`
+
+Read-Only:
+
+- `slurm_custom_settings` (Attributes List) Additional Slurm-specific configuration that directly maps to Slurm settings. (see [below for nested schema](#nestedatt--slurm_configuration--slurm_custom_settings))
+
+
+### Nested Schema for `slurm_configuration.slurm_custom_settings`
+
+Read-Only:
+
+- `parameter_name` (String) AWS PCS supports configuration of the following Slurm parameters for compute node groups: Weight and RealMemory.
+- `parameter_value` (String) The value for the configured Slurm setting.
+
+
+
+
+### Nested Schema for `spot_options`
+
+Read-Only:
+
+- `allocation_strategy` (String) The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances. AWS PCS supports lowest price, capacity optimized, and price capacity optimized. If you don't provide this option, it defaults to price capacity optimized.
diff --git a/docs/resources/pcs_compute_node_group.md b/docs/resources/pcs_compute_node_group.md
new file mode 100644
index 000000000..4e1113a2f
--- /dev/null
+++ b/docs/resources/pcs_compute_node_group.md
@@ -0,0 +1,112 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "awscc_pcs_compute_node_group Resource - terraform-provider-awscc"
+subcategory: ""
+description: |-
+ AWS::PCS::ComputeNodeGroup resource creates an AWS PCS compute node group.
+---
+
+# awscc_pcs_compute_node_group (Resource)
+
+AWS::PCS::ComputeNodeGroup resource creates an AWS PCS compute node group.
+
+
+
+
+## Schema
+
+### Required
+
+- `cluster_id` (String) The ID of the cluster of the compute node group.
+- `custom_launch_template` (Attributes) An Amazon EC2 launch template AWS PCS uses to launch compute nodes. (see [below for nested schema](#nestedatt--custom_launch_template))
+- `iam_instance_profile_arn` (String) The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.
+- `instance_configs` (Attributes List) A list of EC2 instance configurations that AWS PCS can provision in the compute node group. (see [below for nested schema](#nestedatt--instance_configs))
+- `scaling_configuration` (Attributes) Specifies the boundaries of the compute node group auto scaling. (see [below for nested schema](#nestedatt--scaling_configuration))
+- `subnet_ids` (List of String) The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.
+
+### Optional
+
+- `ami_id` (String) The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. If not provided, AWS PCS uses the AMI ID specified in the custom launch template.
+- `name` (String) The name that identifies the compute node group.
+- `purchase_option` (String) Specifies how EC2 instances are purchased on your behalf. AWS PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option, it defaults to On-Demand.
+- `slurm_configuration` (Attributes) Additional options related to the Slurm scheduler. (see [below for nested schema](#nestedatt--slurm_configuration))
+- `spot_options` (Attributes) Additional configuration when you specify SPOT as the purchase option. (see [below for nested schema](#nestedatt--spot_options))
+- `tags` (Map of String) 1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.
+
+### Read-Only
+
+- `arn` (String) The unique Amazon Resource Name (ARN) of the compute node group.
+- `compute_node_group_id` (String) The generated unique ID of the compute node group.
+- `error_info` (Attributes List) The list of errors that occurred during compute node group provisioning. (see [below for nested schema](#nestedatt--error_info))
+- `id` (String) Uniquely identifies the resource.
+- `status` (String) The provisioning status of the compute node group. The provisioning status doesn't indicate the overall health of the compute node group.
+
+
+### Nested Schema for `custom_launch_template`
+
+Required:
+
+- `version` (String) The version of the EC2 launch template to use to provision instances.
+
+Optional:
+
+- `template_id` (String) The ID of the EC2 launch template to use to provision instances.
+
+
+
+### Nested Schema for `instance_configs`
+
+Optional:
+
+- `instance_type` (String) The EC2 instance type that AWS PCS can provision in the compute node group.
+
+
+
+### Nested Schema for `scaling_configuration`
+
+Required:
+
+- `max_instance_count` (Number) The upper bound of the number of instances allowed in the compute fleet.
+- `min_instance_count` (Number) The lower bound of the number of instances allowed in the compute fleet.
+
+
+
+### Nested Schema for `slurm_configuration`
+
+Optional:
+
+- `slurm_custom_settings` (Attributes List) Additional Slurm-specific configuration that directly maps to Slurm settings. (see [below for nested schema](#nestedatt--slurm_configuration--slurm_custom_settings))
+
+
+### Nested Schema for `slurm_configuration.slurm_custom_settings`
+
+Optional:
+
+- `parameter_name` (String) AWS PCS supports configuration of the following Slurm parameters for compute node groups: Weight and RealMemory.
+- `parameter_value` (String) The value for the configured Slurm setting.
+
+
+
+
+### Nested Schema for `spot_options`
+
+Optional:
+
+- `allocation_strategy` (String) The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances. AWS PCS supports lowest price, capacity optimized, and price capacity optimized. If you don't provide this option, it defaults to price capacity optimized.
+
+
+
+### Nested Schema for `error_info`
+
+Read-Only:
+
+- `code` (String) The short-form error code.
+- `message` (String) The detailed error information.
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+$ terraform import awscc_pcs_compute_node_group.example "arn"
+```
diff --git a/internal/aws/pcs/compute_node_group_resource_gen.go b/internal/aws/pcs/compute_node_group_resource_gen.go
index 62e911018..0284d8466 100644
--- a/internal/aws/pcs/compute_node_group_resource_gen.go
+++ b/internal/aws/pcs/compute_node_group_resource_gen.go
@@ -87,7 +87,7 @@ func computeNodeGroupResource(ctx context.Context) (resource.Resource, error) {
// "additionalProperties": false,
// "description": "An Amazon EC2 launch template AWS PCS uses to launch compute nodes.",
// "properties": {
- // "Id": {
+ // "TemplateId": {
// "description": "The ID of the EC2 launch template to use to provision instances.",
// "type": "string"
// },
@@ -97,17 +97,20 @@ func computeNodeGroupResource(ctx context.Context) (resource.Resource, error) {
// }
// },
// "required": [
- // "Id",
// "Version"
// ],
// "type": "object"
// }
"custom_launch_template": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
- // Property: Id
- "id": schema.StringAttribute{ /*START ATTRIBUTE*/
+ // Property: TemplateId
+ "template_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the EC2 launch template to use to provision instances.",
- Required: true,
+ Optional: true,
+ Computed: true,
+ PlanModifiers: []planmodifier.String{ /*START PLAN MODIFIERS*/
+ stringplanmodifier.UseStateForUnknown(),
+ }, /*END PLAN MODIFIERS*/
}, /*END ATTRIBUTE*/
// Property: Version
"version": schema.StringAttribute{ /*START ATTRIBUTE*/
@@ -542,7 +545,6 @@ func computeNodeGroupResource(ctx context.Context) (resource.Resource, error) {
"custom_launch_template": "CustomLaunchTemplate",
"error_info": "ErrorInfo",
"iam_instance_profile_arn": "IamInstanceProfileArn",
- "id": "Id",
"instance_configs": "InstanceConfigs",
"instance_type": "InstanceType",
"max_instance_count": "MaxInstanceCount",
@@ -559,6 +561,7 @@ func computeNodeGroupResource(ctx context.Context) (resource.Resource, error) {
"status": "Status",
"subnet_ids": "SubnetIds",
"tags": "Tags",
+ "template_id": "TemplateId",
"version": "Version",
})
diff --git a/internal/aws/pcs/compute_node_group_singular_data_source_gen.go b/internal/aws/pcs/compute_node_group_singular_data_source_gen.go
index 3246cfb61..cba3af84d 100644
--- a/internal/aws/pcs/compute_node_group_singular_data_source_gen.go
+++ b/internal/aws/pcs/compute_node_group_singular_data_source_gen.go
@@ -64,7 +64,7 @@ func computeNodeGroupDataSource(ctx context.Context) (datasource.DataSource, err
// "additionalProperties": false,
// "description": "An Amazon EC2 launch template AWS PCS uses to launch compute nodes.",
// "properties": {
- // "Id": {
+ // "TemplateId": {
// "description": "The ID of the EC2 launch template to use to provision instances.",
// "type": "string"
// },
@@ -74,15 +74,14 @@ func computeNodeGroupDataSource(ctx context.Context) (datasource.DataSource, err
// }
// },
// "required": [
- // "Id",
// "Version"
// ],
// "type": "object"
// }
"custom_launch_template": schema.SingleNestedAttribute{ /*START ATTRIBUTE*/
Attributes: map[string]schema.Attribute{ /*START SCHEMA*/
- // Property: Id
- "id": schema.StringAttribute{ /*START ATTRIBUTE*/
+ // Property: TemplateId
+ "template_id": schema.StringAttribute{ /*START ATTRIBUTE*/
Description: "The ID of the EC2 launch template to use to provision instances.",
Computed: true,
}, /*END ATTRIBUTE*/
@@ -427,7 +426,6 @@ func computeNodeGroupDataSource(ctx context.Context) (datasource.DataSource, err
"custom_launch_template": "CustomLaunchTemplate",
"error_info": "ErrorInfo",
"iam_instance_profile_arn": "IamInstanceProfileArn",
- "id": "Id",
"instance_configs": "InstanceConfigs",
"instance_type": "InstanceType",
"max_instance_count": "MaxInstanceCount",
@@ -444,6 +442,7 @@ func computeNodeGroupDataSource(ctx context.Context) (datasource.DataSource, err
"status": "Status",
"subnet_ids": "SubnetIds",
"tags": "Tags",
+ "template_id": "TemplateId",
"version": "Version",
})
diff --git a/internal/service/cloudformation/schemas/AWS_PCS_ComputeNodeGroup.json b/internal/service/cloudformation/schemas/AWS_PCS_ComputeNodeGroup.json
index 3a346cea0..7a3742389 100644
--- a/internal/service/cloudformation/schemas/AWS_PCS_ComputeNodeGroup.json
+++ b/internal/service/cloudformation/schemas/AWS_PCS_ComputeNodeGroup.json
@@ -1,235 +1,24 @@
{
- "typeName": "AWS::PCS::ComputeNodeGroup",
- "description": "AWS::PCS::ComputeNodeGroup resource creates an AWS PCS compute node group.",
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-pcs.git",
- "definitions": {
- "ErrorInfo": {
- "type": "object",
- "description": "An error that occurred during resource provisioning.",
- "properties": {
- "Code": {
- "type": "string",
- "description": "The short-form error code."
- },
- "Message": {
- "type": "string",
- "description": "The detailed error information."
- }
- },
- "additionalProperties": false
- },
- "InstanceConfig": {
- "type": "object",
- "description": "An EC2 instance configuration AWS PCS uses to launch compute nodes.",
- "properties": {
- "InstanceType": {
- "type": "string",
- "description": "The EC2 instance type that AWS PCS can provision in the compute node group."
- }
- },
- "additionalProperties": false
- },
- "SlurmCustomSetting": {
- "type": "object",
- "description": "Additional settings that directly map to Slurm settings.",
- "properties": {
- "ParameterName": {
- "type": "string",
- "description": "AWS PCS supports configuration of the following Slurm parameters for compute node groups: Weight and RealMemory."
- },
- "ParameterValue": {
- "type": "string",
- "description": "The value for the configured Slurm setting."
- }
- },
- "additionalProperties": false,
- "required": [
- "ParameterName",
- "ParameterValue"
- ]
- },
- "SubnetId": {
- "type": "string",
- "description": "A VPC subnet ID."
- }
+ "tagging": {
+ "permissions": [
+ "pcs:TagResource",
+ "pcs:ListTagsForResource",
+ "pcs:UntagResource"
+ ],
+ "taggable": true,
+ "tagOnCreate": true,
+ "tagUpdatable": true,
+ "tagProperty": "/properties/Tags",
+ "cloudFormationSystemTags": true
},
- "properties": {
- "AmiId": {
- "type": "string",
- "description": "The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. If not provided, AWS PCS uses the AMI ID specified in the custom launch template.",
- "pattern": "^ami-[a-z0-9]+$"
- },
- "Arn": {
- "type": "string",
- "description": "The unique Amazon Resource Name (ARN) of the compute node group."
- },
- "ClusterId": {
- "type": "string",
- "description": "The ID of the cluster of the compute node group."
- },
- "CustomLaunchTemplate": {
- "type": "object",
- "description": "An Amazon EC2 launch template AWS PCS uses to launch compute nodes.",
- "properties": {
- "Id": {
- "type": "string",
- "description": "The ID of the EC2 launch template to use to provision instances."
- },
- "Version": {
- "type": "string",
- "description": "The version of the EC2 launch template to use to provision instances."
- }
- },
- "additionalProperties": false,
- "required": [
- "Id",
- "Version"
- ]
- },
- "ErrorInfo": {
- "type": "array",
- "description": "The list of errors that occurred during compute node group provisioning.",
- "insertionOrder": false,
- "items": {
- "$ref": "#/definitions/ErrorInfo"
- }
- },
- "IamInstanceProfileArn": {
- "type": "string",
- "description": "The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.",
- "pattern": "^arn:aws([a-zA-Z-]{0,10})?:iam::[0-9]{12}:instance-profile/.{1,128}$"
- },
- "Id": {
- "type": "string",
- "description": "The generated unique ID of the compute node group."
- },
- "InstanceConfigs": {
- "type": "array",
- "description": "A list of EC2 instance configurations that AWS PCS can provision in the compute node group.",
- "insertionOrder": false,
- "items": {
- "$ref": "#/definitions/InstanceConfig"
- }
- },
- "Name": {
- "type": "string",
- "description": "The name that identifies the compute node group."
- },
- "PurchaseOption": {
- "type": "string",
- "description": "Specifies how EC2 instances are purchased on your behalf. AWS PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option, it defaults to On-Demand.",
- "enum": [
- "ONDEMAND",
- "SPOT"
- ]
- },
- "ScalingConfiguration": {
- "type": "object",
- "description": "Specifies the boundaries of the compute node group auto scaling.",
- "properties": {
- "MaxInstanceCount": {
- "type": "integer",
- "description": "The upper bound of the number of instances allowed in the compute fleet.",
- "minimum": 0
- },
- "MinInstanceCount": {
- "type": "integer",
- "description": "The lower bound of the number of instances allowed in the compute fleet.",
- "minimum": 0
- }
- },
- "additionalProperties": false,
- "required": [
- "MaxInstanceCount",
- "MinInstanceCount"
- ]
- },
- "SlurmConfiguration": {
- "type": "object",
- "description": "Additional options related to the Slurm scheduler.",
- "properties": {
- "SlurmCustomSettings": {
- "type": "array",
- "description": "Additional Slurm-specific configuration that directly maps to Slurm settings.",
- "insertionOrder": false,
- "items": {
- "$ref": "#/definitions/SlurmCustomSetting"
- }
- }
- },
- "additionalProperties": false
- },
- "SpotOptions": {
- "type": "object",
- "description": "Additional configuration when you specify SPOT as the purchase option.",
- "properties": {
- "AllocationStrategy": {
- "type": "string",
- "description": "The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances. AWS PCS supports lowest price, capacity optimized, and price capacity optimized. If you don't provide this option, it defaults to price capacity optimized.",
- "enum": [
- "lowest-price",
- "capacity-optimized",
- "price-capacity-optimized"
- ]
- }
- },
- "additionalProperties": false
- },
- "Status": {
- "type": "string",
- "description": "The provisioning status of the compute node group. The provisioning status doesn't indicate the overall health of the compute node group.",
- "enum": [
- "CREATING",
- "ACTIVE",
- "UPDATING",
- "DELETING",
- "CREATE_FAILED",
- "DELETE_FAILED",
- "UPDATE_FAILED"
+ "handlers": {
+ "read": {
+ "permissions": [
+ "pcs:GetComputeNodeGroup",
+ "pcs:ListTagsForResource"
]
},
- "SubnetIds": {
- "type": "array",
- "description": "The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.",
- "insertionOrder": false,
- "items": {
- "$ref": "#/definitions/SubnetId"
- }
- },
- "Tags": {
- "description": "1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.",
- "patternProperties": {
- "": {
- "type": "string"
- }
- },
- "additionalProperties": false
- }
- },
- "required": [
- "ClusterId",
- "CustomLaunchTemplate",
- "IamInstanceProfileArn",
- "InstanceConfigs",
- "ScalingConfiguration",
- "SubnetIds"
- ],
- "additionalProperties": false,
- "primaryIdentifier": [
- "/properties/Arn"
- ],
- "createOnlyProperties": [
- "/properties/Name",
- "/properties/ClusterId",
- "/properties/InstanceConfigs"
- ],
- "readOnlyProperties": [
- "/properties/Arn",
- "/properties/ErrorInfo",
- "/properties/Id",
- "/properties/Status"
- ],
- "handlers": {
"create": {
"permissions": [
"ec2:DescribeImages",
@@ -252,12 +41,6 @@
],
"timeoutInMinutes": 60
},
- "read": {
- "permissions": [
- "pcs:GetComputeNodeGroup",
- "pcs:ListTagsForResource"
- ]
- },
"update": {
"permissions": [
"ec2:DescribeImages",
@@ -281,6 +64,22 @@
],
"timeoutInMinutes": 60
},
+ "list": {
+ "permissions": [
+ "pcs:ListClusters",
+ "pcs:ListComputeNodeGroups"
+ ],
+ "handlerSchema": {
+ "properties": {
+ "ClusterId": {
+ "$ref": "resource-schema.json#/properties/ClusterId"
+ }
+ },
+ "required": [
+ "ClusterId"
+ ]
+ }
+ },
"delete": {
"permissions": [
"ec2:DescribeImages",
@@ -303,34 +102,234 @@
"pcs:UntagResource"
],
"timeoutInMinutes": 60
+ }
+ },
+ "typeName": "AWS::PCS::ComputeNodeGroup",
+ "readOnlyProperties": [
+ "/properties/Arn",
+ "/properties/ErrorInfo",
+ "/properties/Id",
+ "/properties/Status"
+ ],
+ "description": "AWS::PCS::ComputeNodeGroup resource creates an AWS PCS compute node group.",
+ "createOnlyProperties": [
+ "/properties/Name",
+ "/properties/ClusterId",
+ "/properties/InstanceConfigs"
+ ],
+ "additionalProperties": false,
+ "primaryIdentifier": [
+ "/properties/Arn"
+ ],
+ "definitions": {
+ "InstanceConfig": {
+ "description": "An EC2 instance configuration AWS PCS uses to launch compute nodes.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "InstanceType": {
+ "description": "The EC2 instance type that AWS PCS can provision in the compute node group.",
+ "type": "string"
+ }
+ }
},
- "list": {
- "handlerSchema": {
- "properties": {
- "ClusterId": {
- "$ref": "resource-schema.json#/properties/ClusterId"
- }
+ "ErrorInfo": {
+ "description": "An error that occurred during resource provisioning.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "Message": {
+ "description": "The detailed error information.",
+ "type": "string"
},
- "required": [
- "ClusterId"
- ]
+ "Code": {
+ "description": "The short-form error code.",
+ "type": "string"
+ }
+ }
+ },
+ "SubnetId": {
+ "description": "A VPC subnet ID.",
+ "type": "string"
+ },
+ "SlurmCustomSetting": {
+ "description": "Additional settings that directly map to Slurm settings.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "ParameterValue": {
+ "description": "The value for the configured Slurm setting.",
+ "type": "string"
+ },
+ "ParameterName": {
+ "description": "AWS PCS supports configuration of the following Slurm parameters for compute node groups: Weight and RealMemory.",
+ "type": "string"
+ }
},
- "permissions": [
- "pcs:ListClusters",
- "pcs:ListComputeNodeGroups"
+ "required": [
+ "ParameterName",
+ "ParameterValue"
]
}
},
- "tagging": {
- "taggable": true,
- "tagOnCreate": true,
- "tagUpdatable": true,
- "cloudFormationSystemTags": true,
- "tagProperty": "/properties/Tags",
- "permissions": [
- "pcs:TagResource",
- "pcs:ListTagsForResource",
- "pcs:UntagResource"
- ]
+ "required": [
+ "ClusterId",
+ "CustomLaunchTemplate",
+ "IamInstanceProfileArn",
+ "InstanceConfigs",
+ "ScalingConfiguration",
+ "SubnetIds"
+ ],
+ "properties": {
+ "Status": {
+ "description": "The provisioning status of the compute node group. The provisioning status doesn't indicate the overall health of the compute node group.",
+ "type": "string",
+ "enum": [
+ "CREATING",
+ "ACTIVE",
+ "UPDATING",
+ "DELETING",
+ "CREATE_FAILED",
+ "DELETE_FAILED",
+ "UPDATE_FAILED"
+ ]
+ },
+ "ClusterId": {
+ "description": "The ID of the cluster of the compute node group.",
+ "type": "string"
+ },
+ "ErrorInfo": {
+ "description": "The list of errors that occurred during compute node group provisioning.",
+ "insertionOrder": false,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ErrorInfo"
+ }
+ },
+ "SpotOptions": {
+ "description": "Additional configuration when you specify SPOT as the purchase option.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "AllocationStrategy": {
+ "description": "The Amazon EC2 allocation strategy AWS PCS uses to provision EC2 instances. AWS PCS supports lowest price, capacity optimized, and price capacity optimized. If you don't provide this option, it defaults to price capacity optimized.",
+ "type": "string",
+ "enum": [
+ "lowest-price",
+ "capacity-optimized",
+ "price-capacity-optimized"
+ ]
+ }
+ }
+ },
+ "SlurmConfiguration": {
+ "description": "Additional options related to the Slurm scheduler.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "SlurmCustomSettings": {
+ "description": "Additional Slurm-specific configuration that directly maps to Slurm settings.",
+ "insertionOrder": false,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SlurmCustomSetting"
+ }
+ }
+ }
+ },
+ "SubnetIds": {
+ "description": "The list of subnet IDs where instances are provisioned by the compute node group. The subnets must be in the same VPC as the cluster.",
+ "insertionOrder": false,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/SubnetId"
+ }
+ },
+ "Name": {
+ "description": "The name that identifies the compute node group.",
+ "type": "string"
+ },
+ "ScalingConfiguration": {
+ "description": "Specifies the boundaries of the compute node group auto scaling.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "MaxInstanceCount": {
+ "description": "The upper bound of the number of instances allowed in the compute fleet.",
+ "type": "integer",
+ "minimum": 0
+ },
+ "MinInstanceCount": {
+ "description": "The lower bound of the number of instances allowed in the compute fleet.",
+ "type": "integer",
+ "minimum": 0
+ }
+ },
+ "required": [
+ "MaxInstanceCount",
+ "MinInstanceCount"
+ ]
+ },
+ "InstanceConfigs": {
+ "description": "A list of EC2 instance configurations that AWS PCS can provision in the compute node group.",
+ "insertionOrder": false,
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/InstanceConfig"
+ }
+ },
+ "Id": {
+ "description": "The generated unique ID of the compute node group.",
+ "type": "string"
+ },
+ "PurchaseOption": {
+ "description": "Specifies how EC2 instances are purchased on your behalf. AWS PCS supports On-Demand and Spot instances. For more information, see Instance purchasing options in the Amazon Elastic Compute Cloud User Guide. If you don't provide this option, it defaults to On-Demand.",
+ "type": "string",
+ "enum": [
+ "ONDEMAND",
+ "SPOT"
+ ]
+ },
+ "Arn": {
+ "description": "The unique Amazon Resource Name (ARN) of the compute node group.",
+ "type": "string"
+ },
+ "CustomLaunchTemplate": {
+ "description": "An Amazon EC2 launch template AWS PCS uses to launch compute nodes.",
+ "additionalProperties": false,
+ "type": "object",
+ "properties": {
+ "Version": {
+ "description": "The version of the EC2 launch template to use to provision instances.",
+ "type": "string"
+ },
+ "TemplateId": {
+ "description": "The ID of the EC2 launch template to use to provision instances.",
+ "type": "string"
+ }
+ },
+ "required": [
+ "Version"
+ ]
+ },
+ "Tags": {
+ "patternProperties": {
+ "": {
+ "type": "string"
+ }
+ },
+ "description": "1 or more tags added to the resource. Each tag consists of a tag key and tag value. The tag value is optional and can be an empty string.",
+ "additionalProperties": false
+ },
+ "AmiId": {
+ "pattern": "^ami-[a-z0-9]+$",
+ "description": "The ID of the Amazon Machine Image (AMI) that AWS PCS uses to launch instances. If not provided, AWS PCS uses the AMI ID specified in the custom launch template.",
+ "type": "string"
+ },
+ "IamInstanceProfileArn": {
+ "pattern": "^arn:aws([a-zA-Z-]{0,10})?:iam::[0-9]{12}:instance-profile/.{1,128}$",
+ "description": "The Amazon Resource Name (ARN) of the IAM instance profile used to pass an IAM role when launching EC2 instances. The role contained in your instance profile must have pcs:RegisterComputeNodeGroupInstance permissions attached to provision instances correctly.",
+ "type": "string"
+ }
}
}