generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NSOF-5982 metaport_cluster: support data-source name param
Even though name is not unique for metaport clusters - costumer's feedback brought the need to onboard metaports and metaport clusters outside of tf code and later - use the metaport name to find it and attach mapped elements to it from terraform. Because it's not unique - in case there is more then one metaport cluster with the specified name - an error will be returned. Customer's ticket: #11
- Loading branch information
1 parent
d0e12af
commit 9d5a2e8
Showing
6 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 11 additions & 3 deletions
14
examples/data-sources/pfptmeta_metaport_cluster/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
data "pfptmeta_metaport_cluster" "metaport_cluster" { | ||
data "pfptmeta_metaport_cluster" "metaport_cluster_by_id" { | ||
id = "mpc-123" | ||
} | ||
|
||
output "metaport_cluster" { | ||
value = data.pfptmeta_metaport_cluster.metaport_cluster | ||
output "metaport_cluster_by_id" { | ||
value = data.pfptmeta_metaport_cluster.metaport_cluster_by_id | ||
} | ||
|
||
data "pfptmeta_metaport_cluster" "metaport_cluster_by_name" { | ||
name = "metaport cluster name" | ||
} | ||
|
||
output "metaport_cluster_by_name" { | ||
value = data.pfptmeta_metaport_cluster.metaport_cluster_by_name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters