Skip to content

Commit 3525f94

Browse files
Merge branch 'main' into dependabot/go_modules/github.com/dvsekhvalnov/jose2go-1.6.0
2 parents bb11ee7 + 46ed8a2 commit 3525f94

File tree

52 files changed

+505
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+505
-239
lines changed

.github/workflows/ci.yml

+115-110
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,119 @@
11
env:
2-
AWS_EC2_METADATA_DISABLED: true
2+
AWS_EC2_METADATA_DISABLED: true
33
jobs:
4-
get-modules:
5-
outputs:
6-
matrix: ${{steps.list_dirs.outputs.matrix}}
7-
runs-on: ubuntu-20.04
8-
steps:
9-
- uses: actions/checkout@v3
10-
- id: list_dirs
11-
run: echo "::set-output name=matrix::$(ls -d */|sed -e 's/\///'|grep -v 'bless-ca\|scripts'|jq -cnR '[inputs | select(length>0)]')"
12-
lint:
13-
name: lint
14-
runs-on: ARM64
15-
steps:
16-
- name: Generate token
17-
id: generate_token
18-
uses: tibdex/github-app-token@v2
19-
with:
20-
app_id: ${{ secrets.CZI_GITHUB_HELPER_APP_ID }}
21-
private_key: ${{ secrets.CZI_GITHUB_HELPER_PK }}
22-
- uses: actions/checkout@v4
23-
with:
24-
token: ${{ steps.generate_token.outputs.token }}
25-
ref: ${{ github.event.pull_request.head.ref }}
26-
- uses: actions/setup-go@v5
27-
with:
28-
go-version-file: go.mod
29-
cache: true
30-
go-version: '>=1.19.0'
31-
cache-dependency-path: |
32-
go.sum
33-
- name: golangci-lint
34-
uses: golangci/golangci-lint-action@v6
35-
with:
36-
version: v1.60.3
37-
github-token: ${{ secrets.GITHUB_TOKEN }}
38-
39-
test:
40-
name: test ${{ matrix.module }}
41-
needs: get-modules
42-
runs-on: ubuntu-latest
43-
permissions:
44-
id-token: write
45-
contents: read
46-
steps:
47-
- uses: actions/checkout@v3
48-
- id: filter
49-
uses: dorny/paths-filter@v2
50-
with:
51-
filters: |
52-
module:
53-
- '${{ matrix.module }}/**'
54-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
55-
uses: hashicorp/setup-terraform@v1
56-
with:
57-
terraform_version: 0.14.5
58-
terraform_wrapper: "false"
59-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
60-
uses: actions/setup-go@v2
61-
with:
62-
go-version: 1.18
63-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
64-
name: Install bless provider
65-
run: curl -s https://raw.githubusercontent.com/chanzuckerberg/terraform-provider-bless/main/download.sh | bash -s -- -b $HOME/.terraform.d/plugins/ -d
66-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
67-
name: Check bless provider
68-
run: ls -al $HOME/.terraform.d/plugins/terraform-provider-bless*
69-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
70-
name: Install Snowflake provider
71-
run: curl -s https://raw.githubusercontent.com/Snowflake-Labs/terraform-provider-snowflake/v0.53.0/download.sh | bash -s -- -b $HOME/.terraform.d/plugins/ -d v0.53.0
72-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
73-
name: Check Snowflake provider
74-
run: ls -al $HOME/.terraform.d/plugins/terraform-provider-snowflake*
75-
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
76-
name: Configure AWS Credentials
77-
uses: aws-actions/configure-aws-credentials@v2
78-
with:
79-
aws-region: us-west-2
80-
role-duration-seconds: 1200
81-
role-session-name: cztackCICDModuleTests
82-
role-to-assume: "arn:aws:iam::119435350371:role/ci/cztack-1"
83-
strategy:
84-
fail-fast: false
85-
matrix:
86-
module:
87-
- ${{fromJson(needs.get-modules.outputs.matrix)}}
88-
- snowflake-account-grant-all
89-
- snowflake-database-grant-all
90-
- snowflake-external-table-grant-all
91-
- snowflake-file-format-grant-all
92-
- snowflake-function-grant-all
93-
- snowflake-integration-grant-all
94-
- snowflake-masking-policy-grant-all
95-
- snowflake-materialized-view-grant-all
96-
- snowflake-pipe-grant-all
97-
- snowflake-procedure-grant-all
98-
- snowflake-resource-monitor-grant-all
99-
- snowflake-row-access-policy-grant-all
100-
- snowflake-schema-grant-all
101-
- snowflake-sequence-grant-all
102-
- snowflake-stage-grant-all
103-
- snowflake-stream-grant-all
104-
- snowflake-table-grant-all
105-
- snowflake-task-grant-all
106-
- snowflake-view-grant-all
107-
- snowflake-warehouse-grant-all
108-
timeout-minutes: 45
4+
get-modules:
5+
permissions: {}
6+
outputs:
7+
matrix: ${{steps.list_dirs.outputs.matrix}}
8+
runs-on: ubuntu-20.04
9+
steps:
10+
- uses: actions/checkout@v3
11+
- id: list_dirs
12+
run: echo "::set-output name=matrix::$(ls -d */|sed -e 's/\///'|grep -v 'bless-ca\|scripts'|jq -cnR '[inputs | select(length>0)]')"
13+
lint:
14+
name: lint
15+
runs-on: ARM64
16+
permissions:
17+
contents: read
18+
id-token: write
19+
steps:
20+
- id: generate_token
21+
name: Generate token
22+
uses: tibdex/github-app-token@v2
23+
with:
24+
app_id: ${{ secrets.CZI_GITHUB_HELPER_APP_ID }}
25+
private_key: ${{ secrets.CZI_GITHUB_HELPER_PK }}
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: ${{ github.event.pull_request.head.ref }}
29+
token: ${{ steps.generate_token.outputs.token }}
30+
- uses: actions/setup-go@v5
31+
with:
32+
cache: true
33+
cache-dependency-path: |
34+
go.sum
35+
go-version: '>=1.19.0'
36+
go-version-file: go.mod
37+
- name: golangci-lint
38+
uses: golangci/golangci-lint-action@v6
39+
with:
40+
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
version: v1.64.6
42+
test:
43+
name: test ${{ matrix.module }}
44+
needs: get-modules
45+
permissions:
46+
contents: read
47+
id-token: write
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
- id: filter
52+
uses: dorny/paths-filter@v2
53+
with:
54+
filters: |
55+
module:
56+
- '${{ matrix.module }}/**'
57+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
58+
uses: hashicorp/setup-terraform@v1
59+
with:
60+
terraform_version: 0.14.5
61+
terraform_wrapper: "false"
62+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
63+
uses: actions/setup-go@v2
64+
with:
65+
go-version: 1.18
66+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
67+
name: Install bless provider
68+
run: curl -s https://raw.githubusercontent.com/chanzuckerberg/terraform-provider-bless/main/download.sh | bash -s -- -b $HOME/.terraform.d/plugins/ -d
69+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
70+
name: Check bless provider
71+
run: ls -al $HOME/.terraform.d/plugins/terraform-provider-bless*
72+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
73+
name: Install Snowflake provider
74+
run: curl -s https://raw.githubusercontent.com/Snowflake-Labs/terraform-provider-snowflake/v0.53.0/download.sh | bash -s -- -b $HOME/.terraform.d/plugins/ -d v0.53.0
75+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
76+
name: Check Snowflake provider
77+
run: ls -al $HOME/.terraform.d/plugins/terraform-provider-snowflake*
78+
- if: github.event == 'push' || steps.filter.outputs.module == 'true'
79+
name: Configure AWS Credentials
80+
uses: aws-actions/configure-aws-credentials@v2
81+
with:
82+
aws-region: us-west-2
83+
role-duration-seconds: 1200
84+
role-session-name: cztackCICDModuleTests
85+
role-to-assume: arn:aws:iam::119435350371:role/ci/cztack-1
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
module:
90+
- ${{fromJson(needs.get-modules.outputs.matrix)}}
91+
- snowflake-account-grant-all
92+
- snowflake-database-grant-all
93+
- snowflake-external-table-grant-all
94+
- snowflake-file-format-grant-all
95+
- snowflake-function-grant-all
96+
- snowflake-integration-grant-all
97+
- snowflake-masking-policy-grant-all
98+
- snowflake-materialized-view-grant-all
99+
- snowflake-pipe-grant-all
100+
- snowflake-procedure-grant-all
101+
- snowflake-resource-monitor-grant-all
102+
- snowflake-row-access-policy-grant-all
103+
- snowflake-schema-grant-all
104+
- snowflake-sequence-grant-all
105+
- snowflake-stage-grant-all
106+
- snowflake-stream-grant-all
107+
- snowflake-table-grant-all
108+
- snowflake-tag-grant-all
109+
- snowflake-task-grant-all
110+
- snowflake-user-grant-all
111+
- snowflake-view-grant-all
112+
- snowflake-warehouse-grant-all
113+
timeout-minutes: 45
109114
name: CI
110115
"on":
111-
pull_request: null
112-
push:
113-
branches:
114-
- main
116+
pull_request: null
117+
push:
118+
branches:
119+
- main

aws-assume-role-policy/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ data "aws_iam_policy_document" "assume-role" {
5252

5353
actions = ["sts:AssumeRoleWithWebIdentity", "sts:TagSession"]
5454
condition {
55-
test = "${oidc.value["condition_operator"]}"
55+
test = oidc.value["condition_operator"]
5656
variable = "${oidc.value["provider"]}:${oidc.value["jwt_condition"]}"
5757
values = oidc.value["client_ids"]
5858
}

aws-aurora-mysql/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ No resources.
7272
| <a name="input_database_username"></a> [database\_username](#input\_database\_username) | Default user to be created. | `string` | n/a | yes |
7373
| <a name="input_db_deletion_protection"></a> [db\_deletion\_protection](#input\_db\_deletion\_protection) | n/a | `string` | `false` | no |
7474
| <a name="input_db_parameters"></a> [db\_parameters](#input\_db\_parameters) | Instance params you can set. [Doc](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Reference.html#AuroraMySQL.Reference.Parameters.Instance) | `list(any)` | <pre>[<br> {<br> "apply_method": "pending-reboot",<br> "name": "general_log",<br> "value": 1<br> },<br> {<br> "apply_method": "pending-reboot",<br> "name": "slow_query_log",<br> "value": "1"<br> },<br> {<br> "apply_method": "pending-reboot",<br> "name": "long_query_time",<br> "value": "0"<br> },<br> {<br> "apply_method": "pending-reboot",<br> "name": "log_output",<br> "value": "file"<br> },<br> {<br> "apply_method": "pending-reboot",<br> "name": "log_queries_not_using_indexes",<br> "value": "1"<br> }<br>]</pre> | no |
75-
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | The version of the engine to be used for aurora-mysql. | `string` | `"5.7"` | no |
75+
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | The version of the engine to be used for aurora-mysql. | `string` | `"8.0"` | no |
7676
| <a name="input_env"></a> [env](#input\_env) | Env for tagging and naming. See [doc](../README.md#consistent-tagging). | `string` | n/a | yes |
7777
| <a name="input_iam_database_authentication_enabled"></a> [iam\_database\_authentication\_enabled](#input\_iam\_database\_authentication\_enabled) | n/a | `string` | `false` | no |
78-
| <a name="iam_roles"></a> [iam\_roles](#input\_iam\roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
78+
| <a name="input_iam_roles"></a> [iam\_roles](#input\_iam\_roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
7979
| <a name="input_ingress_cidr_blocks"></a> [ingress\_cidr\_blocks](#input\_ingress\_cidr\_blocks) | A list of CIDR blocks that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
8080
| <a name="input_ingress_security_groups"></a> [ingress\_security\_groups](#input\_ingress\_security\_groups) | A list of security groups that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
81-
| <a name="input_instance_class"></a> [instance\_class](#input\_instance\_class) | See valid instance types [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Performance.html) | `string` | `"db.t2.small"` | no |
81+
| <a name="input_instance_class"></a> [instance\_class](#input\_instance\_class) | See valid instance types [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Managing.Performance.html) | `string` | `"db.t3.medium"` | no |
8282
| <a name="input_instance_count"></a> [instance\_count](#input\_instance\_count) | Number of instances to create in this cluster. | `string` | `1` | no |
8383
| <a name="input_kms_key_id"></a> [kms\_key\_id](#input\_kms\_key\_id) | If provided, storage will be encrypted with this key, otherwise an AWS-managed key is used. (Encryption is always on). | `string` | `""` | no |
8484
| <a name="input_owner"></a> [owner](#input\_owner) | Owner for tagging and naming. See [doc](../README.md#consistent-tagging). | `string` | n/a | yes |

aws-aurora-mysql/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ variable "iam_database_authentication_enabled" {
165165
}
166166

167167
variable "iam_roles" {
168-
type = list(string)
169-
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
170-
default = []
168+
type = list(string)
169+
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
170+
default = []
171171
}
172172

173173
variable "db_deletion_protection" {

aws-aurora-postgres/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ No resources.
6565
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | The version of Postgres to use. This should be a *prefix* if auto version upgrades are enabled. (Docs: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#engine_version) | `string` | `"10"` | no |
6666
| <a name="input_env"></a> [env](#input\_env) | Env for tagging and naming. See [doc](../README.md#consistent-tagging). | `string` | n/a | yes |
6767
| <a name="input_iam_database_authentication_enabled"></a> [iam\_database\_authentication\_enabled](#input\_iam\_database\_authentication\_enabled) | n/a | `string` | `false` | no |
68-
| <a name="iam_roles"></a> [iam\_roles](#input\_iam\roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
68+
| <a name="input_iam_roles"></a> [iam\_roles](#input\_iam\_roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
6969
| <a name="input_ingress_cidr_blocks"></a> [ingress\_cidr\_blocks](#input\_ingress\_cidr\_blocks) | A list of CIDR blocks that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
7070
| <a name="input_ingress_security_groups"></a> [ingress\_security\_groups](#input\_ingress\_security\_groups) | A list of security groups that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
7171
| <a name="input_instance_class"></a> [instance\_class](#input\_instance\_class) | See valid instance types [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Managing.html) | `string` | `"db.r4.large"` | no |

aws-aurora-postgres/outputs.tf

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
output "database_name" {
2-
value = module.aurora.database_name
2+
value = module.aurora.database_name
33
sensitive = false
44
}
55

66
output "master_username" {
7-
value = module.aurora.database_username
7+
value = module.aurora.database_username
88
sensitive = false
99
}
1010

1111
output "master_password" {
12-
value = module.aurora.database_password
12+
value = module.aurora.database_password
1313
sensitive = true
1414
}
1515

1616
output "endpoint" {
17-
value = module.aurora.endpoint
17+
value = module.aurora.endpoint
1818
sensitive = false
1919
}
2020

2121
output "reader_endpoint" {
22-
value = module.aurora.reader_endpoint
22+
value = module.aurora.reader_endpoint
2323
sensitive = false
2424
}
2525

2626
output "port" {
27-
value = module.aurora.port
27+
value = module.aurora.port
2828
sensitive = false
2929
}
3030

3131
output "cluster_resource_id" {
32-
value = module.aurora.cluster_resource_id
32+
value = module.aurora.cluster_resource_id
3333
sensitive = false
3434
}
3535

3636
output "cluster_id" {
37-
value = module.aurora.rds_cluster_id
37+
value = module.aurora.rds_cluster_id
3838
sensitive = false
3939
}
4040

aws-aurora-postgres/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ variable "iam_database_authentication_enabled" {
126126
}
127127

128128
variable "iam_roles" {
129-
type = list(string)
130-
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
131-
default = []
129+
type = list(string)
130+
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
131+
default = []
132132
}
133133

134134
variable "ca_cert_identifier" {

aws-aurora/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ No modules.
4848
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | n/a | `string` | n/a | yes |
4949
| <a name="input_env"></a> [env](#input\_env) | Env for tagging and naming. See [doc](../README.md#consistent-tagging). | `string` | n/a | yes |
5050
| <a name="input_iam_database_authentication_enabled"></a> [iam\_database\_authentication\_enabled](#input\_iam\_database\_authentication\_enabled) | Specifies whether or not mappings of AWS Identity and Access Management (IAM) accounts to database accounts is enabled. | `string` | `true` | no |
51-
| <a name="iam_roles"></a> [iam\_roles](#input\_iam\roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
51+
| <a name="input_iam_roles"></a> [iam\_roles](#input\_iam\_roles) | A list of ARNs for the IAM roles to associate to the RDS Cluster. | `list(string)` | `[]` | no |
5252
| <a name="input_ingress_cidr_blocks"></a> [ingress\_cidr\_blocks](#input\_ingress\_cidr\_blocks) | A list of CIDR blocks that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
5353
| <a name="input_ingress_security_groups"></a> [ingress\_security\_groups](#input\_ingress\_security\_groups) | A list of security groups that should be allowed to communicate with this Aurora cluster. | `list(string)` | `[]` | no |
5454
| <a name="input_instance_class"></a> [instance\_class](#input\_instance\_class) | n/a | `string` | `"db.t2.small"` | no |

aws-aurora/variables.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ variable "iam_database_authentication_enabled" {
119119
}
120120

121121
variable "iam_roles" {
122-
type = list(string)
123-
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
124-
default = []
122+
type = list(string)
123+
description = "A list of ARNs for the IAM roles to associate to the RDS Cluster."
124+
default = []
125125
}
126126

127127
variable "enabled_cloudwatch_logs_exports" {

aws-cloudfront-domain-redirect/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module domain-redirect {
6565
| <a name="input_lambda_cloudwatch_log_retention_in_days"></a> [lambda\_cloudwatch\_log\_retention\_in\_days](#input\_lambda\_cloudwatch\_log\_retention\_in\_days) | Retention policy (in days) for Lambda function's logs in Cloudwatch | `number` | `null` | no |
6666
| <a name="input_owner"></a> [owner](#input\_owner) | Owner for tagging and naming. See [doc](../README.md#consistent-tagging) | `string` | n/a | yes |
6767
| <a name="input_project"></a> [project](#input\_project) | Project for tagging and naming. See [doc](../README.md#consistent-tagging) | `string` | n/a | yes |
68+
| <a name="input_redirect_bucket_name"></a> [redirect\_bucket\_name](#input\_redirect\_bucket\_name) | Unique name for the redirect bucket (provide if possible). | `string` | `null` | no |
6869
| <a name="input_service"></a> [service](#input\_service) | Service for tagging and naming. See [doc](../README.md#consistent-tagging) | `string` | n/a | yes |
6970
| <a name="input_source_domain"></a> [source\_domain](#input\_source\_domain) | The domain that will be redirected from. | `string` | n/a | yes |
7071
| <a name="input_source_domain_zone_id"></a> [source\_domain\_zone\_id](#input\_source\_domain\_zone\_id) | Route53 zone id for the source domain. | `string` | n/a | yes |

0 commit comments

Comments
 (0)