Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting response header policy id in cache behavior #877

Closed
1 task done
ensighten-ekolinko opened this issue Jan 20, 2022 · 2 comments · Fixed by #945
Closed
1 task done

Add support for setting response header policy id in cache behavior #877

ensighten-ekolinko opened this issue Jan 20, 2022 · 2 comments · Fixed by #945

Comments

@ensighten-ekolinko
Copy link

ensighten-ekolinko commented Jan 20, 2022

Summary

Add support for setting cache and origin request policy ids in the cache behaviors block when creating a distribution in cloudfront_distribution.

Issue Type

Feature Idea

Component Name

cloudfront_distribution

Additional Information

Currently we are unable to set response header policy ids in the cache behaviors section so that they are added to a cloudfront distribution.

Example playbook code:

  cache_behaviors:
    - path_pattern: "*/"
      target_origin_id: ""
      field_level_encryption_id: ""
      response_headers_policy_id: "{{ response_headers_policy_id }}"

Example python code:

cache_behavior['response_headers_policy_id'] = cache_behavior.get('response_headers_policy_id', config.get('response_headers_policy_id'))
cache_behavior['response_headers_policy_id'] = cache_behavior.get('response_headers_policy_id', config.get('origin_request_policy_id'))

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@markuman
Copy link
Member

This works already :)

      -
        field_level_encryption_id: ""
        path_pattern: mbmbmbmbmbmbmbmbmbmbmbmbmb-test-wow
        viewer_protocol_policy: "redirect-to-https"
        max_ttl: 31536000
        min_ttl: 0
        default_ttl: 86400
        smooth_streaming: no
        compress: yes
        target_origin_id: Custom-cdn.test.blaaaaaaaaa.de
        response_headers_policy_id: 60669652-455b-4ae9-85a4-c4c02393f86c
        trusted_signers:
          enabled: no
        allowed_methods:
          items:
            - GET
            - HEAD
          cached_methods:
            - GET
            - HEAD
        forwarded_values:
          query_string: true
          cookies:
            forward: all
          headers:
            - "Host"

The code supports maybe every element in the cache_behaviour item. It's just a lack of documentation.

@markuman markuman added the docs label Feb 22, 2022
@ansibullbot
Copy link

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module labels Feb 22, 2022
@markuman markuman added has_pr and removed feature This issue/PR relates to a feature request labels Feb 22, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 1, 2022
cloudfront_distribution: add missing documentation

SUMMARY
Closes #877
The modul resprects this parameter already.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
patchback bot pushed a commit that referenced this issue Mar 1, 2022
cloudfront_distribution: add missing documentation

SUMMARY
Closes #877
The modul resprects this parameter already.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 454f5eb)
patchback bot pushed a commit that referenced this issue Mar 1, 2022
cloudfront_distribution: add missing documentation

SUMMARY
Closes #877
The modul resprects this parameter already.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
cloudfront_distribution

Reviewed-by: Mark Woolley <[email protected]>
Reviewed-by: Alina Buzachis <None>
(cherry picked from commit 454f5eb)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 2, 2022
[PR #945/454f5eb5 backport][stable-3] cloudfront_distribution: add missing documentation

This is a backport of PR #945 as merged into main (454f5eb).
SUMMARY
Closes #877
The modul resprects this parameter already.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
cloudfront_distribution
softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 2, 2022
[PR #945/454f5eb5 backport][stable-2] cloudfront_distribution: add missing documentation

This is a backport of PR #945 as merged into main (454f5eb).
SUMMARY
Closes #877
The modul resprects this parameter already.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
cloudfront_distribution
abikouo pushed a commit to abikouo/community.aws that referenced this issue Oct 24, 2023
… api as expected by api call (ansible-collections#877)

ec2_eni: change data type of `device_index` to str when passing it to api as expected by api call

SUMMARY

Currently the data type for parameter device_index here while being passed to api call is integer but one of the API calls later used here in the module (describe_network_interfaces) expects it to be string as per boto3 api documentation.
Fixes ansible-collections#870

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_eni

Reviewed-by: Mark Chappell <None>
Reviewed-by: Jill R <None>
Reviewed-by: Alina Buzachis <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants