-
Notifications
You must be signed in to change notification settings - Fork 14
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
Access private state when testing resources and data sources #321
Comments
As of The Example State{
"version": 4,
"terraform_version": "1.8.0",
"serial": 3,
"lineage": "dd9272a9-ab86-4166-d83b-d08ba2f78f34",
"outputs": {},
"resources": [
{
"mode": "managed",
"type": "examplecloud_thing",
"name": "test",
"provider": "provider[\"registry.terraform.io/austinvalle/sandbox\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"cities": {
"computed": "true",
"season": "spring"
},
"id": "123",
"name": "john"
},
"sensitive_attributes": [],
"private": "eyJoZWxsbyI6ImV5SnJaWGt4SWpvZ2RISjFaWDA9In0="
}
]
}
],
"check_results": null
} State show output $ terraform show -json terraform.tfstate | jq
{
"format_version": "1.0",
"terraform_version": "1.8.0",
"values": {
"root_module": {
"resources": [
{
"address": "examplecloud_thing.test",
"mode": "managed",
"type": "examplecloud_thing",
"name": "test",
"provider_name": "registry.terraform.io/austinvalle/sandbox",
"schema_version": 0,
"values": {
"cities": {
"computed": "true",
"season": "spring"
},
"id": "123",
"name": "john"
},
"sensitive_values": {
"cities": {}
}
}
]
}
}
} |
Thank you for the info and apologies if this was already well known! |
No worries! We don't have this specific situation of " An issue can be created in the main Terraform repository to ask for that support in |
I've created hashicorp/terraform#35941. This is definitely something we'll want when we add private state data in the AWS Provider |
terraform-plugin-testing version
Use cases
Utilize and/or validate private state when testing resources or data sources.
Attempted solutions
N/A
Proposal
N/A
References
N/A
The text was updated successfully, but these errors were encountered: