Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
Fix issues with name lengths.
Browse files Browse the repository at this point in the history
  • Loading branch information
kief committed Mar 27, 2018
1 parent 8e7c793 commit 6796fdc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions service-template/pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ apply: init ## Create or update infrastructure
test: ## Test the infrastructure
cd ./test && PIPELINE_NAME=$(SERVICE)-$(COMPONENT)-$(ESTATE_ID)-pipeline ./test-pipeline.sh

vars:
@echo "$(TERRAFORM_VARS)"

out:
cd ./src && terraform output $(TERRAFORM_VARS)

Expand Down
2 changes: 1 addition & 1 deletion service-template/pipeline/src/packaging_codebuild_role.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

resource "aws_iam_role" "packaging_codebuild_role" {
name = "${var.service}-${var.component}-${var.estate_id}_Packaging_Codebuild_Role"
name = "${var.service}-${var.component}-${var.estate_id}_Packager"

assume_role_policy = <<EOF
{
Expand Down
6 changes: 3 additions & 3 deletions service-template/pipeline/src/terraform_codebuild_role.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

resource "aws_iam_role" "terraform_codebuild_role" {
name = "${var.service}-${var.component}-${var.estate_id}-TestApply_Terraform_Role"
name = "${var.service}-${var.component}-${var.estate_id}-TestApply"

assume_role_policy = <<EOF
{
Expand All @@ -20,7 +20,7 @@ EOF


resource "aws_iam_policy" "terraform_codebuild_policy" {
name = "${var.service}-${var.component}-${var.estate_id}-TestApply_Terraform_Policy"
name = "${var.service}-${var.component}-${var.estate_id}-TestApply"
path = "/service-role/"
description = "Policies needed by the CodeBuild project for TestApply the ${var.service}-${var.component}-${var.estate_id} project"

Expand Down Expand Up @@ -58,7 +58,7 @@ POLICY


resource "aws_iam_policy_attachment" "terraform_codebuild_attachment" {
name = "${var.service}-${var.component}-${var.estate_id}-TestApply_Terraform_Attachment"
name = "${var.service}-${var.component}-${var.estate_id}-TestApply"
policy_arn = "${aws_iam_policy.terraform_codebuild_policy.arn}"
roles = ["${aws_iam_role.terraform_codebuild_role.id}"]
}
Expand Down
2 changes: 1 addition & 1 deletion service-template/shared-variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MY_IP=$(shell curl -s icanhazip.com)
AWS_ACCOUNT_ID:=$(shell aws sts get-caller-identity --output text --query Account)
STATE_BUCKET_NAME=spin-reference-$(AWS_ACCOUNT_ID)
STATE_PATH="estate-$(ESTATE_ID)/component-$(COMPONENT)/service-$(SERVICE)/deployment-$(DEPLOYMENT_ID)/$(FUNCTION).tfstate"
ARTEFACT_BUCKET_NAME=$(shell echo artefacts-$(ESTATE_ID)-$(COMPONENT)-$(SERVICE)-$(AWS_ACCOUNT_ID) | tr '[:upper:]' '[:lower:]')
ARTEFACT_BUCKET_NAME=$(shell echo repo-$(ESTATE_ID)-$(COMPONENT)-$(SERVICE)-$(AWS_ACCOUNT_ID) | tr '[:upper:]' '[:lower:]' | cut -c 1-63)

ARTEFACT_NAME=$(COMPONENT)-$(SERVICE)
BUILD_VERSION=1.0.$(shell date +%Y%m%d%I%M%S)
Expand Down

0 comments on commit 6796fdc

Please sign in to comment.