Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module fix #5

Merged
merged 9 commits into from
Feb 2, 2024
Merged

Module fix #5

merged 9 commits into from
Feb 2, 2024

Conversation

Riqardos
Copy link
Contributor

@Riqardos Riqardos commented Jan 29, 2024

Description

What was done:

  • Fixed optional zone_id variable
  • added rabbit_mq configuration to production example
  • added managed services configurations to development example
  • fixed quota service to use document_db tls
  • added AWS pricing link
  • updated Readme.md
  • added terraform state backend in examples

Type of change

  • A bug fix (PR prefix fix)
  • A new feature (PR prefix feat)
  • A code change that neither fixes a bug nor adds a feature (PR prefix refactor)
  • Adding missing tests or correcting existing tests (PR prefix test)
  • Changes that do not affect the meaning of the code like white-spaces, formatting, missing semi-colons, etc. (PR prefix style)
  • Changes to our CI configuration files and scripts (PR prefix ci)
  • Documentation only changes (PR prefix docs)

How Has This Been Tested?

@Riqardos Riqardos changed the title Module fixes Module fix Jan 29, 2024
@jirihofman
Copy link
Member

This fixed #2.

But for #1 when I run terraform plan (both production and development) it says:


Plan: 192 to add, 0 to change, 0 to destroy.
╷
│ Warning: Argument is deprecated
│ 
│   with module.appmixer_module.module.document_db_ssm_password.aws_ssm_parameter.default["/cio-prod-appmixer/documentdb/master_password"],
│   on .terraform/modules/appmixer_module.document_db_ssm_password/main.tf line 22, in resource "aws_ssm_parameter" "default":
│   22:   overwrite       = each.value.overwrite
│ 
│ this attribute has been deprecated
│ 
│ (and 6 more similar warnings elsewhere)
╵
╷
│ Error: Invalid for_each argument
│ 
│   on ../../route53.tf line 29, in resource "aws_route53_record" "cert_alb":
│   29:   for_each = {
│   30:     for dvo in try(aws_acm_certificate.alb[0].domain_validation_options, []) : dvo.domain_name => {
│   31:       name   = dvo.resource_record_name
│   32:       record = dvo.resource_record_value
│   33:       type   = dvo.resource_record_type
│   34:     } if local.acm_certificate_enabled
│   35:   }
│     ├────────────────
│     │ aws_acm_certificate.alb[0].domain_validation_options is set of object with 1 element
│     │ local.acm_certificate_enabled is true
│ 
│ The "for_each" map includes keys derived from resource attributes that cannot be determined until apply, and so Terraform cannot determine the full set of keys that
│ will identify the instances of this resource.
│ 
│ When working with unknown values in for_each, it's better to define the map keys statically in your configuration and place apply-time results only in the map values.
│ 
│ Alternatively, you could use the -target planning option to first apply only the resources that the for_each value depends on, and then apply a second time to fully
│ converge.
╵

@Riqardos
Copy link
Contributor Author

Riqardos commented Feb 1, 2024

@jirihofman sorry I forgot to push this commit, now it should be fixed

Copy link
Member

@jirihofman jirihofman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last fix helped with terraform plan, thanks 👍

@Riqardos Riqardos merged commit 3f3b67c into main Feb 2, 2024
@Riqardos Riqardos deleted the module-fix branch February 2, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants