Fix for #36859 in mocking.mdx

Removing typo per #36859.
pull/36860/head
Craig Wright 1 year ago committed by GitHub
parent a06f82746a
commit 61ab3a1cdd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -137,7 +137,7 @@ mock_provider "aws" {
}
```
In the above example, Terraform uses the supplied value for `arn` attributes in S3 buckets instead of generating a random string. Computed attributes not provided an explicit default will simply fall back to the generic data generation rules. You can also use the `override_during` attribute in the `mock_resource` and `mock_data` blocks to specify when Terraform should generate the values for an individual resource. If you do not not specify the `override_during` attribute, Terraform generates the values using the rules inherited from the `mock_provider` block. If specified, the local value overrides any value specified in the `mock_provider` block.
In the above example, Terraform uses the supplied value for `arn` attributes in S3 buckets instead of generating a random string. Computed attributes not provided an explicit default will simply fall back to the generic data generation rules. You can also use the `override_during` attribute in the `mock_resource` and `mock_data` blocks to specify when Terraform should generate the values for an individual resource. If you do not specify the `override_during` attribute, Terraform generates the values using the rules inherited from the `mock_provider` block. If specified, the local value overrides any value specified in the `mock_provider` block.
You can also share mock provider data between tests by writing dedicated mock data files and using the `source` attribute in the `mock_provider` block. Mock data files have `.tfmock.hcl` or `.tfmock.json` extension, and can contain `mock_resource` and `mock_data` blocks as if they were defined in the `mock_provider` block directly.
@ -353,4 +353,4 @@ mock_resource "aws_dynamodb_table" {
}
```
In this case, the `mock_resource` provides a specific value for the ARN of the DynamoDB table, but the ARN values returned for the replica tables are shared between all instances.
In this case, the `mock_resource` provides a specific value for the ARN of the DynamoDB table, but the ARN values returned for the replica tables are shared between all instances.

Loading…
Cancel
Save