Difference between revisions of "Terraform state list"
Jump to navigation
Jump to search
(6 intermediate revisions by 4 users not shown) | |||
Line 15: | Line 15: | ||
data.[[aws_eks_cluster_auth]].cluster | data.[[aws_eks_cluster_auth]].cluster | ||
module.eks.aws_eks_cluster.this[0] | module.eks.aws_eks_cluster.this[0] | ||
+ | |||
+ | terraform state list | ||
+ | [[data.aws_availability_zones]].available | ||
+ | [[data.aws_iam_policy]].ebs_csi_policy | ||
+ | [[aws_eks_addon.ebs-csi]] | ||
+ | aws_iam_user.myreadonlytest | ||
+ | aws_iam_user.mytest | ||
+ | [[random_string.suffix]] | ||
+ | module.eks.data.aws_caller_identity.current | ||
+ | module.eks.data.aws_iam_policy_document.assume_role_policy[0] | ||
+ | .../... | ||
terraform state list | terraform state list | ||
Line 27: | Line 38: | ||
* <code>[[terraform state show aws_instance.MYexample]]</code> | * <code>[[terraform state show aws_instance.MYexample]]</code> | ||
* <code>[[terraform state show module.eks.aws_eks_cluster]].this[0]</code> | * <code>[[terraform state show module.eks.aws_eks_cluster]].this[0]</code> | ||
− | + | * <code>[[terraform state mv]]</code> | |
+ | * <code>[[terraform state rm]]</code> | ||
+ | * <code>[[terragrun state list]]</code> | ||
== See also == | == See also == |
Latest revision as of 18:50, 8 November 2023
terraform state list
list resources within a Terraform state
terraform state list
terraform state list
| grep aws_eks_cluster terraform state list module.alb.my_aws_lb.this[0] module.compute.my_aws_instance.this[0] module.compute.my_aws_instance.this[1]
terraform state list | grep aws_eks_cluster data.aws_eks_cluster.cluster data.aws_eks_cluster_auth.cluster module.eks.aws_eks_cluster.this[0]
terraform state list data.aws_availability_zones.available data.aws_iam_policy.ebs_csi_policy aws_eks_addon.ebs-csi aws_iam_user.myreadonlytest aws_iam_user.mytest random_string.suffix module.eks.data.aws_caller_identity.current module.eks.data.aws_iam_policy_document.assume_role_policy[0] .../...
terraform state list No state file was found! State management commands require a state file. Run this command in a directory where Terraform has been run or use the -state flag to point the command to a specific state location.
Related commands[edit]
terraform show
terraform state show aws_instance.MYexample
terraform state show module.eks.aws_eks_cluster.this[0]
terraform state mv
terraform state rm
terragrun state list
See also[edit]
- Terraform state:
terraform [ state | replace-provider | mv ]
,backend.tf
, Remote state backends to manage Terraform state, State locking,terraform force-unlock
terraform
[untaint | fmt
|apply
|show
|state
|init | plan | console | output
|validate
|destroy
|debug
|import
|providers
|get
|graph
|workspaces
|resource
|login
|-var-file
|state mv
|state pull
|state push
|state replace-provider
|state rm
|force-unlock
|env
|tfe
|--version
|remote-exec
|delete on termination
| deprecated commands |terraform --help
]
Advertising: