mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 18:01:01 -06:00
Merge pull request #11605 from hashicorp/f-add-docs-ecs-cluster-datasource
documentation: Add documentation for the ECS Cluster Data Source
This commit is contained in:
commit
c83a971efb
@ -13,33 +13,33 @@ func dataSourceAwsEcsCluster() *schema.Resource {
|
||||
Read: dataSourceAwsEcsClusterRead,
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"cluster_name": &schema.Schema{
|
||||
"cluster_name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
|
||||
"arn": &schema.Schema{
|
||||
"arn": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"status": &schema.Schema{
|
||||
"status": {
|
||||
Type: schema.TypeString,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"pending_tasks_count": &schema.Schema{
|
||||
"pending_tasks_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"running_tasks_count": &schema.Schema{
|
||||
"running_tasks_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
|
||||
"registered_container_instances_count": &schema.Schema{
|
||||
"registered_container_instances_count": {
|
||||
Type: schema.TypeInt,
|
||||
Computed: true,
|
||||
},
|
||||
|
@ -13,7 +13,7 @@ func TestAccAWSEcsDataSource_ecsCluster(t *testing.T) {
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
{
|
||||
Config: testAccCheckAwsEcsClusterDataSourceConfig,
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr("data.aws_ecs_cluster.default", "status", "ACTIVE"),
|
||||
|
@ -0,0 +1,36 @@
|
||||
---
|
||||
layout: "aws"
|
||||
page_title: "AWS: aws_ecs_cluster"
|
||||
sidebar_current: "docs-aws-datasource-ecs-cluster"
|
||||
description: |-
|
||||
Provides details about an ecs cluster
|
||||
---
|
||||
|
||||
# aws\_ecs\_cluster
|
||||
|
||||
The ECS Cluster data source allows access to details of a specific
|
||||
cluster within an AWS ECS service.
|
||||
|
||||
## Example Usage
|
||||
|
||||
```
|
||||
data "aws_ecs_cluster" "ecs-mongo" {
|
||||
cluster_name = "ecs-mongo-production"
|
||||
}
|
||||
```
|
||||
|
||||
## Argument Reference
|
||||
|
||||
The following arguments are supported:
|
||||
|
||||
* `cluster_name` - (Required) The name of the ECS Cluster
|
||||
|
||||
## Attributes Reference
|
||||
|
||||
The following attributes are exported:
|
||||
|
||||
* `arn` - The ARN of the ECS Cluster
|
||||
* `status` - The status of the ECS Cluster
|
||||
* `pending_tasks_count` - The number of pending tasks for the ECS Cluster
|
||||
* `running_tasks_count` - The number of running tasks for the ECS Cluster
|
||||
* `registered_container_instances_count` - The number of registered container instances for the ECS Cluster
|
@ -50,6 +50,9 @@
|
||||
<li<%= sidebar_current("docs-aws-datasource-ebs-volume") %>>
|
||||
<a href="/docs/providers/aws/d/ebs_volume.html">aws_ebs_volume</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-aws-datasource-ecs-cluster") %>>
|
||||
<a href="/docs/providers/aws/d/ecs_cluster.html">aws_ecs_cluster</a>
|
||||
</li>
|
||||
<li<%= sidebar_current("docs-aws-datasource-ecs-container-definition") %>>
|
||||
<a href="/docs/providers/aws/d/ecs_container_definition.html">aws_ecs_container_definition</a>
|
||||
</li>
|
||||
|
Loading…
Reference in New Issue
Block a user