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

fix(launch_templates): define default for instance_metadata_tags #747

Merged

Conversation

chubchubsancho
Copy link
Contributor

@chubchubsancho chubchubsancho commented Jul 8, 2022

What does this PR do?

This PR fix an non idempotent plan/apply when using module launch_template

Terraform will perform the following actions:

  # module.web.module.karpenter_launch_templates.aws_launch_template.this["default"] will be updated in-place
  ~ resource "aws_launch_template" "this" {
      ~ default_version         = 9 -> (known after apply)
        id                      = "lt-xxxxxxxxxxxxx"
      ~ latest_version          = 9 -> (known after apply)
        name                    = "karpenter"
        tags                    = {}
        # (11 unchanged attributes hidden)



      ~ metadata_options {
          + instance_metadata_tags      = "disabled"
            # (2 unchanged attributes hidden)
        }


        # (5 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
  • add missing variables:

    • http_protocol_ipv6
    • instance_metadata_tags
  • set default value if no variable is declared on module call

Motivation

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have added a new example under examples to support my PR
  • Yes, I have created another PR for add-ons under add-ons repo (if applicable)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs required examples and docs except a new pattern or add-on added.

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@bryantbiggs bryantbiggs temporarily deployed to EKS Blueprints Test July 8, 2022 17:46 Inactive
Copy link
Contributor

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

usually we like to use null for optional but since these match the API defaults I think this is ok - thanks for the PR!

Copy link
Contributor

@askulkarni2 askulkarni2 left a comment

Choose a reason for hiding this comment

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

LGTM!

@askulkarni2 askulkarni2 merged commit a7b549b into aws-ia:main Jul 8, 2022
allamand pushed a commit to allamand/terraform-aws-eks-blueprints that referenced this pull request Dec 15, 2022
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

3 participants