amazon-cloudformation

AWS CloudFormation: How to output a machine's PublicIP?

落爺英雄遲暮 提交于 2020-02-01 04:15:26
问题 I wrote a CloudFormation template which creates a linux docker host. I want to display the PublicIP of the machine under the "Outputs" section. This is the relevant portion of the template: "Outputs" : { "ServerAddress" : { "Value" : { "Fn::GetAtt" : [ "Server", "PublicDnsName" ] }, "Description" : "Server Domain Name" }, "SecurityGroup" : { "Value" : { "Fn::GetAtt" : [ "ServerSecurityGroup", "GroupId" ] }, "Description" : "Server Security Group Id" }, "PublicIp" : { "Value" : { "Fn::GetAtt"

AWS CloudFormation userdata passing

萝らか妹 提交于 2020-01-24 22:06:34
问题 How do I pass parameters input data to userdata in AWS cloudformation. Example: I have a parameter EnvType where I will pass "qa" as input to this parameter while running CFT. I want this parameter value "qa" to be read and pass to userdata so that I can write it it to instance disk. Parameters: { "EnvType": { "Description": "Environment type", "Type": "String", "AllowedValues": [ "prod", "qa" ] } I tried using this in user data as: export STACK_TYPE='", { "Ref": "EnvType" }, "'\n", "echo \"

AWS CloudFormation userdata passing

百般思念 提交于 2020-01-24 22:04:51
问题 How do I pass parameters input data to userdata in AWS cloudformation. Example: I have a parameter EnvType where I will pass "qa" as input to this parameter while running CFT. I want this parameter value "qa" to be read and pass to userdata so that I can write it it to instance disk. Parameters: { "EnvType": { "Description": "Environment type", "Type": "String", "AllowedValues": [ "prod", "qa" ] } I tried using this in user data as: export STACK_TYPE='", { "Ref": "EnvType" }, "'\n", "echo \"

AWS CloudFormation userdata passing

情到浓时终转凉″ 提交于 2020-01-24 22:04:24
问题 How do I pass parameters input data to userdata in AWS cloudformation. Example: I have a parameter EnvType where I will pass "qa" as input to this parameter while running CFT. I want this parameter value "qa" to be read and pass to userdata so that I can write it it to instance disk. Parameters: { "EnvType": { "Description": "Environment type", "Type": "String", "AllowedValues": [ "prod", "qa" ] } I tried using this in user data as: export STACK_TYPE='", { "Ref": "EnvType" }, "'\n", "echo \"

AWS Cloudformation [/Resources/PrivateGateway/Properties] 'null' values are not allowed in templates

本秂侑毒 提交于 2020-01-24 16:24:11
问题 I am trying to run a Cloudformation template to create a private API Gateway, I am getting a null value error, not able to figure out why, Following is the template I'm trying to work with - AWSTemplateFormatVersion: 2010-09-09 Transform: 'AWS::Serverless-2016-10-31' Description: Api Template Stack Parameters: VpcId: Type: String Default: "vpc-xxxxxx" Resources: PrivateGateway: Type: 'AWS::ApiGateway::RestApi' Properties: Name: 'private-gw' EndpointConfiguration: Types: - PRIVATE Policy: !Sub

Security Group and Subnet Belongs to different networks

梦想与她 提交于 2020-01-24 06:42:28
问题 I am creating a basic AWS CloudFormation Template with one VPC, 3 Security Group and 5 EC2 Instances my security group looks something like this - { "WebApplicationServerSG": { "Type": "AWS::EC2::SecurityGroup", "Properties": { "VpcId": { "Ref": "DevVpc" }, "GroupDescription": "Enable HTTP, HTTPS and SSH access", "Tags": [ { "Key": "Name", "Value": "WebApplicationServer Service Group" } ], "SecurityGroupIngress": [ { "IpProtocol": "tcp", "FromPort": "443", "ToPort": "443", "CidrIp": "0.0.0.0

AWS IAM Cloudformation YAML template errror: 'null' values are not allowed

て烟熏妆下的殇ゞ 提交于 2020-01-24 04:28:10
问题 I am working on a Cloudformation template for an IAM role that grants cross account read only access. It uses a managed policy for Readonly access as well. So far, I've resolved several errors, but now I'm getting a "'null' values are not allowed in templates" error when I try to validate the template. I think it's a space or syntax thing, but I cannot be sure as it's my first time creating a cloudformation template from scratch and using YAML. AWSTemplateFormatVersion: '2010-09-09'

How to get security group list in cloudformation

不羁的心 提交于 2020-01-24 00:15:09
问题 I want to get the list of security groups associated with a particular VPC in cloudformation parameter section. "VpcId":{ "Description":"Choose the VPC ID" "Type":"AWS::EC2::VPC::Id" }, "SecurityGroupsID":{ "Description": "Choose availablity zone Availability Zone of the Subnet", "Type":"List<AWS::EC2::SecurityGroup::Id>" "AllowedValues":******* }, What should be the allowedvalues..? 回答1: Yes it is possible to use special template parameters, I created a small cloud formation template with

AWS ElasticSearch Service - Set Encryption options from CF template

别等时光非礼了梦想. 提交于 2020-01-23 11:22:24
问题 I am creating a cloud formation template to provision elasticsearch service domain in AWS. I would like to set this property under Encryption to true "Require HTTPS for all traffic to the domain" but I am not able to find the way in AWS docs to do so. Other options for setting encryption properties like "Enable encryption of data at rest" & "Node-to-node encryption" are well documented. Does anyone know how to set "Require HTTPS for all traffic to the domain" property from CF template ? 回答1:

AWS ElasticSearch Service - Set Encryption options from CF template

こ雲淡風輕ζ 提交于 2020-01-23 11:22:08
问题 I am creating a cloud formation template to provision elasticsearch service domain in AWS. I would like to set this property under Encryption to true "Require HTTPS for all traffic to the domain" but I am not able to find the way in AWS docs to do so. Other options for setting encryption properties like "Enable encryption of data at rest" & "Node-to-node encryption" are well documented. Does anyone know how to set "Require HTTPS for all traffic to the domain" property from CF template ? 回答1: