Skip to content

Commit

Permalink
Add support for configuring forward proxy in Apigee Environment. (Goo…
Browse files Browse the repository at this point in the history
  • Loading branch information
xuchenma authored and Cheriit committed Jun 4, 2024
1 parent 51c5f01 commit 8ed2a86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
7 changes: 6 additions & 1 deletion mmv1/products/apigee/Environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ examples:
# Resource creation race
skip_vcr: true
- !ruby/object:Provider::Terraform::Examples
name: 'apigee_environment_type_test'
name: 'apigee_environment_patch_update_test'
primary_resource_id: 'apigee_environment'
primary_resource_name: "fmt.Sprintf(\"organizations/tf-test%s\",
context[\"random_suffix\"\
Expand Down Expand Up @@ -197,3 +197,8 @@ properties:
- 'BASE'
- 'INTERMEDIATE'
- 'COMPREHENSIVE'
- !ruby/object:Api::Type::String
name: 'forwardProxyUri'
description: |
Optional. URI of the forward proxy to be applied to the runtime instances in this environment. Must be in the format of {scheme}://{hostname}:{port}. Note that the scheme must be one of "http" or "https", and the port must be supplied.
required: false
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,5 @@ resource "google_apigee_environment" "<%= ctx[:primary_resource_id] %>" {
description = "Apigee Environment"
display_name = "tf-test%{random_suffix}"
type = "COMPREHENSIVE"
forward_proxy_uri = "http://test:123"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-provider-google/google/envvar"
)

func TestAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(t *testing.T) {
func TestAccApigeeEnvironment_apigeeEnvironmentPatchUpdateTestExampleUpdate(t *testing.T) {
acctest.SkipIfVcr(t)
t.Parallel()

Expand All @@ -26,7 +26,7 @@ func TestAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(t *testing.
CheckDestroy: testAccCheckApigeeEnvironmentDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccApigeeEnvironment_apigeeEnvironmentTypeTestExample(context),
Config: testAccApigeeEnvironment_apigeeEnvironmentPatchUpdateTestExample(context),
},
{
ResourceName: "google_apigee_environment.apigee_environment",
Expand All @@ -35,7 +35,7 @@ func TestAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(t *testing.
ImportStateVerifyIgnore: []string{"org_id"},
},
{
Config: testAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(context),
Config: testAccApigeeEnvironment_apigeeEnvironmentPatchUpdateTestExampleUpdate(context),
},
{
ResourceName: "google_apigee_environment.apigee_environment",
Expand All @@ -47,7 +47,7 @@ func TestAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(t *testing.
})
}

func testAccApigeeEnvironment_apigeeEnvironmentTypeTestExampleUpdate(context map[string]interface{}) string {
func testAccApigeeEnvironment_apigeeEnvironmentPatchUpdateTestExampleUpdate(context map[string]interface{}) string {
return acctest.Nprintf(`
resource "google_project" "project" {
provider = google-beta
Expand Down Expand Up @@ -170,6 +170,7 @@ resource "google_apigee_environment" "apigee_environment" {
description = "Apigee Environment"
display_name = "tf-test%{random_suffix}"
type = "INTERMEDIATE"
forward_proxy_uri = "http://test:456"
}
`, context)
}
Expand Down

0 comments on commit 8ed2a86

Please sign in to comment.