热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Creatingdynamicallynamedaws_lambda_aliasresultsinbadness

Thisissuewasoriginallyopenedbyashashicorp/terraform#5664.Itwasmigratedhe

This issue was originally opened by as hashicorp/terraform#5664. It was migrated here as part of the provider split. The original body of the issue is below.

Hey!

I created an aws_lambda_alias with a dynamic name:

1
2
3
4
5
6
resource "aws_lambda_alias" "assessment-trait-scores-scaler" {

        name = "${consul_keys.assessment-trait-scores-scaler.var.version}"

        description = "Git Hash ${consul_keys.assessment-trait-scores-scaler.var.version}"

        function_name = "${aws_lambda_function.assessment-trait-scores-scaler.arn}"

        function_version = "$LATEST"

}

The intention was to have an alias named after the git hash of the jar being generated. This would create a new alias each time the jar is updated (I realize there are some issues with this - this was an early exploration). Unfortunately, I get the following error after the first run:

1
2
* aws_lambda_alias.assessment-trait-scores-scaler: ResourceNotFoundException: Cannot find alias arn: arn:aws:lambda:us-east-1:xxxxxxx

:function:assessment-trait-scores-scaler-prod:ae91e35ffdc42c614fad63983d39ff5f21ff2fb1

Which is true, but not at all what I expected. I expected it to remove the old alias, and create a new one, rather than attempting to "update" the new alias (which doesn't exist yet). To resole this, I had to manually delete the entries out of the state file.

Thanks!
Dan

该提问来源于开源项目:hashicorp/terraform-provider-aws

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!


   



推荐阅读
  • 本文详细介绍了如何使用 Yii2 的 GridView 组件在列表页面实现数据的直接编辑功能。通过具体的代码示例和步骤,帮助开发者快速掌握这一实用技巧。 ... [详细]
  • 本文详细介绍了Java中org.eclipse.ui.forms.widgets.ExpandableComposite类的addExpansionListener()方法,并提供了多个实际代码示例,帮助开发者更好地理解和使用该方法。这些示例来源于多个知名开源项目,具有很高的参考价值。 ... [详细]
  • 深入解析Spring启动过程
    本文详细介绍了Spring框架的启动流程,帮助开发者理解其内部机制。通过具体示例和代码片段,解释了Bean定义、工厂类、读取器以及条件评估等关键概念,使读者能够更全面地掌握Spring的初始化过程。 ... [详细]
  • iOS绘制就是采集点,贝塞尔曲线得到形状,绘图上下文去渲染出来AsanaDrawsana图形库,设计的挺好他可以画多种图形, ... [详细]
  • 本文将介绍如何编写一些有趣的VBScript脚本,这些脚本可以在朋友之间进行无害的恶作剧。通过简单的代码示例,帮助您了解VBScript的基本语法和功能。 ... [详细]
  • Explore a common issue encountered when implementing an OAuth 1.0a API, specifically the inability to encode null objects and how to resolve it. ... [详细]
  • 本文详细介绍了Akka中的BackoffSupervisor机制,探讨其在处理持久化失败和Actor重启时的应用。通过具体示例,展示了如何配置和使用BackoffSupervisor以实现更细粒度的异常处理。 ... [详细]
  • Android 渐变圆环加载控件实现
    本文介绍了如何在 Android 中创建一个自定义的渐变圆环加载控件,该控件已在多个知名应用中使用。我们将详细探讨其工作原理和实现方法。 ... [详细]
  • RecyclerView初步学习(一)
    RecyclerView初步学习(一)ReCyclerView提供了一种插件式的编程模式,除了提供ViewHolder缓存模式,还可以自定义动画,分割符,布局样式,相比于传统的ListVi ... [详细]
  • 本文详细介绍了Java中org.w3c.dom.Text类的splitText()方法,通过多个代码示例展示了其实际应用。该方法用于将文本节点在指定位置拆分为两个节点,并保持在文档树中。 ... [详细]
  • 在本教程中,我们将深入探讨如何使用 Python 构建游戏的主程序模块。通过逐步实现各个关键组件,最终完成一个功能完善的游戏界面。 ... [详细]
  • This request pertains to exporting the hosted_zone_id attribute associated with the aws_rds_cluster resource in Terraform configurations. The absence of this attribute can lead to issues when integrating DNS records with Route 53. ... [详细]
  • Java实现文本到图片转换,支持自动换行、字体自定义及图像优化
    本文详细介绍了如何使用Java实现将文本转换为图片的功能,包括自动换行、自定义字体加载、抗锯齿优化以及图片压缩等技术细节。 ... [详细]
  • Android开发技巧:实现带描边的圆角图片
    本文介绍了一种在Android应用中实现带描边的圆角图片的方法。通过使用BitmapShader类,开发者可以轻松地为图片添加圆角和描边效果,提升应用的视觉体验。 ... [详细]
  • Android 自定义指南针视图实现
    本文介绍了如何在Android应用中自定义绘制指南针视图,包括方位角的计算、不同方向的颜色区分以及视图随手势移动的功能实现。 ... [详细]
author-avatar
沙楽33
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有