AWS-RunPacker - AWS Systems Manager
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

AWS-RunPacker

描述

This document uses the HashiCorp Packer tool to validate, fix, or build packer templates that are used to create machine images. 本文档使用 Packer v1.4.4。

注意

如果您指定了 vpc_id 值,则还必须指定公有子网的 subnet_id 值。Unless you modify your subnet's IPv4 public addressing attribute, you must also set associate_public_ip_address to true.

运行此 Automation(控制台)

文档类型

Automation

所有者

Amazon

平台

Linux、macOS、Windows

参数

  • AutomationAssumeRole

    类型:字符串

    说明:(可选)允许 Systems Manager Automation 代表您执行操作的 AWS Identity and Access Management (IAM) 角色的 Amazon 资源名称 (ARN)。如果未指定任何角色,则 Systems Manager Automation 使用运行此文档的用户的权限。

  • Force

    类型: Boolean

    描述:A Packer option to force a builder to run when artifacts from a previous build otherwise prevent a build from running.

  • Mode

    类型: 字符串

    描述:The mode, or command, in which to use Packer when validating against the template. Options include Build, Validate, and Fix.

  • TemplateFileName

    类型: 字符串

    描述:The name, or key, of the template file in the S3 bucket.

  • TemplateS3BucketName

    类型: 字符串

    描述:The name of the S3 bucket containing the packer template.

文档步骤

RunPackerProcessTemplate – Runs the selected mode against the template using the Packer tool.

输出

RunPackerProcessTemplate.output – The stdout from the Packer tool.

RunPackerProcessTemplate.fixed_template_key – The name of the template stored in an S3 bucket to use only when running in "Fix" mode.

RunPackerProcessTemplate.s3_bucket – The name of the S3 bucket that contains the fixed template to use only when running in "Fix" mode.