Skip to content

[FR]: Add field access_logging_config in the google_apigee_instance resource in apigee module #3261

@carlos-montero-dvt

Description

@carlos-montero-dvt

The feature request

Currently the apigee module does not support enabling the access logging. It would be nice to support this feature.
I have been using github.com/terraform-google-modules/cloud-foundation-fabric//modules/apigee?ref=v40.1.0 and this version which is the latest does not support to pass this value for the instance.

You can check more information about this field and the resource in https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/apigee_instance

Proposed solution

The solution is to add in the instance resource of the apigee module the possibility to configure these parts:

access_logging_config - (Optional) Access logging configuration enables the access logging feature at the instance. Apigee customers can enable access logging to ship the access logs to their own project's cloud logging. Structure is documented below.

The access_logging_config block supports:

enabled - (Required) Boolean flag that specifies whether the customer access log feature is enabled.

filter - (Optional) Ship the access log entries that match the statusCode defined in the filter. The statusCode is the only expected/supported filter field. (Ex: statusCode) The filter will parse it to the Common Expression Language semantics for expression evaluation to build the filter condition. (Ex: "filter": statusCode >= 200 && statusCode < 300 )

Additional context

Currently, only we only can do it by cli or console. And it would be awesome to do it from terraform.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions