Skip to content

Commit

Permalink
Merge pull request #14361 from ewbankkit/f-appmesh-timeout-configuration
Browse files Browse the repository at this point in the history
AppMesh timeout configuration support
  • Loading branch information
breathingdust authored Oct 8, 2020
2 parents a99b188 + c14869d commit bb61d28
Show file tree
Hide file tree
Showing 8 changed files with 1,514 additions and 26 deletions.
140 changes: 140 additions & 0 deletions aws/resource_aws_appmesh_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ func resourceAwsAppmeshRoute() *schema.Resource {
},

"method_name": {
Type: schema.TypeString,
Optional: true,
},

"prefix": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.StringLenBetween(0, 50),
Expand Down Expand Up @@ -257,6 +262,58 @@ func resourceAwsAppmeshRoute() *schema.Resource {
},
},
},

"timeout": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"idle": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appmesh.DurationUnit_Values(), false),
},

"value": {
Type: schema.TypeInt,
Required: true,
},
},
},
},

"per_request": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appmesh.DurationUnit_Values(), false),
},

"value": {
Type: schema.TypeInt,
Required: true,
},
},
},
},
},
},
},
},
},
},
Expand Down Expand Up @@ -318,6 +375,37 @@ func resourceAwsAppmeshRoute() *schema.Resource {
},
},
},

"timeout": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"idle": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appmesh.DurationUnit_Values(), false),
},

"value": {
Type: schema.TypeInt,
Required: true,
},
},
},
},
},
},
},
},
},
},
Expand Down Expand Up @@ -546,6 +634,58 @@ func appmeshRouteHttpRouteSchema() *schema.Schema {
},
},
},

"timeout": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"idle": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appmesh.DurationUnit_Values(), false),
},

"value": {
Type: schema.TypeInt,
Required: true,
},
},
},
},

"per_request": {
Type: schema.TypeList,
Optional: true,
MinItems: 0,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"unit": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice(appmesh.DurationUnit_Values(), false),
},

"value": {
Type: schema.TypeInt,
Required: true,
},
},
},
},
},
},
},
},
},
}
Expand Down
Loading

0 comments on commit bb61d28

Please sign in to comment.