File tree Expand file tree Collapse file tree 7 files changed +21
-24
lines changed
Expand file tree Collapse file tree 7 files changed +21
-24
lines changed Original file line number Diff line number Diff line change 33
44[ ![ Cloud Posse] [ logo ]] ( https://cpco.io/homepage )
55
6- # terraform-null-label [ ![ Codefresh Build Status] ( https://g.codefresh.io/api/badges/pipeline/cloudposse/cloudposse %2Fterraform-null-label%2Ftest ?type=cf-1 )] ( https://g.codefresh.io/public/accounts/cloudposse/pipelines/cloudposse/terraform-null-label/test ) [ ![ Latest Release] ( https://img.shields.io/github/release/cloudposse/terraform-null-label.svg )] ( https://github.com/cloudposse/terraform-null-label/releases/latest ) [ ![ Slack Community] ( https://slack.cloudposse.com/badge.svg )] ( https://slack.cloudposse.com )
6+ # terraform-null-label [ ![ Codefresh Build Status] ( https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules %2Fterraform-null-label?type=cf-1 )] ( https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d097280a52a3d4ae8db7221 ) [ ![ Latest Release] ( https://img.shields.io/github/release/cloudposse/terraform-null-label.svg )] ( https://github.com/cloudposse/terraform-null-label/releases/latest ) [ ![ Slack Community] ( https://slack.cloudposse.com/badge.svg )] ( https://slack.cloudposse.com )
77
88
9- Terraform module designed to generate consistent label names and tags for resources. Use ` terraform-null-label ` to implement a strict naming convention.
9+ Terraform module designed to generate consistent names and tags for resources. Use ` terraform-null-label ` to implement a strict naming convention.
1010
1111A label follows the following convention: ` {namespace}-{environment}-{stage}-{name}-{attributes} ` . The delimiter (e.g. ` - ` ) is interchangeable.
1212The label items are all optional. So if you prefer the term ` stage ` to ` environment ` you can exclude environment and the label ` id ` will look like ` {namespace}-{stage}-{name}-{attributes} ` .
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ github_repo: cloudposse/terraform-null-label
3333# Badges to display
3434badges :
3535 - name : " Codefresh Build Status"
36- image : " https://g.codefresh.io/api/badges/pipeline/cloudposse/cloudposse %2Fterraform-null-label%2Ftest ?type=cf-1"
37- url : " https://g.codefresh.io/public/accounts/cloudposse/pipelines/cloudposse/terraform-null-label/test "
36+ image : " https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules %2Fterraform-null-label?type=cf-1"
37+ url : " https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d097280a52a3d4ae8db7221 "
3838 - name : " Latest Release"
3939 image : " https://img.shields.io/github/release/cloudposse/terraform-null-label.svg"
4040 url : " https://github.com/cloudposse/terraform-null-label/releases/latest"
@@ -49,7 +49,7 @@ related:
4949
5050# Short description of this project
5151description : |-
52- Terraform module designed to generate consistent label names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
52+ Terraform module designed to generate consistent names and tags for resources. Use `terraform-null-label` to implement a strict naming convention.
5353
5454 A label follows the following convention: `{namespace}-{environment}-{stage}-{name}-{attributes}`. The delimiter (e.g. `-`) is interchangeable.
5555 The label items are all optional. So if you prefer the term `stage` to `environment` you can exclude environment and the label `id` will look like `{namespace}-{stage}-{name}-{attributes}`.
Original file line number Diff line number Diff line change 11version : ' 1.0'
22
33stages :
4- - Prepare
5- - Test
4+ - Prepare
5+ - Test
66
77steps :
88 main_clone :
@@ -19,13 +19,13 @@ steps:
1919 image : ${{TEST_IMAGE}}
2020 stage : Prepare
2121 commands :
22- - cf_export PATH="/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
23- - make init
24- - git -C build-harness checkout master
25- - make -C test/ clean init TEST_HARNESS_BRANCH=master
26- - make -C test/src clean init
27- - find . -type d -name '.terraform' | xargs rm -rf
28- - find . -type f -name 'terraform.tfstate*' -exec rm -f {} \;
22+ - cf_export PATH="/usr/local/terraform/0.12/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
23+ - make init
24+ - git -C build-harness checkout master
25+ - make -C test/ clean init TEST_HARNESS_BRANCH=master
26+ - make -C test/src clean init
27+ - find . -type d -name '.terraform' | xargs rm -rf
28+ - find . -type f -name 'terraform.tfstate*' -exec rm -f {} \;
2929
3030 test :
3131 type : " parallel"
@@ -39,25 +39,25 @@ steps:
3939 image : ${{TEST_IMAGE}}
4040 description : Test "readme/lint"
4141 commands :
42- - make readme/lint
42+ - make readme/lint
4343
4444 test_module :
4545 title : Test module with bats
4646 image : ${{TEST_IMAGE}}
4747 stage : Test
4848 commands :
49- - make -C test/ module
49+ - make -C test/ module
5050
5151 test_examples_complete :
5252 title : Test "examples/complete" with bats
5353 image : ${{TEST_IMAGE}}
5454 stage : Test
5555 commands :
56- - make -C test/ examples/complete
56+ - make -C test/ examples/complete
5757
5858 test_examples_complete_terratest :
5959 title : Test "examples/complete" with terratest
6060 image : ${{TEST_IMAGE}}
6161 stage : Test
6262 commands :
63- - make -C test/src
63+ - make -C test/src
Original file line number Diff line number Diff line change 1-
21terraform {
32 required_version = " ~> 0.12.0"
43}
Original file line number Diff line number Diff line change @@ -25,18 +25,18 @@ locals {
2525 # Merge attributes
2626 attributes = compact (distinct (concat (var. attributes , var. context . attributes , local. defaults . attributes )))
2727
28-
2928 tags = merge (var. context . tags , local. generated_tags , var. tags )
3029 tags_as_list_of_maps = data. null_data_source . tags_as_list_of_maps . * . outputs
3130
3231 tags_context = {
33- # For AWS we need `Name` to be disambiguated sine it has a special meaning
32+ # For AWS we need `Name` to be disambiguated sine it has a special meaning
3433 name = local.id
3534 namespace = local.namespace
3635 environment = local.environment
3736 stage = local.stage
3837 attributes = local.id_context.attributes
3938 }
39+
4040 generated_tags = { for l in keys (local. tags_context ) : title (l) => local . tags_context [l ] if length (local. tags_context [l ]) > 0 }
4141
4242 id_context = {
@@ -76,6 +76,6 @@ data "null_data_source" "tags_as_list_of_maps" {
7676 " key" = element (keys (local. tags ), count. index )
7777 " value" = element (values (local. tags ), count. index )
7878 },
79- var. additional_tag_map ,
79+ var. additional_tag_map
8080 )
8181}
Original file line number Diff line number Diff line change 11provider "null" {
22 version = " ~> 2.1"
33}
4-
Original file line number Diff line number Diff line change 11terraform {
22 required_version = " ~> 0.12.0"
33}
4-
You can’t perform that action at this time.
0 commit comments