terraform

Dynamic block with for_each inside a resource created with a for_each

人盡茶涼 提交于 2021-02-07 10:00:03
问题 I am trying to build multiple vnets in Azure using Terraform 0.12+ and its new for_each and running into some trouble. I was hoping that the new capabilities would allow me to create a generic network module that takes in a complex variable but I perhaps have reached its limit or am just not thinking it through correctly.. Essentially I my variable is built like variable "networks" { type = list(object({ name = string, newbits = number, netnum = number, subnets = list(object({ name = string,

Inject GitLab CI Variables into Terraform Variables

自作多情 提交于 2021-02-07 08:37:50
问题 I'm having a set of Terraform files and in particular one variables.tf file which sort of holds my variables like aws access key, aws access token etc. I want to now automate the resource creation on AWS using GitLab CI / CD. My plan is the following: Write a .gitlab-ci-yml file Have the terraform calls in the .gitlab-ci.yml file I know that I can have secret environment variables in GitLab, but I'm not sure how I can push those variables into my Terraform variables.tf file which looks like

KubeVela:标准化的云原生平台构建引擎

雨燕双飞 提交于 2021-02-06 07:48:57
10人将获赠CNCF商店$100美元礼券! 你填了吗? 问卷链接( https://www.wjx.cn/jq/97146486.aspx ) 本文由“GO开源说”第三期 KubeVela 直播内容修改整理而成,视频内容较长,本文内容有所删减和重构。视频地址: https://www.bilibili.com/video/BV1Tf4y1k7Ny。 阿里巴巴中间件公众号后台回复: KubeVela ,获取完整版PPT。 大家好,很高兴来到“GO 开源说” 跟大家分享开源项目背后的一些故事、设计思想以及使用方法,今天分享的项目是 KubeVela,一个标准化的云原生平台构建引擎。我是来自阿里云云原生应用平台团队的孙健波(花名:天元),也是 KubeVela 这个项目的核心作者之一。 KubeVela :https://github.com/oam-dev/kubevela KubeVela 的背景 KubeVela 是一个基于 Go 语言开发的云原生平台级开源项目,这个项目是去年 11 月中旬(详见 https://mp.weixin.qq.com/s/LauydAy1ngcDuZ3lhqrL6Q )正式发布的。虽然发布到现在不足两个月时间,但是 KubeVela 作为"阿里巴巴统一云原生应用平台内核”背后的核心依赖,其实已经在阿里多个产品背后运行了比较长的一段时间

KubeVela:标准化的云原生平台构建引擎

元气小坏坏 提交于 2021-02-05 15:20:05
简介: 本文由“GO 开源说”第三期 KubeVela 直播内容修改整理而成,视频内容较长,本文内容有所删减和重构。 简介: 本文由“GO 开源说”第三期 KubeVela 直播内容修改整理而成,视频内容较长,本文内容有所删减和重构。 KubeVela 的背景 KubeVela 是一个基于 Go 语言开发的云原生平台级开源项目,这个项目是去年 11 月中旬正式发布的。虽然发布到现在不足两个月时间,但是 KubeVela 作为"阿里巴巴统一云原生应用平台内核”背后的核心依赖,其实已经在阿里多个产品背后运行了比较长的一段时间,我本人目前也在大量参与这些产品和项目的内核建设工作。 这套内核系统诞生自 2019 年年底阿里云联合微软共同推出的 Open Application Model(简称OAM)模型基于 Kubernetes 的实现,在不断演进和迭代中融合了大量来自开源社区(尤其是微软、字节跳动、第四范式、腾讯和满帮集团的社区参与者们)的反馈与贡献,最终在 2020 年 KubeCon 北美峰会上以 “KubeVela” 的名字正式与开源社区见面。KubeVela 项目在官宣后得到了整个云原生生态的持续关注,在发布后的第四天就登上了 Go 语言的开源趋势榜榜首。 图 1 KubeVela 的 GitHub Star 快速增长 KubeVela 是什么? 一言以蔽之, KubeVela

AWS and Terraform - Default egress rule in security group

混江龙づ霸主 提交于 2021-02-04 18:07:49
问题 There is a repeatable configuration that I see in many Terraform projects where the provider is AWS: The configuration of an outbound (egress) rule to allow ALL outbound traffic. As far as I understand, this is the default behavior in AWS as mentioned in the AWS user guide: By default, a security group includes an outbound rule that allows all outbound traffic. You can remove the rule and add outbound rules that allow specific outbound traffic only. If your security group has no outbound

AWS and Terraform - Default egress rule in security group

谁说胖子不能爱 提交于 2021-02-04 18:07:35
问题 There is a repeatable configuration that I see in many Terraform projects where the provider is AWS: The configuration of an outbound (egress) rule to allow ALL outbound traffic. As far as I understand, this is the default behavior in AWS as mentioned in the AWS user guide: By default, a security group includes an outbound rule that allows all outbound traffic. You can remove the rule and add outbound rules that allow specific outbound traffic only. If your security group has no outbound

How to extract part of the string from `$$.Execution.Name` in AWS step function?

不打扰是莪最后的温柔 提交于 2021-02-04 08:28:24
问题 From this page: https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html I'm using "TransformJobName.$": "$$.Execution.Name" to define a dynamic SageMaker job name since the name needs to be unique otherwise statemachine will fail When I executed the statemachine, I got the error below: { "resourceType": "sagemaker", "resource": "createTransformJob.sync", "error": "SageMaker.AmazonSageMakerException", "cause": "2 validation errors detected: Value '808bxx-xxxx-xxxx

Toggle Elastic Beanstalk load balancer off/on with Terraform?

允我心安 提交于 2021-01-29 21:03:58
问题 Load balancers cost an hourly rate (Re)creating EB costs uploads to S3 and takes a long time So for EB that is sitting idle (used only during development), just as EC2 can be scaled down to 0 instances, how can the load balancer be toggled off (and later toggled back on)? Could Terraform be employed, such that the absence of the ALB is detected and gets recreated with an apply? I already terminate EC2 instances under EB when idle, but all the while my unused load balancer is charging me!

Toggle Elastic Beanstalk load balancer off/on with Terraform?

落爺英雄遲暮 提交于 2021-01-29 18:41:47
问题 Load balancers cost an hourly rate (Re)creating EB costs uploads to S3 and takes a long time So for EB that is sitting idle (used only during development), just as EC2 can be scaled down to 0 instances, how can the load balancer be toggled off (and later toggled back on)? Could Terraform be employed, such that the absence of the ALB is detected and gets recreated with an apply? I already terminate EC2 instances under EB when idle, but all the while my unused load balancer is charging me!

Terraform google_container_cluster adjust maximum retry budget

孤者浪人 提交于 2021-01-29 17:30:59
问题 I keep getting "Retry budget exhausted (80 attempts)", which takes about 10 minutes. Is there a way to reduce the maximum retry budget so I can iterate my configurations faster? Using https://registry.terraform.io/modules/terraform-google-modules/kubernetes-engine/google/7.3.0 回答1: Unfortunately maximum retry budget is not adjustable at the moment. You can take a look at the closely related issue registered on Google's issue tracker . If you're interested in this functionality I would