Git Product home page Git Product logo

terraform-alicloud-api-gateway's Introduction

Alicloud ApiGateway Terraform Module terraform-alicloud-api-gateway

This Terraform module will first creates a Apigateway Api Group , then create an Apigateway Api basing on this group.

These types of resources are supported:

Usage

You can use this in your terraform template with the following steps.

  1. Adding a module resource to your template, e.g. main.tf

     module "apigateway" {
        source = "terraform-alicloud-modules/api-gateway/alicloud"
    
        # ApiGateway api group variables
        api_group_name = "TerraformApiGatewayGroup"
    
        api_group_description = "Module of APi gateway Group"
    
        # ApiGateway api variables
        api_name = "TerraformApiGatewayApi"
    
        api_description = "description"
    
        api_auth_type = "APP"
    
        api_request_config = [
            {
              protocol = "HTTP"
              method   = "GET"
              path     = "/test/path1"
              mode     = "MAPPING"
            }
          ]
    
        api_service_type = "HTTP"
    
        api_http_service_config = [
            {
              address   = "http://apigateway-backend.alicloudapi.com:8080"
              method    = "GET"
              path      = "/web/cloudapi"
              timeout   = 12
              aone_name = "cloudapi-openapi"
            }
          ]
    
        api_request_parameters = [
            {
              name         = "test"
              type         = "STRING"
              required     = "REQUIRED"
              in           = "QUERY"
              in_service   = "QUERY"
              name_service = "testparams"
            }
          ]
    
        api_stage_name = [
          "RELEASE",
          "PRE",
          "TEST"
         ]
    
  2. Setting values for the following variables:

    through environment variables

    • ALICLOUD_ACCESS_KEY
    • ALICLOUD_SECRET_KEY
    • ALICLOUD_REGION

    Inputs

    Name Description Type Default Required
    api_name The name of the api gateway api. string "" yes
    api_description The description of the api. string "" no
    api_auth_type The authorization Type including APP and ANONYMOUS. string "" yes
    api_request_config Request_config defines how users can send requests to your API. list "" yes
    api_service_type The type of backend service. Type including HTTP,VPC and MOCK. list "" yes
    api_http_service_config http_service_config defines the config list "" yes
    api_request_parameters Request_parameters defines . list "" no
    api_stage_names Stages that the api need to be deployed. Valid value: RELEASE,PRE and TEST. list "" no
    api_group_name The name of the api gateway group. string "" yes
    api_group_description The description of the api group. string "" no

    Outputs

    Name Description
    this_api_id the ID of api-gateway API
    this_api_group_id the ID of api-gateway API Group

Authors

Created and maintained by Lenny Bai(@geeklenny [email protected])

Reference

terraform-alicloud-api-gateway's People

Contributors

geeklenny avatar xiaozhu36 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.