Skip to content

Commit

Permalink
test, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Feb 22, 2018
1 parent 197abd8 commit f8da78b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion aws/resource_aws_api_gateway_stage.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,14 @@ func resourceAwsApiGatewayStageUpdate(d *schema.ResourceData, meta interface{})

d.Partial(true)

if tagErr := setTagsAPIGatewayStage(conn, d, "hoge"); tagErr != nil {
stageArn := arnString(
meta.(*AWSClient).partition,
meta.(*AWSClient).region,
"apigateway",
"",
fmt.Sprintf("/restapis/%s/stages/%s", d.Get("rest_api_id").(string), d.Get("stage_name").(string)),
)
if tagErr := setTagsAPIGatewayStage(conn, d, stageArn); tagErr != nil {
return tagErr
}
d.SetPartial("tags")
Expand Down
3 changes: 2 additions & 1 deletion aws/resource_aws_api_gateway_stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestAccAWSAPIGatewayStage_basic(t *testing.T) {
testAccCheckAWSAPIGatewayStageExists("aws_api_gateway_stage.test", &conf),
resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "stage_name", "prod"),
resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "cache_cluster_enabled", "false"),
resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "1"),
resource.TestCheckResourceAttr("aws_api_gateway_stage.test", "tags.%", "2"),
),
},
resource.TestStep{
Expand Down Expand Up @@ -203,6 +203,7 @@ resource "aws_api_gateway_stage" "test" {
}
tags {
Name = "tf-test"
ExtraName = "tf-test"
}
}
`
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/api_gateway_stage.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ The following arguments are supported:
* `description` - (Optional) The description of the stage
* `documentation_version` - (Optional) The version of the associated API documentation
* `variables` - (Optional) A map that defines the stage variables
* `tags` - (Optional) A mapping of tags to assign to the resource.

0 comments on commit f8da78b

Please sign in to comment.