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

bigip_sys_iapp An argument named "executeAction" is not expected here. #801

Closed
cchitil opened this issue Apr 8, 2023 · 3 comments · Fixed by #808
Closed

bigip_sys_iapp An argument named "executeAction" is not expected here. #801

cchitil opened this issue Apr 8, 2023 · 3 comments · Fixed by #808
Labels
Backlog issue will be tracked by JIRA in backlog waiting-response
Milestone

Comments

@cchitil
Copy link

cchitil commented Apr 8, 2023

Environment

  • TMOS/Bigip Version: 14.1.4.6
  • Terraform Version: 1.3.7
  • Terraform bigip provider Version: 1.17.0

Summary

A clear and concise description of what the bug is.
Please also include information about the reproducibility and the severity/impact of the issue.

in terraform registry documentation https://registry.terraform.io/providers/F5Networks/bigip/1.17.0/docs/resources/bigip_sys_iapp#argument-reference

the usage of excuteAction is documented.

executeAction - Run the specified template action associated with the applicatio

when using this argument terraform apply reports the following error

Waiting for the plan to start...

Terraform v1.3.7
on linux_amd64
Configuring remote state backend...
Initializing Terraform configuration...

│ Error: Unsupported argument

│ on iapp.tf line 34, in resource "bigip_sys_iapp" "simplehttp":
│ 34: executeAction = "definition"

│ An argument named "executeAction" is not expected here. Did you mean
│ "execute_action"?

when updating existing iapps on F5 via Rest-API calls (e.g. with curl), "executeAction": "definition" must be provided to the json template to complete the iApp deployment. Otherwise only the iApp configuration is changed, but the changes are not deployed to the F5 configuration automatically. (e.g. manual click on "Finished" button in the GUI is required to deploy the changes)

Terraform resource bigip_sys_iapp has the same issue and providing "executeAction" in the json or using the undocumented "execute_action" argument doesn't trigger the configuration deployment of the iApp.

a) resource bigip_sys_iapp doesn't support documented argument "executeAction"
b) doesn't provide the execute-action to F5, thus changes to iApps cannot be updated automatically.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Provide terraform resource config which you are facing trouble along with the output of it.

resource "bigip_sys_iapp" "simplehttp" {
for_each = data.template_file.json_template
name = data.template_file.json_template[each.key].vars.name
partition = data.template_file.json_template[each.key].vars.partition
jsonfile = data.template_file.json_template[each.key].rendered
inherited_devicegroup = data.template_file.json_template[each.key].vars.inherited_devicegroup
inherited_traffic_group = data.template_file.json_template[each.key].vars.inherited_traffic_group
traffic_group = data.template_file.json_template[each.key].vars.traffic_group
strict_updates = data.template_file.json_template[each.key].vars.strict_updates
executeAction = "definition"

# this doesn't work either
#execute_action = "definition"

}

  1. To get to know more about the issue, provide terraform debug logs

no additional logs available

  1. To capture debug logs, export TF_LOG variable with debug ( export TF_LOG= DEBUG ) before
    runnning terraform apply/plan

no additional logs available

  1. As3/DO json along with the resource config( for AS3/DO resource issues )

Expected Behavior

executeAction is working as expected and provide update of changes to iApps.

Actual Behavior

The argument is documented on the terraform registry, but it cannot be used. Also the suggested alternative "execute_action" has no effect and does not update installed iApp

@cchitil cchitil added the bug label Apr 8, 2023
@pgouband
Copy link
Collaborator

Hi @cchitil,

There is an error in the documentation, execute_action is the correct parameter.

You should try the following:

resource "bigip_sys_iapp" "simplehttp" {
	for_each = data.template_file.json_template
		name = data.template_file.json_template[each.key].vars.name
		partition = data.template_file.json_template[each.key].vars.partition
		jsonfile = data.template_file.json_template[each.key].rendered
		inherited_devicegroup = data.template_file.json_template[each.key].vars.inherited_devicegroup
		inherited_traffic_group = data.template_file.json_template[each.key].vars.inherited_traffic_group
		traffic_group = data.template_file.json_template[each.key].vars.traffic_group
		strict_updates = data.template_file.json_template[each.key].vars.strict_updates
	execute_action = "definition"
}

@pgouband pgouband added Backlog issue will be tracked by JIRA in backlog waiting-response and removed bug labels Apr 19, 2023
@KrithikaChidambaram
Copy link

Hi, tracking this documentation change at INFRAANO-1171, thanks!

@cchitil
Copy link
Author

cchitil commented Apr 21, 2023

Hi,

I tried again to use 'execute_action = "definition"', but as before is has no effect. On each terraform run it tries to change the resource, by adding the attribute execute_action, even if there are no changes in the iApp.

output from terraform apply:

bigip_sys_iapp.simplehttp["creditd.postgres.dev.gcpd.erste.cloud_10003"] will be updated in-place
  ~ resource "bigip_sys_iapp" "simplehttp" {
      + execute_action          = "definition"
        id                      = "creditd.postgres.dev.gcpd.erste.cloud_10003"
        name                    = "creditd.postgres.dev.gcpd.erste.cloud_10003"
        # (8 unchanged attributes hidden)
    }

and when something needs to be changed. e.g. adding a policy to an iApp (here: "/Common/ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80_policy",)

~ resource "bigip_sys_iapp" "simplehttp" {
      + execute_action          = "definition"
        id                      = "ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80"
      ~ jsonfile                = jsonencode(
          ~ {
              ~ lists                 = [
                    {
                        encrypted = "no"
                        name      = "irules__irules"
                        value     = [
                            "",
                        ]
                    },
                  ~ {
                        name      = "local_traffic__policies"
                      ~ value     = [
                          - "",
                          + "/Common/ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80_policy",
                        ]
                        # (1 unchanged element hidden)
                    },
                    {
                        encrypted = "no"
                        name      = "net__client_vlan"
                        value     = [
                            "/Common/internal",
                        ]
                    },
                ]
                name                  = "ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80"
                # (17 unchanged elements hidden)
            }
        )
        name                    = "ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80"
        # (7 unchanged attributes hidden)
    }

the iApp isn't deployed to the F5, but the changes are done in the iapp configuration.

list sys application service
sys application service ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80 {
    device-group none
    lists {
        irules__irules { }
        local_traffic__policies {
            value { /Common/ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80_policy }
        }
        net__client_vlan {
            value { /Common/internal }
        }
    }

image

after running the command for execute-action in the tmsh, which is equivalent to the finish button in the web-ui

modify sys application service /Common/ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80.app/ingress.apps.ecp1steved.ecp.dev.gcpd.erste.cloud_80 execute-action definition

the changes to the existing iapp will be deployed to the F5 confguration

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backlog issue will be tracked by JIRA in backlog waiting-response
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants