tencent cloud

Tencent Infrastructure Automation for Terraform

Product Introduction
Overview
Strengths
Scenarios
Purchase Guide
Getting Started
Use Terraform in Local PC
User Guide
Configuration Guide
Syntax Guide
Resource List
Combination with DevOps
Code Management
Continuous Integration and Deployment
Use Cases
Deploying Cloud Native Service
Cross-Region Replication of Resources
Case Studies
Convertlab's IaC Practices Based on Tencent Cloud for Terraform
Provider Contributor Guide
Welcome
Contribute
Developer Reference
FAQs
Signature Error
Init Acceleration
Enabling Log Tracking
Managing Existing Resource
State Lock

Function

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2024-12-02 16:01:33

Numeric functions

Function
Feature
Sample
Result
abs
Returns an absolute value
abs(-1024)
1024
ceil
Rounds up
ceil(5.1)
6
floor
Rounds down
floor(4.9)
4
log
Calculates a logarithm
log(16, 2)
4
pow
Calculates an exponent
pow(3,2)
9
max
Returns the maximum value
max(12,54,3)
54
min
Returns the minimum value
min(12, 54, 3)
3


String functions

Function
Feature
Sample
Result
chomp
Removes newline characters at the end of a string
chomp("hello\\n")
"hello"
format
Formats a string
format("Hello, %s!", "Ander")
"Hello, Ander!"
lower
Converts all cased letters in a string to lowercase
lower("HELLO")
"hello"
upper
Converts all cased letters in a string to uppercase
upper("hello")
"HELLO"
join
Concatenates elements of a string list with the given delimiter
join(", ", ["foo", "bar", "baz"])
"foo, bar, baz"
replace
Replaces specified characters in a string
replace("1 + 2 + 3", "+", "-")
"1 - 2 - 3"

For more information on functions, see Built-in Functions.

Ajuda e Suporte

Esta página foi útil?

comentários