Update placeholderplaceholderplaceholder occurrences to our doc site (#684)

This commit is contained in:
Elbaz
2023-10-10 12:54:03 +03:00
committed by GitHub
parent 3860a486b1
commit 01cf4cda3f
14 changed files with 36 additions and 44 deletions

View File

@@ -17,13 +17,13 @@ The following example loads the website and validates that it returns the expect
```hcl
check "health_check" {
data "http" "placeholderplaceholderplaceholder_io" {
url = "https://www.placeholderplaceholderplaceholder.io"
data "http" "opentofu_org" {
url = "https://www.opentofu.org"
}
assert {
condition = data.http.placeholderplaceholderplaceholder_io.status_code == 200
error_message = "${data.http.placeholderplaceholderplaceholder_io.url} returned an unhealthy status code"
condition = data.http.opentofu_org.status_code == 200
error_message = "${data.http.opentofu_org.url} returned an unhealthy status code"
}
}
```
@@ -34,7 +34,7 @@ You can use any data source from any provider as a scoped data source within a `
A `check` block can optionally contain a nested (a.k.a. scoped) data source. This `data` block behaves like an external [data source](/docs/language/data-sources), except you can not reference it outside its enclosing `check` block. Additionally, if a scoped data source's provider raises any errors, they are masked as warnings and do not prevent OpenTofu from continuing operation execution.
You can use a scoped data source to validate the status of a piece of infrastructure outside of the usual OpenTofu resource lifecycle. [In the above example](#syntax), if the `placeholderplaceholderplaceholder_io` data source fails to load, you receive a warning instead of a blocking error, which would occur if you declared this data source outside of a `check` block.
You can use a scoped data source to validate the status of a piece of infrastructure outside of the usual OpenTofu resource lifecycle. [In the above example](#syntax), if the `opentofu_org` data source fails to load, you receive a warning instead of a blocking error, which would occur if you declared this data source outside of a `check` block.
#### Meta-Arguments
@@ -95,8 +95,8 @@ You can often use postconditions interchangeably with check blocks to validate r
For example, you can [rewrite the above `check` block example](#syntax) to use a postcondition instead. The below code uses a `postcondition` block to validate that the website returns the expected status code of `200`.
```hcl
data "http" "placeholderplaceholderplaceholder_io" {
url = "https://www.placeholderplaceholderplaceholder.io"
data "http" "opentofu_org" {
url = "https://www.opentofu.org"
lifecycle {
postcondition {

View File

@@ -212,13 +212,13 @@ The following example uses a check block with an assertion to verify the OpenTof
```hcl
check "health_check" {
data "http" "placeholderplaceholderplaceholder_io" {
url = "https://www.placeholderplaceholderplaceholder.io"
data "http" "opentofu_org" {
url = "https://www.opentofu.org"
}
assert {
condition = data.http.placeholderplaceholderplaceholder_io.status_code == 200
error_message = "${data.http.placeholderplaceholderplaceholder_io.url} returned an unhealthy status code"
condition = data.http.opentofu_org.status_code == 200
error_message = "${data.http.opentofu_org.url} returned an unhealthy status code"
}
}
```

View File

@@ -34,14 +34,14 @@ The `plantimestamp` function is not available within the OpenTofu console.
```
```hcl
check "placeholderplaceholderplaceholder_io_certificate" {
data "tls_certificate" "placeholderplaceholderplaceholder_io" {
url = "https://www.placeholderplaceholderplaceholder.io/"
check "opentofu_org_certificate" {
data "tls_certificate" "opentofu_org" {
url = "https://www.opentofu.org/"
}
assert {
condition = timecmp(plantimestamp(), data.tls_certificate.placeholderplaceholderplaceholder_io.certificates[0].not_after) < 0
error_message = "placeholderplaceholderplaceholder.io certificate has expired"
condition = timecmp(plantimestamp(), data.tls_certificate.opentofu_org.certificates[0].not_after) < 0
error_message = "opentofu.org certificate has expired"
}
}
```

View File

@@ -40,11 +40,11 @@ Use the namespace keywords where possible, to make the intent more obvious to
a future reader:
```
> uuidv5("dns", "www.placeholderplaceholderplaceholder.io")
a5008fae-b28c-5ba5-96cd-82b4c53552d6
> uuidv5("dns", "www.opentofu.org")
df1e675d-b743-5f6c-9952-6311d0f141df
> uuidv5("url", "https://www.placeholderplaceholderplaceholder.io/")
9db6f67c-dd95-5ea0-aa5b-e70e5c5f7cf5
> uuidv5("url", "https://www.opentofu.org/")
ace93eea-1a2c-5eed-b41b-718be15d2e50
> uuidv5("oid", "1.3.6.1.4")
af9d40a5-7a36-5c07-b23a-851cd99fbfa5
@@ -58,8 +58,8 @@ UUIDs, and in some special cases it may be more appropriate to use the
UUID form:
```
> uuidv5("6ba7b810-9dad-11d1-80b4-00c04fd430c8", "www.placeholderplaceholderplaceholder.io")
a5008fae-b28c-5ba5-96cd-82b4c53552d6
> uuidv5("6ba7b810-9dad-11d1-80b4-00c04fd430c8", "www.opentofu.org")
df1e675d-b743-5f6c-9952-6311d0f141df
```
If you wish to use a namespace defined outside of RFC 4122, using the namespace