github.com/adrian-bl/terraform@v0.7.0-rc2.0.20160705220747-de0a34fc3517/website/source/docs/providers/aws/r/api_gateway_deployment.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_api_gateway_deployment"
     4  sidebar_current: "docs-aws-resource-api-gateway-deployment"
     5  description: |-
     6    Provides an API Gateway Deployment.
     7  ---
     8  
     9  # aws\_api\_gateway\_deployment
    10  
    11  Provides an API Gateway Deployment.
    12  
    13  -> **Note:** Depends on having `aws_api_gateway_method` inside your rest api. To ensure this
    14  you might need to add an explicit `depends_on` for clean runs.
    15  
    16  ## Example Usage
    17  
    18  ```
    19  resource "aws_api_gateway_rest_api" "MyDemoAPI" {
    20    name = "MyDemoAPI"
    21    description = "This is my API for demonstration purposes"
    22  }
    23  
    24  resource "aws_api_gateway_resource" "test" {
    25    rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
    26    parent_id = "${aws_api_gateway_rest_api.MyDemoAPI.root_resource_id}"
    27    path_part = "test"
    28  }
    29  
    30  resource "aws_api_gateway_method" "test" {
    31    rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
    32    resource_id = "${aws_api_gateway_resource.test.id}"
    33    http_method = "GET"
    34    authorization = "NONE"
    35  }
    36  
    37  resource "aws_api_gateway_deployment" "MyDemoDeployment" {
    38    depends_on = ["aws_api_gateway_integration.test"]
    39  
    40    rest_api_id = "${aws_api_gateway_rest_api.MyDemoAPI.id}"
    41  
    42    variables = {
    43      "answer" = "42"
    44    }
    45  }
    46  ```
    47  
    48  ## Argument Reference
    49  
    50  The following arguments are supported:
    51  
    52  * `rest_api_id` - (Required) The ID of the associated REST API
    53  * `stage_name` - (Required) The name of the stage
    54  * `description` - (Optional) The description of the deployment
    55  * `stage_description` - (Optional) The description of the stage
    56  * `variables` - (Optional) A map that defines variables for the stage
    57  
    58  ## Attribute Reference
    59  
    60  The following attributes are exported:
    61  
    62  * `id` - The ID of the deployment