Skip to content

Commit

Permalink
Merge pull request #18 from terraform-google-modules/feature/access-o…
Browse files Browse the repository at this point in the history
…utput

Make output for access level depend on resource
  • Loading branch information
morgante authored Sep 19, 2019
2 parents 875def2 + 489295f commit 47c09dc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [1.0.1] 2019-09-19

### Fixed
- Fixed issues with the dependency graph for access level outputs. [#19]

## [1.0.0] 2019-09-04

### Changed
Expand All @@ -21,5 +26,7 @@ project adheres to [Semantic Versioning](http://semver.org/).
[Unreleased]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/releases/tag/v0.1.0
[1.0.0]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/releases/tag/v1.0.0
[1.0.1]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/releases/tag/v1.0.1

[#19]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/pull/19
[#10]: https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/pull/10
4 changes: 4 additions & 0 deletions modules/access_level/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* limitations under the License.
*/

locals {
output_name = google_access_context_manager_access_level.access_level.name
}

resource "google_access_context_manager_access_level" "access_level" {
provider = google
parent = "accessPolicies/${var.policy}"
Expand Down
7 changes: 6 additions & 1 deletion modules/access_level/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@

output "name" {
description = "Description of the AccessLevel and its use. Does not affect behavior."
value = var.name
value = split("/", local.output_name)[3]
}

output "name_id" {
description = "The fully-qualified name of the Access Level. Format: accessPolicies/{policy_id}/accessLevels/{name}"
value = local.output_name
}

0 comments on commit 47c09dc

Please sign in to comment.