File tree Expand file tree Collapse file tree 5 files changed +60
-26
lines changed
modules/self-signed-certificate Expand file tree Collapse file tree 5 files changed +60
-26
lines changed Original file line number Diff line number Diff line change 6262| [ aws_route53_record.default_ingress] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/route53_record ) | resource |
6363| [ aws_s3_bucket.elastic_stack] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket ) | resource |
6464| [ aws_s3_bucket.gitlab_runner_cache] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket ) | resource |
65+ | [ aws_s3_bucket_acl.elastic_stack_acl] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_acl ) | resource |
66+ | [ aws_s3_bucket_acl.gitlab_runner_acl] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_acl ) | resource |
67+ | [ aws_s3_bucket_lifecycle_configuration.gitlab_runner_lifecycle] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_lifecycle_configuration ) | resource |
6568| [ aws_s3_bucket_public_access_block.elastic_stack_public_access_block] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_public_access_block ) | resource |
6669| [ aws_s3_bucket_public_access_block.gitlab_runner_cache_public_access_block] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_public_access_block ) | resource |
70+ | [ aws_s3_bucket_server_side_encryption_configuration.elastic_stack_encryption] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_server_side_encryption_configuration ) | resource |
71+ | [ aws_s3_bucket_server_side_encryption_configuration.gitlab_runner_encryption] ( https://registry.terraform.io/providers/aws/4.10.0/docs/resources/s3_bucket_server_side_encryption_configuration ) | resource |
6772| [ helm_release.aws_loadbalancer_controller] ( https://registry.terraform.io/providers/helm/2.5.1/docs/resources/release ) | resource |
6873| [ helm_release.aws_node_termination_handler] ( https://registry.terraform.io/providers/helm/2.5.1/docs/resources/release ) | resource |
6974| [ helm_release.cert_manager] ( https://registry.terraform.io/providers/helm/2.5.1/docs/resources/release ) | resource |
142147| <a name =" output_victoria_metrics_k8s_stack_get_grafana_admin_password " ></a > [ victoria\_ metrics\_ k8s\_ stack\_ get\_ grafana\_ admin\_ password] ( #output\_ victoria\_ metrics\_ k8s\_ stack\_ get\_ grafana\_ admin\_ password ) | Command which gets admin password from kubernetes secret |
143148| <a name =" output_victoria_metrics_k8s_stack_grafana_admin_password " ></a > [ victoria\_ metrics\_ k8s\_ stack\_ grafana\_ admin\_ password] ( #output\_ victoria\_ metrics\_ k8s\_ stack\_ grafana\_ admin\_ password ) | Grafana admin password |
144149| <a name =" output_victoria_metrics_k8s_stack_grafana_domain_name " ></a > [ victoria\_ metrics\_ k8s\_ stack\_ grafana\_ domain\_ name] ( #output\_ victoria\_ metrics\_ k8s\_ stack\_ grafana\_ domain\_ name ) | Grafana dashboards address |
145- <!-- END_TF_DOCS -->
150+ <!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change @@ -798,22 +798,32 @@ resource "aws_s3_bucket" "elastic_stack" {
798798 count = local. elk . enabled ? 1 : 0
799799
800800 bucket = " ${ local . name } -elastic-stack"
801- acl = " private"
802801 force_destroy = true
803- server_side_encryption_configuration {
804- rule {
805- apply_server_side_encryption_by_default {
806- sse_algorithm = " aws:kms"
807- }
808- }
809- }
810-
811802 tags = {
812803 Name = " ${ local . name } -elastic-stack"
813804 Environment = local.env
814805 }
815806}
816807
808+ resource "aws_s3_bucket_acl" "elastic_stack_acl" {
809+ count = local. elk . enabled ? 1 : 0
810+
811+ bucket = aws_s3_bucket. elastic_stack [0 ]. id
812+ acl = " private"
813+ }
814+
815+ resource "aws_s3_bucket_server_side_encryption_configuration" "elastic_stack_encryption" {
816+ count = local. elk . enabled ? 1 : 0
817+
818+ bucket = aws_s3_bucket. elastic_stack [0 ]. bucket
819+
820+ rule {
821+ apply_server_side_encryption_by_default {
822+ sse_algorithm = " aws:kms"
823+ }
824+ }
825+ }
826+
817827resource "aws_s3_bucket_public_access_block" "elastic_stack_public_access_block" {
818828 count = local. elk . enabled ? 1 : 0
819829
Original file line number Diff line number Diff line change @@ -116,30 +116,50 @@ resource "aws_s3_bucket" "gitlab_runner_cache" {
116116 count = local. gitlab_runner . enabled ? 1 : 0
117117
118118 bucket = " ${ local . name } -gitlab-runner-cache"
119- acl = " private"
120119 force_destroy = true
121- server_side_encryption_configuration {
122- rule {
123- apply_server_side_encryption_by_default {
124- sse_algorithm = " aws:kms"
125- }
126- }
127- }
128-
129120 tags = {
130121 Name = " ${ local . name } -gitlab-runner-cache"
131122 Environment = local.env
132123 }
133124
134- lifecycle_rule {
135- id = " gitlab-runner-cache-lifecycle-rule"
136- enabled = true
137- tags = {
138- " rule" = " gitlab-runner-cache-lifecycle-rule"
125+ }
126+
127+ resource "aws_s3_bucket_acl" "gitlab_runner_acl" {
128+ count = local. gitlab_runner . enabled ? 1 : 0
129+
130+ bucket = aws_s3_bucket. gitlab_runner_cache [0 ]. id
131+ acl = " private"
132+ }
133+
134+ resource "aws_s3_bucket_server_side_encryption_configuration" "gitlab_runner_encryption" {
135+ count = local. gitlab_runner . enabled ? 1 : 0
136+
137+ bucket = aws_s3_bucket. gitlab_runner_cache [0 ]. bucket
138+
139+ rule {
140+ apply_server_side_encryption_by_default {
141+ sse_algorithm = " aws:kms"
139142 }
143+ }
144+ }
145+
146+ resource "aws_s3_bucket_lifecycle_configuration" "gitlab_runner_lifecycle" {
147+ bucket = aws_s3_bucket. gitlab_runner_cache [0 ]. id
148+
149+ rule {
150+ id = " gitlab-runner-cache-lifecycle-rule"
140151 expiration {
141152 days = 120
142153 }
154+
155+ filter {
156+ and {
157+ tags = {
158+ rule = " gitlab-runner-cache-lifecycle-rule"
159+ }
160+ }
161+ }
162+ status = " Enabled"
143163 }
144164}
145165
Original file line number Diff line number Diff line change @@ -39,4 +39,4 @@ No modules.
3939| <a name =" output_cert_pem " ></a > [ cert\_ pem] ( #output\_ cert\_ pem ) | n/a |
4040| <a name =" output_p8 " ></a > [ p8] ( #output\_ p8 ) | n/a |
4141| <a name =" output_private_key_pem " ></a > [ private\_ key\_ pem] ( #output\_ private\_ key\_ pem ) | n/a |
42- <!-- END_TF_DOCS -->
42+ <!-- END_TF_DOCS -->
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ resource "tls_private_key" "this" {
33}
44
55resource "tls_self_signed_cert" "this" {
6- key_algorithm = tls_private_key. this . algorithm
76 private_key_pem = tls_private_key. this . private_key_pem
87 validity_period_hours = var. validity_period_hours
98 early_renewal_hours = var. early_renewal_hours
You can’t perform that action at this time.
0 commit comments