No requirements.
Name | Version |
---|---|
archive | n/a |
aws | n/a |
No modules.
Name | Type |
---|---|
aws_api_gateway_deployment.handson_deployment | resource |
aws_api_gateway_integration.lambda_integration | resource |
aws_api_gateway_method.route_methods | resource |
aws_api_gateway_method_response.route_method_responses | resource |
aws_api_gateway_resource.handson | resource |
aws_api_gateway_resource.root | resource |
aws_api_gateway_rest_api.handson | resource |
aws_iam_policy.policy | resource |
aws_iam_role.handson | resource |
aws_iam_role_policy_attachment.api_gateway | resource |
aws_iam_role_policy_attachment.handson | resource |
aws_lambda_function.lambda_functions | resource |
archive_file.lambda_archives | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
lambda_functions | n/a | map(object({ |
n/a | yes |
name_role | n/a | any |
n/a | yes |
region | n/a | any |
n/a | yes |
routes | n/a | map(object({ |
n/a | yes |
Name | Description |
---|---|
api_gateway_urls | n/a |
create oidc
create role
add trust relationship on custom trust policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn_oidc"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"gitlab.revolve.team:sub": "project_path:name_orga/name_repo:ref_type:branch:ref:branch_name"
}
}
}
]
}
change:
- arn_oidc
- name_orga
- name_repo
- branch_name (default
main
)
add policie for deploy terraform
download zip here
create repo on gitlabci
add variable on project in gitlabci settings/cicd:
- ROLE_ARN
create repo gitlab
create personal access token
create iam role on your aws account with custom trust policie
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::897644935672:role/ecs_task_execution_role"
},
"Action": "sts:AssumeRole"
}
]
}
add policie on your role for deploy terraform
send arn iam role for authorize jenkins to assume your role
create credentials jenkins administrer:
-
click jenkins/credentials/system/identifiants globaux/add creation
-
create secret gitlab on jenkins with id on specify with your name for sample
- create secret aws on jenkins with id on specify with your name for sample specifies your role create on aws
create multibranche pipeline jenkins:
- click new item
- choose name
- choose multibranch pipeline
- click add on branch sources choose gitlab project
- choose your Checkout Credentials
- fill owner
- choose your project
- add parameters Filter by name and fill main on Include
- choose other parameters if necessary