File tree Expand file tree Collapse file tree 10 files changed +177
-115
lines changed
complete-email-validation Expand file tree Collapse file tree 10 files changed +177
-115
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : pipeline to push modules to registry
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ env :
7+ REGISTRY_HOST : https://registry.craftech.io
8+
9+ jobs :
10+ push-to-registry :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : push modules to registry
17+ uses :
craftech-io/[email protected] 18+ with :
19+ api-key : ${{ secrets.PRD_API_KEY_REGISTRY }}
20+ hostname : ${{ env.REGISTRY_HOST }}
21+ namespace : craftech
22+ module-name : ${{ github.event.repository.name }}
23+ system : aws
24+ version : ${{ github.ref_name }}
25+ modules-path : modules/
26+ lower-terraform-version : " 0.99.99"
27+ higher-terraform-version : " 1.5.6"
Original file line number Diff line number Diff line change @@ -92,14 +92,14 @@ module "acm" {
9292
9393| Name | Version |
9494| ------| ---------|
95- | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.12.26 |
96- | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 2.53 |
95+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 1.0.0, <=1.5.5 |
96+ | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 5.5.0 |
9797
9898## Providers
9999
100100| Name | Version |
101101| ------| ---------|
102- | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 2.53 |
102+ | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 5.5.0 |
103103
104104## Modules
105105
Original file line number Diff line number Diff line change 1+ # ---------------------------------------------------------------------------------------------------------------------
2+ # CONFIGURE OUR AWS CONNECTION
3+ # ---------------------------------------------------------------------------------------------------------------------
4+
5+ provider "aws" {
6+ # The AWS region in which all resources will be created
7+ region = var. aws_region
8+ }
9+
10+ # ---------------------------------------------------------------------------------------------------------------------
11+ # ACM
12+ # ---------------------------------------------------------------------------------------------------------------------
13+ module "acm" {
14+ source = " ../.."
15+
16+ create_certificate = var. create_certificate
17+ domain_name = var. domain_name
18+ zone_id = var. zone_id
19+
20+ # For certificate in private zone, validation has to be by email.
21+ validation_method = var. validation_method
22+ validate_certificate = var. validate_certificate
23+ validation_allow_overwrite_records = var. validation_allow_overwrite_records
24+ wait_for_validation = var. wait_for_validation
25+ subject_alternative_names = var. subject_alternative_names
26+ tags = var. tags
27+ }
Original file line number Diff line number Diff line change 1+ # ----------------------------------------------------------------------------------------------------------------------
2+ # Outputs to implement main module
3+ # ----------------------------------------------------------------------------------------------------------------------
4+ output "acm_certificate_arn" {
5+ description = " The ARN of the certificate"
6+ value = module. acm . acm_certificate_arn
7+ }
8+
9+ output "acm_certificate_domain_validation_options" {
10+ description = " A list of attributes to feed into other resources to complete certificate validation. Can have more than one element, e.g. if SANs are defined. Only set if DNS-validation was used."
11+ value = module. acm . acm_certificate_domain_validation_options
12+ }
13+
14+ output "acm_certificate_validation_emails" {
15+ description = " A list of addresses that received a validation E-Mail. Only set if EMAIL-validation was used."
16+ value = module. acm . acm_certificate_validation_emails
17+ }
18+
19+ output "validation_route53_record_fqdns" {
20+ description = " List of FQDNs built using the zone domain and name."
21+ value = module. acm . validation_route53_record_fqdns
22+ }
23+
24+ output "distinct_domain_names" {
25+ description = " List of distinct domains names used for the validation."
26+ value = module. acm . distinct_domain_names
27+ }
28+
29+ output "validation_domains" {
30+ description = " List of distinct domain validation options. This is useful if subject alternative names contain wildcards."
31+ value = module. acm . validation_domains
32+ }
Original file line number Diff line number Diff line change 1+ # ----------------------------------------------------------------------------------------------------------------------
2+ # REQUIRED PARAMETERS
3+ # ----------------------------------------------------------------------------------------------------------------------
4+
5+ variable "aws_region" {
6+ description = " The AWS Region where this VPC will exist."
7+ type = string
8+ default = " us-east-1"
9+ }
10+
11+ variable "domain_name" {
12+ description = " A domain name for which the certificate should be issued"
13+ type = string
14+ default = " "
15+ }
16+
17+ variable "validate_certificate" {
18+ description = " Whether to validate certificate by creating Route53 record"
19+ type = bool
20+ default = true
21+ }
22+
23+ variable "subject_alternative_names" {
24+ description = " A list of domains that should be SANs in the issued certificate"
25+ type = list (string )
26+ default = []
27+ }
28+
29+ variable "validation_method" {
30+ description = " Which method to use for validation. DNS or EMAIL are valid, NONE can be used for certificates that were imported into ACM and then into Terraform."
31+ type = string
32+ }
33+
34+ variable "zone_id" {
35+ description = " The ID of the hosted zone to contain this record."
36+ type = string
37+ default = null
38+ }
39+
40+ variable "create_certificate" {
41+ description = " Whether to create ACM certificate"
42+ type = bool
43+ default = true
44+ }
45+
46+ variable "validation_allow_overwrite_records" {
47+ description = " Whether to allow overwrite of Route53 records"
48+ type = bool
49+ default = true
50+ }
51+
52+ variable "wait_for_validation" {
53+ description = " Whether to wait for the validation to complete"
54+ type = bool
55+ default = true
56+ }
57+
58+ variable "tags" {
59+ description = " A mapping of tags to assign to the resource"
60+ type = map (string )
61+ default = {}
62+ }
Original file line number Diff line number Diff line change @@ -23,14 +23,14 @@ Note that this example may create resources which cost money. Run `terraform des
2323
2424| Name | Version |
2525| ------| ---------|
26- | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.12.26 |
27- | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 2.53 |
26+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= >= 1.0.0, <=1.5.5 |
27+ | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 5.5.0 |
2828
2929## Providers
3030
3131| Name | Version |
3232| ------| ---------|
33- | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 2.53 |
33+ | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 5.5.0 |
3434
3535## Modules
3636
Original file line number Diff line number Diff line change @@ -36,14 +36,14 @@ Note that this example may create resources which cost money. Run `terraform des
3636
3737| Name | Version |
3838| ------| ---------|
39- | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= 0.12.26 |
40- | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 2.53 |
39+ | <a name =" requirement_terraform " ></a > [ terraform] ( #requirement\_ terraform ) | >= >= 1.0.0, <=1.5.5 |
40+ | <a name =" requirement_aws " ></a > [ aws] ( #requirement\_ aws ) | >= 5.5.0 |
4141
4242## Providers
4343
4444| Name | Version |
4545| ------| ---------|
46- | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 2.53 |
46+ | <a name =" provider_aws " ></a > [ aws] ( #provider\_ aws ) | >= 5.5.0 |
4747
4848## Modules
4949
Original file line number Diff line number Diff line change 1+ # ----------------------------------------------------------------------------------------------------------------------
2+ # TERRAFORM VERSION
3+ # ----------------------------------------------------------------------------------------------------------------------
4+
5+ terraform {
6+ required_version = " >= 1.0.0, <=1.5.5"
7+
8+ # This module has been updated for helm v3 usage. We do not recommend using this version with helm v2.
9+ required_providers {
10+ aws = {
11+ source = " hashicorp/aws"
12+ version = " ~> 5.5.0"
13+ }
14+ }
15+ }
16+
17+ # ---------------------------------------------------------------------------------------------------------------------
18+ # CREATE ACM CERTIFICATE
19+ # ---------------------------------------------------------------------------------------------------------------------
20+
121locals {
222 # Get distinct list of domains and SANs
323 distinct_domain_names = distinct (
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments