The following arguments are supported:
resource "aws_cloudformation_stack" "network" {
name = "networking-stack"
parameters = {
VPCCidr = "10.0.0.0/16"
}
template_body = jsonencode({
Parameters = {
VPCCidr = {
Type = "String"
Default = "10.0.0.0/16"
Description = "Enter the CIDR block for the VPC. Default is 10.0.0.0/16."
}
}
Resources = {
myVpc = {
Type = "AWS::EC2::VPC"
Properties = {
CidrBlock = {
"Ref" = "VPCCidr"
}
Tags = [
{
Key = "Name"
Value = "Primary_CF_VPC"
}
]
}
}
}
})
}
create-stack
--stack-name <value>
[--template-body <value>]
[--template-url <value>]
[--parameters <value>]
[--disable-rollback | --no-disable-rollback]
[--rollback-configuration <value>]
[--timeout-in-minutes <value>]
[--notification-arns <value>]
[--capabilities <value>]
[--resource-types <value>]
[--role-arn <value>]
[--on-failure <value>]
[--stack-policy-body <value>]
[--stack-policy-url <value>]
[--tags <value>]
[--client-request-token <value>]
[--enable-termination-protection | --no-enable-termination-protection]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
[--debug]
[--endpoint-url <value>]
[--no-verify-ssl]
[--no-paginate]
[--output <value>]
[--query <value>]
[--profile <value>]
[--region <value>]
[--version <value>]
[--color <value>]
[--no-sign-request]
[--ca-bundle <value>]
[--cli-read-timeout <value>]
[--cli-connect-timeout <value>]
aws cloudformation create-stack --stack-name myteststack --template-body file://sampletemplate.json --parameters ParameterKey=KeyPairName,ParameterValue=TestKey ParameterKey=SubnetIDs,ParameterValue=SubnetID1\\,SubnetID2
--
Categorized by Availability, Security & Compliance and Cost