Skip to content

Commit

Permalink
Fix tests (#86)
Browse files Browse the repository at this point in the history
* update vpc version in examples

* formatting

* fix linting issues
  • Loading branch information
joe-niland authored Mar 19, 2024
1 parent 68e4f20 commit 93251d8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ provider "awsutils" {

module "vpc" {
source = "cloudposse/vpc/aws"
version = "0.18.1"
version = "2.1.1"

cidr_block = "172.16.0.0/16"
ipv4_primary_cidr_block = "172.16.0.0/16"

context = module.this.context
}
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
Expand Down
12 changes: 6 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ resource "aws_route53_record" "amazonses_verification_record" {
name = "_amazonses.${var.domain}"
type = "TXT"
ttl = "600"
records = [join("", aws_ses_domain_identity.ses_domain.*.verification_token)]
records = [join("", aws_ses_domain_identity.ses_domain[*].verification_token)]
}

resource "aws_ses_domain_dkim" "ses_domain_dkim" {
count = module.this.enabled ? 1 : 0

domain = join("", aws_ses_domain_identity.ses_domain.*.domain)
domain = join("", aws_ses_domain_identity.ses_domain[*].domain)
}

resource "aws_route53_record" "amazonses_dkim_record" {
Expand Down Expand Up @@ -50,7 +50,7 @@ data "aws_iam_policy_document" "ses_policy" {

statement {
actions = var.iam_permissions
resources = concat(aws_ses_domain_identity.ses_domain.*.arn, var.iam_allowed_resources)
resources = concat(aws_ses_domain_identity.ses_domain[*].arn, var.iam_allowed_resources)
}
}

Expand All @@ -67,7 +67,7 @@ resource "aws_iam_group_policy" "ses_group_policy" {
name = module.this.id
group = aws_iam_group.ses_users[0].name

policy = join("", data.aws_iam_policy_document.ses_policy.*.json)
policy = join("", data.aws_iam_policy_document.ses_policy[*].json)
}

resource "aws_iam_user_group_membership" "ses_user" {
Expand All @@ -93,9 +93,9 @@ module "ses_user" {

resource "aws_iam_user_policy" "sending_emails" {
#bridgecrew:skip=BC_AWS_IAM_16:Skipping `Ensure IAM policies are attached only to groups or roles` check because this module intentionally attaches IAM policy directly to a user.
count = local.create_user_enabled && ! local.create_group_enabled ? 1 : 0
count = local.create_user_enabled && !local.create_group_enabled ? 1 : 0

name = module.this.id
policy = join("", data.aws_iam_policy_document.ses_policy.*.json)
policy = join("", data.aws_iam_policy_document.ses_policy[*].json)
user = module.ses_user.user_name
}

0 comments on commit 93251d8

Please sign in to comment.