hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[Bug]: AMI SSM Alias #38767

Closed jnicolas89 closed 1 month ago

jnicolas89 commented 1 month ago

Terraform Core Version

1.9.3

AWS Provider Version

5.61

Affected Resource(s)

Using AMI Alias in Launch Templates

Expected Behavior

The launch template along with the ASG should have been created without any issue.

Actual Behavior

An error message is shown: CreateAutoScalingGroup, https response error StatusCode: 400, api error ValidationError: Invalid id: "resolve:ssm:****" expecting ami-....

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

terraform {

required_providers { aws = { source = "hashicorp/aws" version = "~> 5.61" }

} }

provider "aws" { region = "eu-west-1" }

resource "aws_launch_template" "lt-asg-alias" { name = "lt-asg-alias" image_id = "resolve:ssm:parameter-asg-ami-alias" description = "Alias LT" }

resource "aws_autoscaling_group" "asg-alias" { availability_zones = ["eu-west-1a"] desired_capacity = 1 max_size = 1 min_size = 1

mixed_instances_policy { launch_template { launch_template_specification { launch_template_id = aws_launch_template.lt-asg-alias.id }

  override {
    instance_requirements {
      memory_mib {
        min = 1000
      }

      vcpu_count {
        min = 4
      }
    }
  }
}

} }

Steps to Reproduce

try to recreate a launch template using ssm ami id alias.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

github-actions[bot] commented 1 month ago

[!WARNING] This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

github-actions[bot] commented 6 days ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.