Skip to content

Commit

Permalink
Add outputs for CDP env name and CRN to deploy module
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <[email protected]>
  • Loading branch information
jimright committed Jul 28, 2023
1 parent 21bcb19 commit 8b2d146
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
14 changes: 13 additions & 1 deletion modules/terraform-cdp-deploy/modules/aws/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.

output "cdp_environment_name" {
value = cdp_environments_aws_environment.cdp_env.environment_name

description = "CDP Environment Name"
}

output "cdp_environment_crn" {
value = cdp_environments_aws_environment.cdp_env.crn

description = "CDP Environment CRN"
}
12 changes: 12 additions & 0 deletions modules/terraform-cdp-deploy/modules/azure/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "cdp_environment_name" {
value = cdp_environments_azure_environment.cdp_env.environment_name

description = "CDP Environment Name"
}

output "cdp_environment_crn" {
value = cdp_environments_azure_environment.cdp_env.crn

description = "CDP Environment CRN"
}
18 changes: 18 additions & 0 deletions modules/terraform-cdp-deploy/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,21 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

output "cdp_environment_name" {
value = coalesce(
module.cdp_on_aws[0].cdp_environment_name,
module.cdp_on_azure[0].cdp_environment_name
)

description = "CDP Environment Name"
}

output "cdp_environment_crn" {
value = coalesce(
module.cdp_on_aws[0].cdp_environment_crn,
module.cdp_on_azure[0].cdp_environment_crn
)

description = "CDP Environment CRN"
}

0 comments on commit 8b2d146

Please sign in to comment.