Skip to content

Commit

Permalink
Merge pull request #14462 from knorby/issue-13532-alpn-policy
Browse files Browse the repository at this point in the history
Resource/lb_listener:  Add alpn policy argument
  • Loading branch information
YakDriver authored Apr 5, 2021
2 parents ae26f39 + fabe712 commit c891864
Show file tree
Hide file tree
Showing 8 changed files with 569 additions and 662 deletions.
7 changes: 7 additions & 0 deletions .changelog/14462.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/aws_lb_listener: Add `alpn_policy` argument
```

```release-note:enhancement
data-source/aws_lb_listener: Add `alpn_policy` argument
```
129 changes: 64 additions & 65 deletions aws/data_source_aws_lb_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,20 @@ func dataSourceAwsLbListener() *schema.Resource {
Read: dataSourceAwsLbListenerRead,

Schema: map[string]*schema.Schema{
"alpn_policy": {
Type: schema.TypeString,
Computed: true,
},
"arn": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ConflictsWith: []string{"load_balancer_arn", "port"},
},

"load_balancer_arn": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ConflictsWith: []string{"arn"},
},
"port": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ConflictsWith: []string{"arn"},
},

"protocol": {
Type: schema.TypeString,
Computed: true,
},

"ssl_policy": {
Type: schema.TypeString,
Computed: true,
},

"certificate_arn": {
Type: schema.TypeString,
Computed: true,
},

"default_action": {
Type: schema.TypeList,
Computed: true,
Expand Down Expand Up @@ -169,6 +148,46 @@ func dataSourceAwsLbListener() *schema.Resource {
},
},
},
"forward": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"stickiness": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"duration": {
Type: schema.TypeInt,
Computed: true,
},
"enabled": {
Type: schema.TypeBool,
Computed: true,
},
},
},
},
"target_group": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"arn": {
Type: schema.TypeString,
Computed: true,
},
"weight": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
},
},
},
"order": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -213,49 +232,29 @@ func dataSourceAwsLbListener() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"forward": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"target_group": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"arn": {
Type: schema.TypeString,
Computed: true,
},
"weight": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
"stickiness": {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"enabled": {
Type: schema.TypeBool,
Computed: true,
},
"duration": {
Type: schema.TypeInt,
Computed: true,
},
},
},
},
},
},
},
},
},
},
"load_balancer_arn": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ConflictsWith: []string{"arn"},
},
"port": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ConflictsWith: []string{"arn"},
},
"protocol": {
Type: schema.TypeString,
Computed: true,
},
"ssl_policy": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down
Loading

0 comments on commit c891864

Please sign in to comment.