Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implements sha1 hash interpolation func #4450

Merged
merged 2 commits into from
Jan 6, 2016

Conversation

jkordish
Copy link
Contributor

Adds functionality to convert a string to a sha1 hash.

Example: obfuscating the name used for the various terraform provider resources.

For instance:

resource "aws_s3_bucket" "customer-bucket" {
    bucket = "${sha1(concat(aws_vpc.default.tags.cust-id, "-s3-bucket"))}"
    tags {
        Name = "${sha1(concat(aws_vpc.default.tags.cust-id, "-s3-bucket"))}"
        designation = "${var.designation}"
        env = "${var.env}"
        mgmt = "${var.mgmt}"
        product = "${var.product}"
        vpc-id = "${aws_vpc.default.id}"
    }
}

Tested against master and works as intended.

@phinze
Copy link
Contributor

phinze commented Jan 6, 2016

Looking good! Can you add the function to the docs as well?

@jkordish
Copy link
Contributor Author

jkordish commented Jan 6, 2016

@phinze done.:)

@phinze
Copy link
Contributor

phinze commented Jan 6, 2016

Nice - thank you!

phinze added a commit that referenced this pull request Jan 6, 2016
implements sha1 hash interpolation func
@phinze phinze merged commit d103dd1 into hashicorp:master Jan 6, 2016
@ghost
Copy link

ghost commented Apr 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants