简体   繁体   English

Cloudformation 到 CodeDeployApplication 的 terraform 转换

[英]Cloudformation to terraform conversion of CodeDeployApplication

I am converting a Cloudformation template to terraform.我正在将 Cloudformation 模板转换为 terraform。 I don't see materials online describing the terraform equivalent of CF structure.我没有看到网上描述terraform等效CF结构的材料。

Cloudformation云形成

Resources:
  CodeDeployApplication:
    Type: 'AWS::CodeDeploy::Application'
    Properties:
      ApplicationName: !Join 
        - '-'
        - - !Ref EnvName
          - !Ref AppName
          - Application
      ComputePlatform: Lambda

I have converted as below.我已经转换如下。 I am sure I have made a mistake in the 'name' part.Can you please help?我确定我在“名称”部分犯了一个错误。你能帮忙吗?

Terraform Terraform

resource "aws_codedeploy_app" "CodeDeployApplication" {
  compute_platform = "Lambda"
  name             = "${var.EnvName}/${var.AppName}/Application"
}

The following CFN code:以下 CFN 代码:

      ApplicationName: !Join 
        - '-'
        - - !Ref EnvName
          - !Ref AppName
          - Application

will translate to:将转化为:

name             = "${var.EnvName}-${var.AppName}-Application"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM