Skip to content

Commit

Permalink
app mesh mostly
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Jan 23, 2025
1 parent 706258b commit e63f4ac
Show file tree
Hide file tree
Showing 24 changed files with 448 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ jobs:
run: go test ./... -coverprofile=./cover.out

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@cb6530fbecd68d5f1ee7a3dcd113450ea8d5d6d4 # v5.1.2
uses: codecov/codecov-action@bc114756858cde29e12b6c88f6224db397f7447a # v5.2.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3407610120cd5656b6fc71991415cb50748b9489 # codeql-bundle-v2.20.1
uses: github/codeql-action/init@d90e07f32eb48924444e8069d5f1fbaaad678989 # codeql-bundle-v2.20.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -57,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@3407610120cd5656b6fc71991415cb50748b9489 # codeql-bundle-v2.20.1
uses: github/codeql-action/autobuild@d90e07f32eb48924444e8069d5f1fbaaad678989 # codeql-bundle-v2.20.2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -70,4 +70,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3407610120cd5656b6fc71991415cb50748b9489 # codeql-bundle-v2.20.1
uses: github/codeql-action/analyze@d90e07f32eb48924444e8069d5f1fbaaad678989 # codeql-bundle-v2.20.2
9 changes: 9 additions & 0 deletions src/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,15 @@ var (
"aws_xray_group": awsXrayGroup,
"aws_xray_sampling_rule": awsXraySamplingRule,
"backend": s3backend,
"aws_api_gateway_domain_name_access_association": awsApiGatewayDomainNameAccessAssociation,
"aws_appconfig_deployment_strategy": awsAppconfigDeploymentStrategy,
"aws_appmesh_gateway_route": awsAppmeshGatewayRoute,
"aws_appmesh_mesh": awsAppmeshMesh,
"aws_appmesh_route": awsAppmeshRoute,
"aws_appmesh_virtual_gateway": awsAppmeshVirtualGateway,
"aws_appmesh_virtual_node": awsAppmeshVirtualNode,
"aws_appmesh_virtual_router": awsAppmeshVirtualRouter,
"aws_appmesh_virtual_service": awsAppmeshVirtualService,
}
)

Expand Down
9 changes: 0 additions & 9 deletions src/coverage/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@ Datasource percentage coverage 100.00

./resource.ps1 aws_amplify_backend_environment
./resource.ps1 aws_amplify_webhook
./resource.ps1 aws_api_gateway_domain_name_access_association
./resource.ps1 aws_appconfig_deployment_strategy
./resource.ps1 aws_appfabric_app_authorization
./resource.ps1 aws_appfabric_app_authorization_connection
./resource.ps1 aws_appfabric_app_bundle
./resource.ps1 aws_appfabric_ingestion
./resource.ps1 aws_appfabric_ingestion_destination
./resource.ps1 aws_appmesh_gateway_route
./resource.ps1 aws_appmesh_mesh
./resource.ps1 aws_appmesh_route
./resource.ps1 aws_appmesh_virtual_gateway
./resource.ps1 aws_appmesh_virtual_node
./resource.ps1 aws_appmesh_virtual_router
./resource.ps1 aws_appmesh_virtual_service
./resource.ps1 aws_apprunner_connection
./resource.ps1 aws_apprunner_custom_domain_association
./resource.ps1 aws_apprunner_deployment
Expand Down
27 changes: 27 additions & 0 deletions src/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -3069,3 +3069,30 @@ var awsS3tablesTablePolicy []byte

//go:embed mapping/aws/resource/s3tables/aws_s3tables_table_bucket.json
var awsS3tablesTableBucket []byte

//go:embed mapping/aws/resource/apigateway/aws_api_gateway_domain_name_access_association.json
var awsApiGatewayDomainNameAccessAssociation []byte

//go:embed mapping/aws/resource/appconfig/aws_appconfig_deployment_strategy.json
var awsAppconfigDeploymentStrategy []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_gateway_route.json
var awsAppmeshGatewayRoute []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_mesh.json
var awsAppmeshMesh []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_route.json
var awsAppmeshRoute []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_virtual_gateway.json
var awsAppmeshVirtualGateway []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_virtual_node.json
var awsAppmeshVirtualNode []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_virtual_router.json
var awsAppmeshVirtualRouter []byte

//go:embed mapping/aws/resource/appmesh/aws_appmesh_virtual_service.json
var awsAppmeshVirtualService []byte
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"apigateway:POST",
"apigateway:GET",
"apigateway:DELETE"
],
"attributes": {
"tags": []
},
"destroy": [
"apigateway:DELETE",
"apigateway:GET"
],
"modify": [],
"plan": [
"apigateway:GET"
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"apply": [
"appconfig:CreateDeploymentStrategy",
"appconfig:DeleteDeploymentStrategy",
"appconfig:GetDeploymentStrategy",
"appconfig:ListTagsForResource",
"appconfig:UpdateDeploymentStrategy"
],
"attributes": {
"tags": [
"appconfig:TagResource",
"appconfig:UntagResource"
]
},
"destroy": [
"appconfig:DeleteDeploymentStrategy"
],
"modify": [
"appconfig:UpdateDeploymentStrategy"
],
"plan": [
"appconfig:GetDeploymentStrategy",
"appconfig:ListTagsForResource"
]
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_gateway_route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeGatewayRoute",
"appmesh:CreateGatewayRoute",
"appmesh:DeleteGatewayRoute",
"appmesh:UpdateGatewayRoute",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_mesh.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeMesh",
"appmesh:CreateMesh",
"appmesh:DeleteMesh",
"appmesh:UpdateMesh",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_route.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeRoute",
"appmesh:CreateRoute",
"appmesh:DeleteRoute",
"appmesh:UpdateRoute",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_virtual_gateway.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeVirtualGateway",
"appmesh:CreateVirtualGateway",
"appmesh:DeleteVirtualGateway",
"appmesh:UpdateVirtualGateway",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_virtual_node.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeVirtualNode",
"appmesh:CreateVirtualNode",
"appmesh:DeleteVirtualNode",
"appmesh:UpdateVirtualNode",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_virtual_router.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeVirtualRouter",
"appmesh:CreateVirtualRouter",
"appmesh:UpdateVirtualRouter",
"appmesh:DeleteVirtualRouter",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
20 changes: 20 additions & 0 deletions src/mapping/aws/resource/appmesh/aws_appmesh_virtual_service.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"apply": [
"appmesh:DescribeVirtualService",
"appmesh:CreateVirtualService",
"appmesh:DeleteVirtualService",
"appmesh:UpdateVirtualService",
"appmesh:ListTagsForResource"
],
"attributes": {
"tags": [
"appmesh:TagResource",
"appmesh:UntagResource"
]
},
"destroy": [],
"modify": [],
"plan": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "aws_api_gateway_domain_name_access_association" "pike" {
access_association_source = aws_vpc_endpoint.example.id
access_association_source_type = "VPCE"
domain_name_arn = aws_api_gateway_domain_name.example.domain_name_arn
}
13 changes: 13 additions & 0 deletions terraform/aws/backup/aws_appconfig_deployment_strategy.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "aws_appconfig_deployment_strategy" "pike" {
name = "example-deployment-strategy-tf"
description = "Example Deployment Strategy"
deployment_duration_in_minutes = 3
final_bake_time_in_minutes = 4
growth_factor = 10
growth_type = "LINEAR"
replicate_to = "NONE"

tags = {
Type = "AppConfig Deployment Strategy"
}
}
25 changes: 25 additions & 0 deletions terraform/aws/backup/aws_appmesh_gateway_route.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "aws_appmesh_gateway_route" "pike" {
name = "example-gateway-route"
mesh_name = aws_appmesh_mesh.pike.name
virtual_gateway_name = aws_appmesh_virtual_gateway.pike.name

spec {
http_route {
action {
target {
virtual_service {
virtual_service_name = aws_appmesh_virtual_service.pike.name
}
}
}

match {
prefix = "/"
}
}
}

tags = {
Environment = "test"
}
}
13 changes: 13 additions & 0 deletions terraform/aws/backup/aws_appmesh_mesh.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
resource "aws_appmesh_mesh" "pike" {
name = "simpleapp"

spec {
egress_filter {
type = "ALLOW_ALL"
}
}

tags = {
pike = "permimssion"
}
}
25 changes: 25 additions & 0 deletions terraform/aws/backup/aws_appmesh_route.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "aws_appmesh_route" "pike" {
name = "serviceB-route"
mesh_name = aws_appmesh_mesh.pike.id
virtual_router_name = aws_appmesh_virtual_router.pike.name

spec {
http_route {
match {
prefix = "/"
}

action {
weighted_target {
virtual_node = aws_appmesh_virtual_node.serviceb1.name
weight = 90
}

weighted_target {
virtual_node = aws_appmesh_virtual_node.serviceb2.name
weight = 10
}
}
}
}
}
17 changes: 17 additions & 0 deletions terraform/aws/backup/aws_appmesh_virtual_gateway.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
resource "aws_appmesh_virtual_gateway" "pike" {
name = "example-virtual-gateway"
mesh_name = aws_appmesh_mesh.pike.name

spec {
listener {
port_mapping {
port = 8080
protocol = "http"
}
}
}

tags = {
Environment = "test"
}
}
Loading

0 comments on commit e63f4ac

Please sign in to comment.