Skip to content

Commit

Permalink
promote resource privileged_access_manager_entitlement to ga (#11094) (
Browse files Browse the repository at this point in the history
…#7702)

[upstream:347145739efc5eebe07a3006b8246b29525d8384]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jul 9, 2024
1 parent 334af0e commit 5f85165
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
3 changes: 3 additions & 0 deletions .changelog/11094.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
privilegedaccessmanager: promoted `google_privileged_access_manager_entitlement` resource from beta to ga
```
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlemen

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
CheckDestroy: testAccCheckPrivilegedAccessManagerEntitlementDestroyProducer(t),
Steps: []resource.TestStep{
{
Expand All @@ -60,7 +60,6 @@ func TestAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlemen
func testAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlementBasicExample(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_privileged_access_manager_entitlement" "tfentitlement" {
provider = google-beta
entitlement_id = "tf-test-example-entitlement%{random_suffix}"
location = "global"
max_request_duration = "43200s"
Expand All @@ -69,7 +68,9 @@ resource "google_privileged_access_manager_entitlement" "tfentitlement" {
unstructured{}
}
eligible_users {
principals = ["group:[email protected]"]
principals = [
"group:[email protected]"
]
}
privileged_access{
gcp_iam_access{
Expand All @@ -82,17 +83,25 @@ resource "google_privileged_access_manager_entitlement" "tfentitlement" {
}
}
additional_notification_targets {
admin_email_recipients = ["[email protected]"]
requester_email_recipients = ["[email protected]"]
admin_email_recipients = [
"[email protected]",
]
requester_email_recipients = [
"[email protected]"
]
}
approval_workflow {
manual_approvals {
require_approver_justification = true
steps {
approvals_needed = 1
approver_email_recipients = ["[email protected]"]
approver_email_recipients = [
"[email protected]"
]
approvers {
principals = ["group:[email protected]"]
principals = [
"group:[email protected]"
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlemen

acctest.VcrTest(t, resource.TestCase{
PreCheck: func() { acctest.AccTestPreCheck(t) },
ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t),
ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
CheckDestroy: testAccCheckPrivilegedAccessManagerEntitlementDestroyProducer(t),
Steps: []resource.TestStep{
{
Expand Down Expand Up @@ -49,7 +49,6 @@ func TestAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlemen
func testAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlementBasicExample_basic(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_privileged_access_manager_entitlement" "tfentitlement" {
provider = google-beta
entitlement_id = "tf-test-example-entitlement%{random_suffix}"
location = "global"
max_request_duration = "43200s"
Expand Down Expand Up @@ -93,7 +92,6 @@ resource "google_privileged_access_manager_entitlement" "tfentitlement" {
func testAccPrivilegedAccessManagerEntitlement_privilegedAccessManagerEntitlementBasicExample_update(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_privileged_access_manager_entitlement" "tfentitlement" {
provider = google-beta
entitlement_id = "tf-test-example-entitlement%{random_suffix}"
location = "global"
max_request_duration = "4300s"
Expand Down
23 changes: 15 additions & 8 deletions website/docs/r/privileged_access_manager_entitlement.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ description: |-

An Entitlement defines the eligibility of a set of users to obtain a predefined access for some time possibly after going through an approval workflow.

~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.


## Example Usage - Privileged Access Manager Entitlement Basic


```hcl
resource "google_privileged_access_manager_entitlement" "tfentitlement" {
provider = google-beta
entitlement_id = "example-entitlement"
location = "global"
max_request_duration = "43200s"
Expand All @@ -39,7 +36,9 @@ resource "google_privileged_access_manager_entitlement" "tfentitlement" {
unstructured{}
}
eligible_users {
principals = ["group:[email protected]"]
principals = [
"group:[email protected]"
]
}
privileged_access{
gcp_iam_access{
Expand All @@ -52,17 +51,25 @@ resource "google_privileged_access_manager_entitlement" "tfentitlement" {
}
}
additional_notification_targets {
admin_email_recipients = ["[email protected]"]
requester_email_recipients = ["[email protected]"]
admin_email_recipients = [
"[email protected]",
]
requester_email_recipients = [
"[email protected]"
]
}
approval_workflow {
manual_approvals {
require_approver_justification = true
steps {
approvals_needed = 1
approver_email_recipients = ["[email protected]"]
approver_email_recipients = [
"[email protected]"
]
approvers {
principals = ["group:[email protected]"]
principals = [
"group:[email protected]"
]
}
}
}
Expand Down

0 comments on commit 5f85165

Please sign in to comment.