-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c823ad2
commit 9fca110
Showing
18 changed files
with
312 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:CreateCarrierGateway", | ||
"ec2:DeleteCarrierGateway", | ||
"ec2:DescribeCarrierGateways" | ||
], | ||
"attributes": { | ||
"tags": [ | ||
"ec2:CreateTags", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
15 changes: 15 additions & 0 deletions
15
src/mapping/aws/resource/ec2/aws_ec2_client_vpn_authorization_rule.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:DescribeClientVpnAuthorizationRules" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [ | ||
"ec2:DescribeClientVpnAuthorizationRules" | ||
] | ||
} | ||
] |
20 changes: 20 additions & 0 deletions
20
src/mapping/aws/resource/ec2/aws_ec2_client_vpn_endpoint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:CreateClientVpnEndpoint", | ||
"ec2:DeleteClientVpnEndpoint", | ||
"ec2:DescribeClientVpnEndpoints", | ||
"ec2:ModifyClientVpnEndpoint", | ||
"iam:CreateServiceLinkedRole" | ||
], | ||
"attributes": { | ||
"tags": [ | ||
"ec2:CreateTags", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
14 changes: 14 additions & 0 deletions
14
src/mapping/aws/resource/ec2/aws_ec2_client_vpn_network_association.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:AssociateClientVpnTargetNetwork", | ||
"ec2:DisassociateClientVpnTargetNetwork" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
17 changes: 17 additions & 0 deletions
17
src/mapping/aws/resource/ec2/aws_ec2_client_vpn_route.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:CreateClientVpnRoute", | ||
"ec2:DescribeClientVpnRoutes", | ||
"ec2:DeleteClientVpnRoute" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"ec2:DeleteClientVpnRoute" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:CreateFleet", | ||
"ec2:RunInstances", | ||
"ec2:DescribeFleets", | ||
"ec2:DeleteFleets" | ||
], | ||
"attributes": { | ||
"tags": [ | ||
"ec2:CreateTags", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"destroy": [ | ||
"ec2:DeleteFleets" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"ec2:AllocateHosts", | ||
"ec2:DescribeHosts", | ||
"ec2:ReleaseHosts" | ||
], | ||
"attributes": { | ||
"tags": [ | ||
"ec2:CreateTags", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"destroy": [ | ||
"ec2:ReleaseHosts" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "aws_ec2_carrier_gateway" "pike" { | ||
vpc_id = "ami-078a289ddf4b09ae0" | ||
tags = { | ||
pike = "permissions" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
terraform/aws/backup/aws_ec2_client_vpn_authorization_rule.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "aws_ec2_client_vpn_authorization_rule" "pike" { | ||
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.pike.id | ||
target_network_cidr = aws_subnet.example.cidr_block | ||
authorize_all_groups = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
resource "aws_ec2_client_vpn_endpoint" "pike" { | ||
description = "terraform-clientvpn-example" | ||
server_certificate_arn = aws_acm_certificate.pike.arn | ||
client_cidr_block = "10.0.0.0/16" | ||
|
||
authentication_options { | ||
type = "certificate-authentication" | ||
root_certificate_chain_arn = aws_acm_certificate.pike.arn | ||
} | ||
|
||
connection_log_options { | ||
enabled = true | ||
cloudwatch_log_group = aws_cloudwatch_log_group.lg.name | ||
cloudwatch_log_stream = aws_cloudwatch_log_stream.ls.name | ||
} | ||
} | ||
|
||
resource "aws_acm_certificate" "pike" { | ||
domain_name = "pike.freebeer.site" | ||
validation_method = "EMAIL" | ||
|
||
tags = { | ||
pike = "permissions" | ||
# Environment = "test" | ||
} | ||
|
||
lifecycle { | ||
create_before_destroy = true | ||
} | ||
} | ||
|
||
resource "aws_cloudwatch_log_group" "lg" { | ||
name = "pike" | ||
} | ||
|
||
resource "aws_cloudwatch_log_stream" "ls" { | ||
log_group_name = aws_cloudwatch_log_group.lg.name | ||
name = "pike" | ||
} |
12 changes: 12 additions & 0 deletions
12
terraform/aws/backup/aws_ec2_client_vpn_network_association.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
resource "aws_ec2_client_vpn_network_association" "pike" { | ||
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.pike.id | ||
subnet_id = aws_subnet.example.id | ||
} | ||
resource "aws_subnet" "example" { | ||
vpc_id = "vpc-06074a092930bc809" #vpc-0c9622709bb598517" | ||
cidr_block = "10.0.1.0/24" | ||
|
||
# tags = { | ||
# Name = "Main" | ||
# } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "aws_ec2_client_vpn_route" "pike" { | ||
client_vpn_endpoint_id = aws_ec2_client_vpn_endpoint.pike.id | ||
destination_cidr_block = "0.0.0.0/0" | ||
target_vpc_subnet_id = aws_ec2_client_vpn_network_association.pike.subnet_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
resource "aws_ec2_fleet" "pike" { | ||
launch_template_config { | ||
launch_template_specification { | ||
launch_template_id = aws_launch_template.example.id | ||
version = aws_launch_template.example.latest_version | ||
} | ||
} | ||
|
||
target_capacity_specification { | ||
default_target_capacity_type = "spot" | ||
total_target_capacity = 5 | ||
} | ||
} | ||
|
||
resource "aws_launch_template" "example" { | ||
name = "pike" | ||
image_id = "ami-078a289ddf4b09ae0" | ||
instance_type = "t2.micro" | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "aws_ec2_host" "pike" { | ||
availability_zone = "eu-west-2a" | ||
host_recovery = "on" | ||
auto_placement = "on" | ||
instance_type = "t3.micro" | ||
tags = { | ||
pike = "permissions" | ||
} | ||
} |
Oops, something went wrong.