Old Working model for using AWS ECS via Terraform
No requirements.
Name | Version |
---|---|
aws | n/a |
local | n/a |
tls | n/a |
No modules.
Name | Type |
---|---|
aws_ecs_cluster.ecs | resource |
aws_ecs_service.cassandra | resource |
aws_ecs_service.nginx | resource |
aws_ecs_task_definition.cassandra | resource |
aws_ecs_task_definition.nginx | resource |
aws_efs_access_point.examplea | resource |
aws_efs_file_system.examplea | resource |
aws_elb.admin | resource |
aws_elb.appstore | resource |
aws_instance.docker_host | resource |
aws_key_pair.ecs | resource |
aws_security_group.ecs | resource |
local_file.privatekey | resource |
local_file.publickey | resource |
tls_private_key.ecs | resource |
aws_ami.ubuntu | data source |
aws_availability_zones.available | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
allowed_range | IP ranges allowed to connect | list(any) |
n/a | yes |
cassandra | n/a | any |
n/a | yes |
common_tags | n/a | map |
{ |
no |
container | n/a | any |
n/a | yes |
docker-email | description | string |
"description" |
no |
docker-pass | n/a | any |
n/a | yes |
docker-user | n/a | string |
"admin" |
no |
gid | You will need to override this value | number |
502 |
no |
ingress | n/a | list |
[ |
no |
instance_type | Size of host instance | string |
"t3.micro" |
no |
name | (optional) describe your variable | string |
"terraform-ecs" |
no |
region | n/a | string |
"eu-west-1" |
no |
subnets | n/a | list(string) |
n/a | yes |
uid | You will need to override this value | number |
1 |
no |
No outputs.
This is the policy required to build this project:
The Terraform resource required is:
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupEgress",
"ec2:CreateKeyPair",
"ec2:CreateSecurityGroup",
"ec2:CreateTags",
"ec2:DeleteKeyPair",
"ec2:DeleteSecurityGroup",
"ec2:DeleteTags",
"ec2:DescribeAccountAttributes",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeImages",
"ec2:DescribeInstanceAttribute",
"ec2:DescribeInstanceCreditSpecifications",
"ec2:DescribeInstanceTypes",
"ec2:DescribeInstances",
"ec2:DescribeKeyPairs",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSecurityGroups",
"ec2:DescribeTags",
"ec2:DescribeVolumes",
"ec2:ImportKeyPair",
"ec2:ModifyInstanceAttribute",
"ec2:MonitorInstances",
"ec2:RevokeSecurityGroupEgress",
"ec2:RunInstances",
"ec2:StartInstances",
"ec2:StopInstances",
"ec2:TerminateInstances",
"ec2:UnmonitorInstances"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"ecs:CreateCluster",
"ecs:CreateService",
"ecs:DeleteCluster",
"ecs:DeleteService",
"ecs:DeregisterTaskDefinition",
"ecs:DescribeClusters",
"ecs:DescribeServices",
"ecs:DescribeTaskDefinition",
"ecs:ModifyCluster",
"ecs:RegisterTaskDefinition",
"ecs:UpdateService"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"elasticfilesystem:CreateAccessPoint",
"elasticfilesystem:CreateFileSystem",
"elasticfilesystem:DeleteAccessPoint",
"elasticfilesystem:DeleteFileSystem",
"elasticfilesystem:DescribeAccessPoints",
"elasticfilesystem:DescribeFileSystems",
"elasticfilesystem:DescribeLifecycleConfiguration"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": [
"elasticloadbalancing:AddTags",
"elasticloadbalancing:AttachLoadBalancerToSubnets",
"elasticloadbalancing:CreateLoadBalancer",
"elasticloadbalancing:CreateLoadBalancerListeners",
"elasticloadbalancing:DeleteLoadBalancer",
"elasticloadbalancing:DescribeLoadBalancerAttributes",
"elasticloadbalancing:DescribeLoadBalancers",
"elasticloadbalancing:DescribeTags",
"elasticloadbalancing:ModifyLoadBalancerAttributes",
"elasticloadbalancing:RemoveTags"
],
"Resource": [
"*"
]
}
]
})
}
Check out these related projects.
- terraform-aws-codebuild - Making a Build pipeline
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright © 2019-2023 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.