Skip to content

Commit

Permalink
Remove optional name attribute from aws_appautoscaling_target
Browse files Browse the repository at this point in the history
  - ScalableTargets do not have a name
  - I think this was copied from aws_appautoscaling_policy
  • Loading branch information
niclic committed Feb 1, 2017
1 parent 3700352 commit 0b9fc76
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
15 changes: 0 additions & 15 deletions builtin/providers/aws/resource_aws_appautoscaling_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ func resourceAwsAppautoscalingTarget() *schema.Resource {
Delete: resourceAwsAppautoscalingTargetDelete,

Schema: map[string]*schema.Schema{
"name": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: func(v interface{}, k string) (ws []string, errors []error) {
// https://github.com/boto/botocore/blob/9f322b1/botocore/data/autoscaling/2011-01-01/service-2.json#L1862-L1873
value := v.(string)
if len(value) > 255 {
errors = append(errors, fmt.Errorf(
"%q cannot be longer than 255 characters", k))
}
return
},
},
"max_capacity": &schema.Schema{
Type: schema.TypeInt,
Required: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,9 @@ resource "aws_appautoscaling_target" "tgt" {

The following arguments are supported:

* `name` - (Required) The name of the policy.
* `resource_id` - (Required) The Resource ID on which you want the Application AutoScaling policy to apply to. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such as `service/default/sample-webapp`. For Amazon EC2 Spot fleet requests, the resource type is `spot-fleet-request`, and the identifier is the Spot fleet request ID; for example, `spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE`.
* `scalable_dimension` - (Required) The scalable dimension of the scalable target. The scalable dimension contains the service namespace, resource type, and scaling property, such as `ecs:service:DesiredCount` for the desired task count of an Amazon ECS service, or `ec2:spot-fleet-request:TargetCapacity` for the target capacity of an Amazon EC2 Spot fleet request.
* `service_namespace` - (Required) The AWS service namespace of the scalable target. Valid values are `ecs` for Amazon ECS services and `ec2` Amazon EC2 Spot fleet requests.
* `max_capacity` - (Required) The max capacity of the scalable target.
* `min_capacity` - (Required) The min capacity of the scalable target.
* `role_arn` - (Required) The ARN of the IAM role that allows Application AutoScaling to modify your scalable target on your behalf.


## Attribute Reference
* `name` - The scaling policy's name.

0 comments on commit 0b9fc76

Please sign in to comment.