src/noos_tf/api.py
def update_workspace_variable(
    organization: str,
    workspace: str,
    token: str,
    variable: str,
    value: str,
) -> None:
    """Update variable in Terraform cloud."""
    # Authenticate client
    tf_client = client.TerraformClient()
    tf_client.set_auth_header(token)

    # Retrieve variables IDs
    tf_vars = tf_client.get_variable_ids(organization, workspace)

    # Update variable with the new value
    if variable not in tf_vars:
        raise TerraformError("Unknown variable in the workspace")
    tf_client.update_variable(tf_vars[variable], value)
Update variable in Terraform cloud.
Update variable in Terraform cloud.
Update variable in Terraform cloud .
def update_workspace_variable(
    organization: str,
    workspace: str,
    token: str,
    variable: str,
    value: str,
) -> None:
    tf_client = client.TerraformClient()
    tf_client.set_auth_header(token)
    tf_vars = tf_client.get_variable_ids(organization, workspace)
    if variable not in tf_vars:
        raise TerraformError("Unknown variable in the workspace")
    tf_client.update_variable(tf_vars[variable], value)
def update_workspace_variable ( organization : str , workspace : str , token : str , variable : str , value : str , ) -> None : tf_client = client . TerraformClient ( ) tf_client . set_auth_header ( token ) tf_vars = tf_client . get_variable_ids ( organization , workspace ) if variable not in tf_vars : raise TerraformError ( "Unknown variable in the workspace" ) tf_client . update_variable ( tf_vars [ variable ] , value )
Update variable in Terraform cloud.
Update variable in Terraform cloud .
"""Update variable in Terraform cloud.""" # Authenticate client # Retrieve variables IDs # Update variable with the new value
organization
str
workspace
str
token
str
variable
str
value
str