This repository was archived by the owner on Jan 31, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +51
-5
lines changed Expand file tree Collapse file tree 4 files changed +51
-5
lines changed Original file line number Diff line number Diff line change @@ -83,11 +83,13 @@ Available targets:
83
83
lint Lint terraform code
84
84
85
85
```
86
-
87
86
## Inputs
88
87
89
88
| Name | Description | Type | Default | Required |
90
89
| ------| -------------| :----:| :-----:| :-----:|
90
+ | acm_enabled | Set to false to prevent the acm module from creating any resources | string | ` true ` | no |
91
+ | acm_primary_domain | A domain name for which the certificate should be issued | string | - | yes |
92
+ | acm_san_domains | A list of domains that should be SANs in the issued certificate | list | ` <list> ` | no |
91
93
| attributes | Additional attributes (e.g. ` 1 ` ) | list | ` <list> ` | no |
92
94
| chamber_format | Format to store parameters in SSM, for consumption with chamber | string | ` /%s/%s ` | no |
93
95
| chamber_service | ` chamber ` service name. See [ chamber usage] ( https://github.com/segmentio/chamber#usage ) for more details | string | `` | no |
@@ -133,6 +135,8 @@ Available targets:
133
135
134
136
| Name | Description |
135
137
| ------| -------------|
138
+ | acm_arn | The ARN of the certificate |
139
+ | acm_domain_validation_options | CNAME records that are added to the DNS zone to complete certificate validation |
136
140
| aurora_postgres_cluster_name | Aurora Postgres Cluster Identifier |
137
141
| aurora_postgres_database_name | Aurora Postgres Database name |
138
142
| aurora_postgres_master_hostname | Aurora Postgres DB Master hostname |
Original file line number Diff line number Diff line change
1
+ variable "acm_enabled" {
2
+ description = " Set to false to prevent the acm module from creating any resources"
3
+ default = " true"
4
+ }
5
+
6
+ variable "acm_primary_domain" {
7
+ description = " A domain name for which the certificate should be issued"
8
+ }
9
+
10
+ variable "acm_san_domains" {
11
+ type = " list"
12
+ default = []
13
+ description = " A list of domains that should be SANs in the issued certificate"
14
+ }
15
+
16
+ resource "aws_acm_certificate" "default" {
17
+ count = " ${ var . acm_enabled ? 1 : 0 } "
18
+ domain_name = " ${ var . acm_primary_domain } "
19
+ validation_method = " DNS"
20
+ subject_alternative_names = [" ${ var . acm_san_domains } " ]
21
+ tags = " ${ var . tags } "
22
+
23
+ lifecycle {
24
+ create_before_destroy = true
25
+ }
26
+ }
27
+
28
+ output "acm_arn" {
29
+ value = " ${ join (" " , aws_acm_certificate. default . * . arn )} "
30
+ description = " The ARN of the certificate"
31
+ }
32
+
33
+ output "acm_domain_validation_options" {
34
+ value = " ${ flatten (aws_acm_certificate. default . * . domain_validation_options )} "
35
+ description = " CNAME records that are added to the DNS zone to complete certificate validation"
36
+ }
Original file line number Diff line number Diff line change 1
-
2
1
## Inputs
3
2
4
3
| Name | Description | Type | Default | Required |
5
4
| ------| -------------| :----:| :-----:| :-----:|
5
+ | acm_enabled | Set to false to prevent the acm module from creating any resources | string | ` true ` | no |
6
+ | acm_primary_domain | A domain name for which the certificate should be issued | string | - | yes |
7
+ | acm_san_domains | A list of domains that should be SANs in the issued certificate | list | ` <list> ` | no |
6
8
| attributes | Additional attributes (e.g. ` 1 ` ) | list | ` <list> ` | no |
7
9
| chamber_format | Format to store parameters in SSM, for consumption with chamber | string | ` /%s/%s ` | no |
8
10
| chamber_service | ` chamber ` service name. See [ chamber usage] ( https://github.com/segmentio/chamber#usage ) for more details | string | `` | no |
48
50
49
51
| Name | Description |
50
52
| ------| -------------|
53
+ | acm_arn | The ARN of the certificate |
54
+ | acm_domain_validation_options | CNAME records that are added to the DNS zone to complete certificate validation |
51
55
| aurora_postgres_cluster_name | Aurora Postgres Cluster Identifier |
52
56
| aurora_postgres_database_name | Aurora Postgres Database name |
53
57
| aurora_postgres_master_hostname | Aurora Postgres DB Master hostname |
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ module "vpc" {
8
8
stage = " ${ var . stage } "
9
9
name = " ${ var . name } "
10
10
attributes = " ${ var . attributes } "
11
- tags = " ${ local . tags } "
12
11
cidr_block = " ${ var . vpc_cidr_block } "
13
12
}
14
13
@@ -19,7 +18,6 @@ module "subnets" {
19
18
stage = " ${ var . stage } "
20
19
name = " ${ var . name } "
21
20
attributes = " ${ var . attributes } "
22
- tags = " ${ local . tags } "
23
21
region = " ${ var . region } "
24
22
vpc_id = " ${ module . vpc . vpc_id } "
25
23
igw_id = " ${ module . vpc . igw_id } "
@@ -28,7 +26,7 @@ module "subnets" {
28
26
}
29
27
30
28
module "codefresh_backing_services" {
31
- source = " git::https://github.com/cloudposse/terraform-aws-codefresh-backing-services.git?ref=0.1.0 "
29
+ source = " ../../ "
32
30
enabled = " true"
33
31
name = " ${ var . name } "
34
32
namespace = " ${ var . namespace } "
@@ -38,6 +36,10 @@ module "codefresh_backing_services" {
38
36
subnet_ids = [" ${ module . subnets . private_subnet_ids } " ]
39
37
security_groups = [" ${ module . vpc . vpc_default_security_group_id } " ]
40
38
39
+ acm_enabled = " true"
40
+ acm_primary_domain = " example.com"
41
+ acm_san_domains = [" *.example.com" ]
42
+
41
43
chamber_format = " /%s/%s"
42
44
chamber_service = " codefresh-backing-services"
43
45
kms_key_id = " ${ format (" alias/%s-%s-chamber" , var. namespace , var. stage )} "
You can’t perform that action at this time.
0 commit comments