Skip to content

Commit

Permalink
Merge pull request #22793 from thiagokiyota/enhancement-ec2_client_vp…
Browse files Browse the repository at this point in the history
…n_endpoint

resource/aws_ec2_client_vpn_endpoint: Various new arguments
  • Loading branch information
ewbankkit authored Jan 31, 2022
2 parents 26ca7e0 + a7b332d commit 790869e
Show file tree
Hide file tree
Showing 15 changed files with 1,252 additions and 460 deletions.
19 changes: 19 additions & 0 deletions .changelog/22793.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```release-note:enhancement
resource/aws_ec2_client_vpn_endpoint: Add `session_timeout_hours` argument
```

```release-note:bug-fix
resource/aws_ec2_client_vpn_endpoint: Prevent `InvalidParameterValue: DNS servers config is conflicting` error when disabling DNS servers
```

```release-note:enhancement
resource/aws_ec2_client_vpn_endpoint: Add `vpn_port` argument
```

```release-note:enhancement
resource/aws_ec2_client_vpn_endpoint: Add `client_connect_options` argument
```

```release-note:enhancement
resource/aws_ec2_client_vpn_endpoint: Add `client_login_banner_options` argument
```
4 changes: 2 additions & 2 deletions internal/service/ec2/client_vpn_authorization_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func resourceClientVPNAuthorizationRuleRead(d *schema.ResourceData, meta interfa
d.Get("access_group_id").(string),
)

if tfawserr.ErrMessageContains(err, ErrCodeClientVpnAuthorizationRuleNotFound, "") {
if tfawserr.ErrMessageContains(err, ErrCodeInvalidClientVpnAuthorizationRuleNotFound, "") {
log.Printf("[WARN] EC2 Client VPN authorization rule (%s) not found, removing from state", d.Id())
d.SetId("")
return nil
Expand Down Expand Up @@ -171,7 +171,7 @@ func deleteClientVpnAuthorizationRule(conn *ec2.EC2, input *ec2.RevokeClientVpnI
aws.StringValue(input.AccessGroupId))

_, err := conn.RevokeClientVpnIngress(input)
if tfawserr.ErrMessageContains(err, ErrCodeClientVpnAuthorizationRuleNotFound, "") {
if tfawserr.ErrMessageContains(err, ErrCodeInvalidClientVpnAuthorizationRuleNotFound, "") {
return nil
}
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/ec2/client_vpn_authorization_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func testAccCheckClientVPNAuthorizationRuleDestroy(s *terraform.State) error {
if err == nil {
return fmt.Errorf("Client VPN authorization rule (%s) still exists", rs.Primary.ID)
}
if tfawserr.ErrMessageContains(err, tfec2.ErrCodeClientVpnAuthorizationRuleNotFound, "") || tfawserr.ErrMessageContains(err, tfec2.ErrCodeClientVpnEndpointIdNotFound, "") {
if tfawserr.ErrMessageContains(err, tfec2.ErrCodeInvalidClientVpnAuthorizationRuleNotFound, "") || tfawserr.ErrMessageContains(err, tfec2.ErrCodeInvalidClientVpnEndpointIdNotFound, "") {
continue
}
return err
Expand Down
Loading

0 comments on commit 790869e

Please sign in to comment.