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

issue #702 fix aws_ses_receipt_rule s3_action position drift change #5092

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

saravanan30erd
Copy link
Contributor

Fixes #702
@bflad one more :)-

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Jul 5, 2018
@bflad bflad added bug Addresses a defect in current functionality. service/ses Issues and PRs that pertain to the ses service. labels Jul 5, 2018
@bflad
Copy link
Contributor

bflad commented Jul 5, 2018

@saravanan30erd have you verified that 0 is not an acceptable value? The SDK documentation does not make this clear and this resource has a fairly convoluted way of handling these position values. 🙁

@bflad bflad added the waiting-response Maintainers are waiting on response from community or contributor. label Jul 5, 2018
@saravanan30erd
Copy link
Contributor Author

saravanan30erd commented Jul 5, 2018

@bflad Yes, there is no clear documentation for this. But even if we provide the position value "0", it writes the position value as "1" only in state.

aws_ses_receipt_rule_set.main: Refreshing state... (ID: primary-rules1)

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + aws_ses_receipt_rule.ses_resource
      id:                                     <computed>
      enabled:                                "true"
      name:                                   "test-deploy1"
      recipients.#:                           "1"
      recipients.929705692:                   "saravanan.palanisamy@xxx.com"
      rule_set_name:                          "primary-rules1"
      s3_action.#:                            "1"
      s3_action.1715965629.bucket_name:       "ansible-code"
      s3_action.1715965629.kms_key_arn:       ""
      s3_action.1715965629.object_key_prefix: ""
      s3_action.1715965629.position:          "0"
      s3_action.1715965629.topic_arn:         ""
      scan_enabled:                           "true"
      tls_policy:                             <computed>


Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

aws_ses_receipt_rule.ses_resource: Creating...
  enabled:                                "" => "true"
  name:                                   "" => "test-deploy1"
  recipients.#:                           "" => "1"
  recipients.929705692:                   "" => "saravanan.palanisamy@xxx.com"
  rule_set_name:                          "" => "primary-rules1"
  s3_action.#:                            "" => "1"
  s3_action.1715965629.bucket_name:       "" => "ansible-code"
  s3_action.1715965629.kms_key_arn:       "" => ""
  s3_action.1715965629.object_key_prefix: "" => ""
  s3_action.1715965629.position:          "" => "0"
  s3_action.1715965629.topic_arn:         "" => ""
  scan_enabled:                           "" => "true"
  tls_policy:                             "" => "<computed>"
aws_ses_receipt_rule.ses_resource: Creation complete after 2s (ID: test-deploy1)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
saravanans-MacBook-Pro-2:ses-kms saravanan$ cat terraform.tfstate
{
    "version": 3,
    "terraform_version": "0.11.7",
    "serial": 2,
    "lineage": "a48a5899-e74a-c462-8ae1-6e168417d1aa",
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {},
            "resources": {
                "aws_ses_receipt_rule.ses_resource": {
                    "type": "aws_ses_receipt_rule",
                    "depends_on": [
                        "aws_ses_receipt_rule_set.main"
                    ],
                    "primary": {
                        "id": "test-deploy1",
                        "attributes": {
                            "add_header_action.#": "0",
                            "bounce_action.#": "0",
                            "enabled": "true",
                            "id": "test-deploy1",
                            "lambda_action.#": "0",
                            "name": "test-deploy1",
                            "recipients.#": "1",
                            "recipients.929705692": "saravanan.palanisamy@xxx.com",
                            "rule_set_name": "primary-rules1",
                            "s3_action.#": "1",
                            "s3_action.2136784892.bucket_name": "ansible-code",
                            "s3_action.2136784892.kms_key_arn": "",
                            "s3_action.2136784892.object_key_prefix": "",
                            "s3_action.2136784892.position": "1",
                            "s3_action.2136784892.topic_arn": "",
                            "scan_enabled": "true",
                            "sns_action.#": "0",
                            "stop_action.#": "0",
                            "tls_policy": "Optional",
                            "workmail_action.#": "0"
                        },
                        "meta": {},
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.aws"
                },
                "aws_ses_receipt_rule_set.main": {
                    "type": "aws_ses_receipt_rule_set",
                    "depends_on": [],
                    "primary": {
                        "id": "primary-rules1",
                        "attributes": {
                            "id": "primary-rules1",
                            "rule_set_name": "primary-rules1"
                        },
                        "meta": {},
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.aws"
                }
            },
            "depends_on": []
        }
    ]
}```

@bflad bflad removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 9, 2018
@bflad bflad added this to the v1.27.0 milestone Jul 9, 2018
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @saravanan30erd! 🚀

4 tests passed (all tests)
=== RUN   TestAccAWSSESReceiptRule_order
--- PASS: TestAccAWSSESReceiptRule_order (7.72s)
=== RUN   TestAccAWSSESReceiptRule_actions
--- PASS: TestAccAWSSESReceiptRule_actions (8.33s)
=== RUN   TestAccAWSSESReceiptRule_basic
--- PASS: TestAccAWSSESReceiptRule_basic (9.81s)
=== RUN   TestAccAWSSESReceiptRule_s3Action
--- PASS: TestAccAWSSESReceiptRule_s3Action (14.28s)

@bflad bflad merged commit 6b1e24b into hashicorp:master Jul 9, 2018
bflad added a commit that referenced this pull request Jul 9, 2018
@bflad
Copy link
Contributor

bflad commented Jul 11, 2018

This has been released in version 1.27.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ses Issues and PRs that pertain to the ses service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgraded to 0.9.3 and aws_ses_receipt_rule is always showing changes related to s3 action
2 participants