-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(awstf): support SSM resource resolution with AWS Terraform
- Loading branch information
Showing
42 changed files
with
1,034 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
output "endpoint" { | ||
value = aws_apigatewayv2_api.api_gateway.api_endpoint | ||
} | ||
} | ||
|
||
output "arn" { | ||
value = aws_apigatewayv2_api.api_gateway.arn | ||
} |
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,7 @@ | ||
output "arn" { | ||
value = aws_apigatewayv2_api.api_gateway.arn | ||
} | ||
|
||
output "endpoint" { | ||
value = aws_apigatewayv2_api.api_gateway.api_endpoint | ||
} |
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,36 @@ | ||
resource "random_string" "random" { | ||
length = 4 | ||
special = false | ||
} | ||
|
||
locals { | ||
policy_name = "nitric-param-access-${random_string.random.result}" | ||
} | ||
|
||
# Create a new SSM Parameter Store parameter | ||
resource "aws_ssm_parameter" "text_parameter" { | ||
name = var.parameter_name | ||
type = "String" | ||
value = var.parameter_value | ||
data_type = "text" | ||
} | ||
|
||
# Create the access policy | ||
resource "aws_iam_policy" "access_policy" { | ||
name = local.policy_name | ||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [{ | ||
Effect = "Allow" | ||
Action = "ssm:GetParameter" | ||
Resource = aws_ssm_parameter.text_parameter.arn | ||
}] | ||
}) | ||
} | ||
|
||
# Create the role policy attachment | ||
resource "aws_iam_role_policy_attachment" "policy_attachment" { | ||
for_each = var.access_role_names | ||
role = each.value | ||
policy_arn = aws_iam_policy.access_policy.arn | ||
} |
Empty file.
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 @@ | ||
variable "parameter_name" { | ||
description = "The name of the parameter" | ||
type = string | ||
} | ||
|
||
variable "access_role_names" { | ||
description = "The names of the roles that can access the parameter" | ||
type = set(string) | ||
} | ||
|
||
variable "parameter_value" { | ||
description = "The text value of the parameter" | ||
type = string | ||
} |
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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
output "websocket_arn" { | ||
description = "The ARN of the deployed websocket API" | ||
value = aws_apigatewayv2_api.websocket.arn | ||
value = aws_apigatewayv2_api.websocket.arn | ||
} | ||
|
||
output "endpoint" { | ||
description = "The endpoint of the deployed websocket API" | ||
value = aws_apigatewayv2_api.websocket.api_endpoint | ||
} | ||
|
||
output "websocket_exec_arn" { | ||
description = "The Execution ARN of the deployed websocket API" | ||
value = aws_apigatewayv2_api.websocket.execution_arn | ||
value = aws_apigatewayv2_api.websocket.execution_arn | ||
} |
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
Binary file not shown.
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
Binary file not shown.
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
Binary file modified
BIN
+780 Bytes
(100%)
cloud/aws/deploytf/generated/http_proxy/jsii/http_proxy-0.0.0.tgz
Binary file not shown.
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
Binary file modified
BIN
+960 Bytes
(100%)
cloud/aws/deploytf/generated/keyvalue/jsii/keyvalue-0.0.0.tgz
Binary file not shown.
Oops, something went wrong.