├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
└── workflows
│ ├── build.yml
│ ├── codeql-analysis.yml
│ ├── docs.yml
│ ├── integration-tests.yaml
│ ├── prevent-new-sdk-additions.yml
│ ├── release.yml
│ └── revive-lint.yml
├── .gitignore
├── .golangci.yml
├── .goreleaser.yml
├── .run
└── Run provider.run.xml
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── build.ps1
├── ci-scripts
├── build.sh
├── helpers
│ ├── build_binaries.sh
│ ├── clean.sh
│ ├── create_artifacts.sh
│ ├── create_github_release.sh
│ └── get_release_version.sh
└── pull_request.sh
├── docs
├── data-sources
│ ├── accounts.md
│ ├── azure_cloud_service_deployment_targets.md
│ ├── azure_service_fabric_cluster_deployment_targets.md
│ ├── azure_web_app_deployment_targets.md
│ ├── certificates.md
│ ├── channels.md
│ ├── cloud_region_deployment_targets.md
│ ├── deployment_freezes.md
│ ├── deployment_targets.md
│ ├── environments.md
│ ├── feeds.md
│ ├── git_credentials.md
│ ├── kubernetes_agent_deployment_targets.md
│ ├── kubernetes_agent_workers.md
│ ├── kubernetes_cluster_deployment_targets.md
│ ├── library_variable_sets.md
│ ├── lifecycles.md
│ ├── listening_tentacle_deployment_targets.md
│ ├── machine.md
│ ├── machine_policies.md
│ ├── machine_proxies.md
│ ├── offline_package_drop_deployment_targets.md
│ ├── polling_tentacle_deployment_targets.md
│ ├── project_groups.md
│ ├── projects.md
│ ├── script_modules
│ ├── script_modules.md
│ ├── service_account_oidc_identity.md
│ ├── space.md
│ ├── spaces.md
│ ├── ssh_connection_deployment_targets.md
│ ├── step_template.md
│ ├── tag_sets.md
│ ├── teams.md
│ ├── tenant_projects.md
│ ├── tenants.md
│ ├── user_roles.md
│ ├── users.md
│ ├── variables.md
│ ├── worker_pools.md
│ └── workers.md
├── guides
│ ├── 0-moving-to-cctopus-deploy-namespace.md
│ ├── 1-terraform.md
│ ├── 2-provider-configuration.md
│ ├── 3-create-resource.md
│ ├── 4-create-multiple-resources.md
│ ├── breaking-changes-list.md
│ ├── breaking-changes-policy.md
│ ├── migration-guide-v0.37.1.md
│ ├── migration-guide-v0.8.0.md
│ └── octopus-server-compatibility.md
├── index.md
└── resources
│ ├── artifactory_generic_feed.md
│ ├── aws_account.md
│ ├── aws_elastic_container_registry.md
│ ├── aws_openid_connect_account.md
│ ├── azure_cloud_service_deployment_target.md
│ ├── azure_container_registry.md
│ ├── azure_openid_connect.md
│ ├── azure_service_fabric_cluster_deployment_target.md
│ ├── azure_service_principal.md
│ ├── azure_subscription_account.md
│ ├── azure_web_app_deployment_target.md
│ ├── built_in_trigger.md
│ ├── certificate.md
│ ├── channel.md
│ ├── cloud_region_deployment_target.md
│ ├── deployment_freeze.md
│ ├── deployment_freeze_project.md
│ ├── deployment_freeze_tenant.md
│ ├── deployment_process.md
│ ├── docker_container_registry.md
│ ├── dynamic_worker_pool.md
│ ├── environment.md
│ ├── external_feed_create_release_trigger.md
│ ├── gcp_account.md
│ ├── generic_oidc_account.md
│ ├── git_credential.md
│ ├── git_trigger.md
│ ├── github_repository_feed.md
│ ├── google_container_registry.md
│ ├── helm_feed.md
│ ├── kubernetes_agent_deployment_target.md
│ ├── kubernetes_agent_worker.md
│ ├── kubernetes_cluster_deployment_target.md
│ ├── library_variable_set.md
│ ├── lifecycle.md
│ ├── listening_tentacle_deployment_target.md
│ ├── listening_tentacle_worker.md
│ ├── machine_policy.md
│ ├── machine_proxy.md
│ ├── maven_feed.md
│ ├── nuget_feed.md
│ ├── oci_registry_feed.md
│ ├── offline_package_drop_deployment_target.md
│ ├── polling_subscription_id.md
│ ├── polling_tentacle_deployment_target.md
│ ├── project.md
│ ├── project_deployment_target_trigger.md
│ ├── project_group.md
│ ├── project_scheduled_trigger.md
│ ├── project_versioning_strategy.md
│ ├── runbook.md
│ ├── runbook_process.md
│ ├── s3_feed.md
│ ├── scoped_user_role.md
│ ├── script_module.md
│ ├── service_account_oidc_identity.md
│ ├── space.md
│ ├── ssh_connection_deployment_target.md
│ ├── ssh_connection_worker.md
│ ├── ssh_key_account.md
│ ├── static_worker_pool.md
│ ├── step_template.md
│ ├── tag.md
│ ├── tag_set.md
│ ├── team.md
│ ├── tenant.md
│ ├── tenant_common_variable.md
│ ├── tenant_project.md
│ ├── tenant_project_variable.md
│ ├── tentacle_certificate.md
│ ├── token_account.md
│ ├── user.md
│ ├── user_role.md
│ ├── username_password_account.md
│ └── variable.md
├── examples
├── EnvBuild
│ ├── main.tf
│ ├── terraform.tfvars
│ └── variables.tf
├── Feeds-Creation
│ ├── .terraform
│ │ └── plugins
│ │ │ └── darwin_amd64
│ │ │ └── lock.json
│ ├── feeds-creation.md
│ ├── main.tf
│ ├── terraform.tfvars
│ └── variables.tf
├── Library-VariableSet-Creation
│ ├── .terraform
│ │ └── plugins
│ │ │ └── darwin_amd64
│ │ │ └── lock.json
│ ├── main.tf
│ ├── terraform.tfvars
│ ├── variables.tf
│ └── variableset-creation.md
├── Project-Group-Creation
│ ├── .terraform
│ │ └── plugins
│ │ │ └── darwin_amd64
│ │ │ └── lock.json
│ ├── main.tf
│ ├── projectgroup-creation.md
│ ├── terraform.tfvars
│ └── variables.tf
├── Variable-Creation
│ ├── .terraform
│ │ └── plugins
│ │ │ └── darwin_amd64
│ │ │ └── lock.json
│ ├── main.tf
│ ├── terraform.tfvars
│ ├── variable-creation.md
│ └── variables.tf
├── data-sources
│ ├── octopusdeploy_accounts
│ │ └── data-source.tf
│ ├── octopusdeploy_azure_cloud_service_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_azure_service_fabric_cluster_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_azure_web_app_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_certificates
│ │ └── data-source.tf
│ ├── octopusdeploy_channels
│ │ └── data-source.tf
│ ├── octopusdeploy_cloud_region_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_deployment_freezes
│ │ └── data-source.tf
│ ├── octopusdeploy_environments
│ │ └── data-source.tf
│ ├── octopusdeploy_feeds
│ │ └── data-source.tf
│ ├── octopusdeploy_kubernetes_agent_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_lifecycles
│ │ └── data-source.tf
│ ├── octopusdeploy_listening_tentacle_deployment_targets
│ │ └── data-source.tf
│ ├── octopusdeploy_project_groups
│ │ └── data-source.tf
│ ├── octopusdeploy_projects
│ │ └── data-source.tf
│ ├── octopusdeploy_script_modules
│ │ └── data-source.tf
│ ├── octopusdeploy_spaces
│ │ └── data-source.tf
│ ├── octopusdeploy_user_roles
│ │ └── data-source.tf
│ ├── octopusdeploy_users
│ │ └── data-source.tf
│ ├── octopusdeploy_variables
│ │ └── data-source.tf
│ └── octopusdeploy_workers
│ │ └── data-source.tf
├── how-to-install-the-octopus-deploy-terraform-provider.md
├── main.tf
├── provider
│ └── provider.tf
├── resources
│ ├── octopusdeploy_artifactory_generic_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_aws_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_aws_elastic_container_registry
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_cloud_service_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_container_registry
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_openid_connect
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_service_fabric_cluster_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_service_principal
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_subscription_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_azure_web_app_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_built_in_trigger
│ │ └── resource.tf
│ ├── octopusdeploy_certificate
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_channel
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_cloud_region_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_deployment_freeze
│ │ └── resource.tf
│ ├── octopusdeploy_deployment_freeze_project
│ │ └── resource.tf
│ ├── octopusdeploy_deployment_freeze_tenant
│ │ └── resource.tf
│ ├── octopusdeploy_deployment_process
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_docker_container_registry
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_dynamic_worker_pool
│ │ └── resource.tf
│ ├── octopusdeploy_environment
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_external_feed_create_release_trigger
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_gcp_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_generic_oidc_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_git_trigger
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_github_repository_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_google_container_registry
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_helm_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_kubernetes_agent_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_kubernetes_agent_worker
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_kubernetes_cluster_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_lifecycle
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_listening_tentacle_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_listening_tentacle_worker
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_maven_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_nuget_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_oci_registry_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_offline_package_drop_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_polling_subscription_id
│ │ └── resource.tf
│ ├── octopusdeploy_polling_tentacle_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_project
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_project_deployment_target_trigger
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_project_group
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_project_scheduled_trigger
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_project_versioning_strategy
│ │ └── resource.tf
│ ├── octopusdeploy_s3_feed
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_script_module
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_space
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_ssh_connection_deployment_target
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_ssh_connection_worker
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_ssh_key_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_static_worker_pool
│ │ └── resource.tf
│ ├── octopusdeploy_tag_set
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_tentacle_certificate
│ │ └── resource.tf
│ ├── octopusdeploy_token_account
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_user
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_user_role
│ │ ├── import.sh
│ │ └── resource.tf
│ ├── octopusdeploy_username_password_account
│ │ ├── import.sh
│ │ └── resource.tf
│ └── octopusdeploy_variable
│ │ ├── import.sh
│ │ └── resource.tf
└── terraform.tfvars
├── github-app-jwt.py
├── go.mod
├── go.sum
├── internal
├── environments
│ └── extension_settings.go
├── errors
│ └── error.go
├── mutex.go
├── project_settings.go
├── projects
│ └── extension_settings.go
├── random.go
└── test
│ ├── channel_test_options.go
│ ├── configuration.go
│ ├── deployment_process_test_options.go
│ ├── lifecycle_test_options.go
│ ├── listening_tentacle_deployment_target_test_options.go
│ ├── project_group_test_options.go
│ ├── project_test_options.go
│ ├── space_test_options.go
│ ├── test_options.go
│ └── util.go
├── main.go
├── migration-readme.md
├── octopusdeploy
├── account_test.go
├── config.go
├── data_source_accounts.go
├── data_source_accounts_test.go
├── data_source_azure_cloud_service_deployment_targets.go
├── data_source_azure_service_fabric_cluster_deployment_targets.go
├── data_source_azure_web_app_deployment_targets.go
├── data_source_certificates.go
├── data_source_channels.go
├── data_source_channels_test.go
├── data_source_cloud_region_deployment_targets.go
├── data_source_deployment_targets.go
├── data_source_kubernetes_agent_deployment_targets.go
├── data_source_kubernetes_agent_workers.go
├── data_source_kubernetes_cluster_deployment_targets.go
├── data_source_listening_tentacle_deployment_targets.go
├── data_source_machine.go
├── data_source_machine_policies.go
├── data_source_offline_package_drop_deployment_targets.go
├── data_source_polling_tentacle_deployment_targets.go
├── data_source_projects_test.go
├── data_source_spaces_test.go
├── data_source_ssh_connection_deployment_targets.go
├── data_source_teams.go
├── data_source_user_roles.go
├── data_source_worker_pools.go
├── data_source_worker_pools_test.go
├── deployment_target_test.go
├── errors.go
├── provider.go
├── provider_test.go
├── resource_aws_account.go
├── resource_aws_account_test.go
├── resource_aws_openid_connect_account.go
├── resource_aws_openid_connect_account_test.go
├── resource_azure_cloud_service_deployment_target.go
├── resource_azure_oidc_account.go
├── resource_azure_oidc_account_test.go
├── resource_azure_service_fabric_cluster_deployment_target.go
├── resource_azure_service_principal_account.go
├── resource_azure_service_principal_account_test.go
├── resource_azure_subscription_account.go
├── resource_azure_subscription_account_test.go
├── resource_azure_web_app_deployment_target.go
├── resource_azure_web_app_deployment_target_test.go
├── resource_certificate.go
├── resource_certificate_test.go
├── resource_channel.go
├── resource_channel_test.go
├── resource_cloud_region_deployment_target.go
├── resource_cloud_region_deployment_target_test.go
├── resource_deployment_process.go
├── resource_deployment_process_test.go
├── resource_dynamic_worker_pool.go
├── resource_dynamic_worker_pool_test.go
├── resource_environment_test.go
├── resource_external_feed_create_release_trigger.go
├── resource_gcp_account.go
├── resource_gcp_account_test.go
├── resource_kubernetes_agent_deployment_target.go
├── resource_kubernetes_agent_worker.go
├── resource_kubernetes_cluster_deployment_target.go
├── resource_kubernetes_cluster_deployment_target_test.go
├── resource_lifecycle_test.go
├── resource_listening_tentacle_deployment_target.go
├── resource_listening_tentacle_deployment_target_test.go
├── resource_machine_policy.go
├── resource_offline_package_drop_deployment_target.go
├── resource_polling_subscription_id.go
├── resource_polling_tentacle_deployment_target.go
├── resource_project_deployment_target_trigger.go
├── resource_project_group_test.go
├── resource_project_scheduled_trigger.go
├── resource_runbook_process.go
├── resource_scoped_user_role.go
├── resource_scoped_user_role_test.go
├── resource_space_test.go
├── resource_ssh_connection_deployment_target.go
├── resource_sshkey_account.go
├── resource_sshkey_account_test.go
├── resource_static_worker_pool.go
├── resource_static_worker_pool_test.go
├── resource_team.go
├── resource_team_test.go
├── resource_token_account.go
├── resource_token_account_test.go
├── resource_user_role.go
├── resource_user_role_test.go
├── schema_account_resource.go
├── schema_action_apply_terraform_template.go
├── schema_action_apply_terraform_template_test.go
├── schema_action_deploy_kubernetes_secret.go
├── schema_action_deploy_kubernetes_secret_test.go
├── schema_action_deploy_tentacle_package.go
├── schema_action_deploy_windows_service.go
├── schema_action_deploy_windows_service_test.go
├── schema_action_manual_intervention_test.go
├── schema_action_run_kubectl_script.go
├── schema_action_run_kubectl_script_test.go
├── schema_action_run_script.go
├── schema_action_run_script_test.go
├── schema_amazon_web_services_account.go
├── schema_amazon_web_services_openid_connect_account.go
├── schema_azure_cloud_service.go
├── schema_azure_cloud_service_deployment_target.go
├── schema_azure_oidc_account.go
├── schema_azure_service_fabric_cluster.go
├── schema_azure_service_fabric_cluster_deployment_target.go
├── schema_azure_service_principal_account.go
├── schema_azure_subscription_account.go
├── schema_azure_web_app.go
├── schema_azure_web_app_deployment_target.go
├── schema_certificate.go
├── schema_channel.go
├── schema_channel_rule.go
├── schema_cloud_region.go
├── schema_cloud_region_deployment_target.go
├── schema_connectivity_policy.go
├── schema_deployment_action.go
├── schema_deployment_action_container.go
├── schema_deployment_action_container_test.go
├── schema_deployment_action_package.go
├── schema_deployment_action_package_test.go
├── schema_deployment_action_slug_package.go
├── schema_deployment_action_slug_package_test.go
├── schema_deployment_action_test.go
├── schema_deployment_process.go
├── schema_deployment_step.go
├── schema_deployment_target.go
├── schema_dynamic_worker_pool.go
├── schema_endpoint.go
├── schema_external_feed_create_release_trigger.go
├── schema_external_security_groups.go
├── schema_gcp_account.go
├── schema_git_dependency.go
├── schema_git_persistence_settings.go
├── schema_github_repository_feed.go
├── schema_identity.go
├── schema_identity_claim.go
├── schema_kubernetes_agent_deployment_target.go
├── schema_kubernetes_agent_worker.go
├── schema_kubernetes_authentication.go
├── schema_kubernetes_aws_authentication.go
├── schema_kubernetes_azure_authentication.go
├── schema_kubernetes_certificate_authentication.go
├── schema_kubernetes_cluster.go
├── schema_kubernetes_cluster_deployment_target.go
├── schema_kubernetes_gcp_authentication.go
├── schema_kubernetes_pod_authentication.go
├── schema_kubernetes_standard_authentication.go
├── schema_listening_tentacle.go
├── schema_listening_tentacle_deployment_target.go
├── schema_machine_cleanup_policy.go
├── schema_machine_connectivity_policy.go
├── schema_machine_health_check_policy.go
├── schema_machine_policy.go
├── schema_machine_script_policy.go
├── schema_machine_update_policy.go
├── schema_manual_intervention_action.go
├── schema_offline_package_drop.go
├── schema_offline_package_drop_deployment_target.go
├── schema_offline_package_drop_destination.go
├── schema_package_reference.go
├── schema_polling_subscription_id.go
├── schema_polling_tentacle.go
├── schema_polling_tentacle_deployment_target.go
├── schema_project_deployment_target_trigger.go
├── schema_project_scheduled_trigger.go
├── schema_properties.go
├── schema_property_value.go
├── schema_queries.go
├── schema_release_creation_strategy.go
├── schema_retention_period.go
├── schema_runbook_process.go
├── schema_scoped_user_role.go
├── schema_ssh_connection.go
├── schema_ssh_connection_deployment_target.go
├── schema_ssh_key_account.go
├── schema_static_worker_pool.go
├── schema_team.go
├── schema_tentacle_version_details.go
├── schema_token_account.go
├── schema_user_role.go
├── schema_utilities.go
├── schema_version_control_settings.go
├── schema_versioning_strategy.go
├── schema_worker.go
├── schema_worker_pool.go
├── testing_container_test.go
├── util.go
└── util_test.go
├── octopusdeploy_framework
├── artifactory_generic_feed_resource_migration_test.go
├── config.go
├── config_test.go
├── data_source_library_variable_sets.go
├── data_source_script_modules.go
├── data_source_script_modules_test.go
├── datasource_deployment_freeze.go
├── datasource_deployment_freeze_test.go
├── datasource_environments.go
├── datasource_environments_test.go
├── datasource_feeds.go
├── datasource_feeds_test.go
├── datasource_git_credentials.go
├── datasource_lifecycle.go
├── datasource_lifecycle_test.go
├── datasource_machine_proxy.go
├── datasource_project.go
├── datasource_project_groups.go
├── datasource_project_groups_test.go
├── datasource_service_account_oidc_identity.go
├── datasource_space.go
├── datasource_spaces.go
├── datasource_spaces_test.go
├── datasource_step_template.go
├── datasource_tag_sets.go
├── datasource_tag_sets_test.go
├── datasource_tenant_projects.go
├── datasource_tenants.go
├── datasource_tenants_test.go
├── datasource_users.go
├── datasource_users_test.go
├── datasource_variables.go
├── datasource_workers.go
├── datasource_workers_test.go
├── framework_provider.go
├── framework_provider_test.go
├── github_repository_feed_resource_migration_test.go
├── helm_feed_resource_migration_test.go
├── maven_feed_resource_migration_test.go
├── nuget_feed_resource_migration_test.go
├── resource_artifactory_generic_feed.go
├── resource_artifactory_generic_feed_test.go
├── resource_aws_elastic_container_registry.go
├── resource_azure_container_registry.go
├── resource_azure_container_registry_test.go
├── resource_built_in_trigger.go
├── resource_built_in_trigger_mapping_test.go
├── resource_built_in_trigger_test.go
├── resource_certificate.go
├── resource_deployment_freeze.go
├── resource_deployment_freeze_project.go
├── resource_deployment_freeze_tenant.go
├── resource_deployment_freeze_test.go
├── resource_docker_container_registry.go
├── resource_docker_container_registry_test.go
├── resource_environment.go
├── resource_environment_migration_test.go
├── resource_environment_test.go
├── resource_generic_oidc_account.go
├── resource_generic_oidc_account_test.go
├── resource_git_credential.go
├── resource_git_credential_test.go
├── resource_git_trigger.go
├── resource_github_repository_feed.go
├── resource_github_repository_feed_test.go
├── resource_google_container_registry.go
├── resource_google_container_registry_test.go
├── resource_helm_feed.go
├── resource_helm_feed_test.go
├── resource_library_variable_set.go
├── resource_library_variable_set_test.go
├── resource_lifecycle.go
├── resource_lifecycle_test.go
├── resource_listening_tentacle_worker.go
├── resource_listening_tentacle_worker_test.go
├── resource_machine_proxy.go
├── resource_machine_proxy_test.go
├── resource_maven_feed.go
├── resource_maven_feed_test.go
├── resource_nuget_feed.go
├── resource_nuget_feed_test.go
├── resource_oci_registry_feed.go
├── resource_oci_registry_feed_test.go
├── resource_project.go
├── resource_project_expand.go
├── resource_project_flatten.go
├── resource_project_group.go
├── resource_project_model.go
├── resource_project_test.go
├── resource_project_versioning_strategy.go
├── resource_runbook.go
├── resource_runbook_migration_test.go
├── resource_s3_feed.go
├── resource_s3_feed_test.go
├── resource_script_module.go
├── resource_script_module_test.go
├── resource_service_account_oidc_identity.go
├── resource_service_account_oidc_identity_test.go
├── resource_space.go
├── resource_ssh_connection_worker.go
├── resource_ssh_connection_worker_test.go
├── resource_step_template.go
├── resource_step_template_test.go
├── resource_tag.go
├── resource_tag_set.go
├── resource_tag_set_test.go
├── resource_tag_test.go
├── resource_tenant.go
├── resource_tenant_common_variable.go
├── resource_tenant_common_variable_test.go
├── resource_tenant_migration_test.go
├── resource_tenant_project.go
├── resource_tenant_project_migration_test.go
├── resource_tenant_project_variable.go
├── resource_tenant_project_variable_test.go
├── resource_tenant_test.go
├── resource_tentacle_certificate.go
├── resource_user.go
├── resource_user_test.go
├── resource_username_password_account.go
├── resource_username_password_account_test.go
├── resource_variable.go
├── resource_variable_test.go
├── schemas
│ ├── action_template_parameter.go
│ ├── artifactory_generic_feed.go
│ ├── aws_elastic_container_registry.go
│ ├── azure_container_registry_feed.go
│ ├── built_in_trigger.go
│ ├── certificate.go
│ ├── connectivity_policy.go
│ ├── deployment_freeze.go
│ ├── deployment_freeze_project.go
│ ├── deployment_freeze_tenant.go
│ ├── deployment_freeze_validation.go
│ ├── docker_container_registry_feed.go
│ ├── entity_schema.go
│ ├── environment.go
│ ├── feed.go
│ ├── feeds.go
│ ├── generic_oidc_account.go
│ ├── git_credential.go
│ ├── git_trigger.go
│ ├── github_repository_feed.go
│ ├── google_container_registry_feed.go
│ ├── helm_feed.go
│ ├── library_variable_set.go
│ ├── lifecycle.go
│ ├── listening_tentacle_worker.go
│ ├── machine_proxy.go
│ ├── maven_feed.go
│ ├── nuget_feed.go
│ ├── oci_registry_feed.go
│ ├── project.go
│ ├── project_group.go
│ ├── project_versioning_strategy.go
│ ├── resource.go
│ ├── runbook.go
│ ├── runbook_retention_period.go
│ ├── s3_feed.go
│ ├── schema.go
│ ├── schema_tentacle_certificate.go
│ ├── schema_test.go
│ ├── script_modules.go
│ ├── service_account_oidc_identity.go
│ ├── space.go
│ ├── spaces.go
│ ├── ssh_connection_worker.go
│ ├── step_template.go
│ ├── tag.go
│ ├── tag_set.go
│ ├── tenant.go
│ ├── tenant_common_variable.go
│ ├── tenant_project_variable.go
│ ├── tenant_projects.go
│ ├── user.go
│ ├── username_password_account.go
│ ├── variable.go
│ ├── variable_prompt_options.go
│ ├── variable_prompt_options_test.go
│ ├── variable_scope.go
│ ├── variable_scope_test.go
│ └── workers.go
├── space_resource_migration_test.go
├── testing_container_test.go
└── util
│ ├── datasource_attribute_builder.go
│ ├── logging.go
│ ├── resource_attribute_builder.go
│ └── util.go
├── running-integration-tests-locally.md
├── scripts
├── changelog-links.sh
├── errcheck.sh
├── gofmtcheck.sh
├── gogetcookie.sh
└── websitefmtcheck.sh
├── templates
├── data-sources
│ ├── accounts.md.tmpl
│ ├── feeds.md.tmpl
│ └── script_modules.tmpl
├── guides
│ ├── 0-moving-to-cctopus-deploy-namespace.md.tmpl
│ ├── 1-terraform.md.tmpl
│ ├── 2-provider-configuration.md.tmpl
│ ├── 3-create-resource.md.tmpl
│ ├── 4-create-multiple-resources.md.tmpl
│ ├── breaking-changes-list.md.tmpl
│ ├── breaking-changes-policy.md.tmpl
│ ├── migration-guide-v0.37.1.md.tmpl
│ ├── migration-guide-v0.8.0.md.tmpl
│ └── octopus-server-compatibility.md.tmpl
├── index.md.tmpl
└── resources
│ ├── aws_account.md.tmpl
│ ├── aws_elastic_container_registry.md.tmpl
│ ├── azure_cloud_service_deployment_target.md.tmpl
│ ├── azure_service_fabric_cluster_deployment_target.md.tmpl
│ ├── azure_service_principal.md.tmpl
│ ├── azure_subscription_account.md.tmpl
│ ├── azure_web_app_deployment_target.md.tmpl
│ ├── cloud_region_deployment_target.md.tmpl
│ ├── deployment_freeze.md.tmpl
│ ├── deployment_freeze_project.md.tmpl
│ ├── deployment_freeze_tenant.md.tmpl
│ ├── docker_container_registry.md.tmpl
│ ├── dynamic_worker_pool.md.tmpl
│ ├── external_feed_create_release_trigger.md.tmpl
│ ├── gcp_account.md.tmpl
│ ├── github_repository_feed.md.tmpl
│ ├── helm_feed.md.tmpl
│ ├── kubernetes_agent_deployment_target.md.tmpl
│ ├── kubernetes_cluster_deployment_target.md.tmpl
│ ├── lifecycle.md.tmpl
│ ├── listening_tentacle_deployment_target.md.tmpl
│ ├── maven_feed.md.tmpl
│ ├── nuget_feed.md.tmpl
│ ├── offline_package_drop_deployment_target.md.tmpl
│ ├── polling_tentacle_deployment_target.md.tmpl
│ ├── project.md.tmpl
│ ├── project_scheduled_trigger.md.tmpl
│ ├── runbook.md.tmpl
│ ├── runbook_process.md.tmpl
│ ├── scoped_user_role.md.tmpl
│ ├── ssh_connection_deployment_target.md.tmpl
│ ├── ssh_key_account.md.tmpl
│ ├── static_worker_pool.md.tmpl
│ ├── team.md.tmpl
│ ├── tenant.md.tmpl
│ ├── tentacle_certificate.md.tmpl
│ ├── token_account.md.tmpl
│ ├── username_password_account.md.tmpl
│ └── variable.md.tmpl
└── tools
└── tools.go
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Force checkout line endings in Unix format - https://help.github.com/articles/dealing-with-line-endings/
2 | * text eol=lf
3 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: bug
6 | assignees: ''
7 |
8 | ---
9 |
10 | On 1 June 2025, the Octopus Deploy Terraform Provider was promoted from a `Labs` project to a fully-supported, first-class Octopus Deploy integration.
11 |
12 | As part of this promotion, we released [v1.0 of the provider](https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/1.0.0), and migrated the codebase from the `OctopusDeployLabs` GitHub organization to the `OctopusDeploy` organization. The provider also moved in the Hashicorp Terraform Registry.
13 |
14 | * New Repository: https://github.com/OctopusDeploy/
15 | * New Provider Registry Page: https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/latest/docs
16 | * Migration Guide: https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/1.0.0/docs/guides/moving-from-octopus-deploy-labs-namespace
17 |
18 | We are no longer accepting contributions or issues in this repo, and we plan to archive it.
19 |
20 | Please head over to the new repository for continued support, updates and contributions.
21 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | On 1 June 2025, the Octopus Deploy Terraform Provider was promoted from a `Labs` project to a fully-supported, first-class Octopus Deploy integration.
11 |
12 | As part of this promotion, we released [v1.0 of the provider](https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/1.0.0), and migrated the codebase from the `OctopusDeployLabs` GitHub organization to the `OctopusDeploy` organization. The provider also moved in the Hashicorp Terraform Registry.
13 |
14 | * New Repository: https://github.com/OctopusDeploy/
15 | * New Provider Registry Page: https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/latest/docs
16 | * Migration Guide: https://registry.terraform.io/providers/OctopusDeploy/octopusdeploy/1.0.0/docs/guides/moving-from-octopus-deploy-labs-namespace
17 |
18 | We are no longer accepting contributions or issues in this repo, and we plan to archive it.
19 |
20 | Please head over to the new repository for continued support, updates and contributions.
21 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: build
2 | on:
3 | push:
4 | branches:
5 | - '**'
6 | schedule:
7 | - cron: '0 19 * * *'
8 | workflow_dispatch:
9 | jobs:
10 | build:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v3
14 | with:
15 | fetch-depth: 0
16 | - uses: actions/setup-go@v5
17 | with:
18 | go-version: '1.22'
19 | - run: go build ./...
--------------------------------------------------------------------------------
/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: Validate Docs
2 | on:
3 | push:
4 | branches:
5 | - '**'
6 | workflow_dispatch:
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | with:
13 | fetch-depth: 0
14 | - uses: actions/setup-go@v3
15 | with:
16 | go-version: '1.22'
17 | - run: go generate main.go
18 |
19 | - name: Stage new and modified files in docs folder
20 | run: git add docs/
21 |
22 | - name: Check for file changes
23 | run: git diff --cached --exit-code
24 |
--------------------------------------------------------------------------------
/.github/workflows/prevent-new-sdk-additions.yml:
--------------------------------------------------------------------------------
1 | name: Prevent New Terraform SDK additions
2 |
3 | on:
4 | push:
5 | branches:
6 | - '**'
7 | pull_request:
8 | branches:
9 | - '**'
10 |
11 | jobs:
12 | detect-new-sdk-files:
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - name: Checkout repository
17 | uses: actions/checkout@v2
18 | with:
19 | fetch-depth: 0
20 |
21 | - name: Check for new SDK resources or datasources
22 | run: |
23 | git diff --name-status origin/main..${{ vars.GITHUB_REF }} | grep '^A' | grep '^A\s\+octopusdeploy/' > new_files.txt || true
24 | if [ -s new_files.txt ]; then
25 | echo "New files were found in the 'octopusdeploy/' directory."
26 | cat new_files.txt
27 | echo "::error::We are no longer creating new Terraform SDK resources or datasources. Anything new should be added using Terraform Framework in the 'octopusdeploy_framework' folder instead."
28 | exit 1
29 | else
30 | echo "::notice::No new files detected in the 'octopusdeploy/' directory."
31 | fi
32 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: release
2 | on:
3 | push:
4 | tags:
5 | - "v*"
6 | jobs:
7 | goreleaser:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v3
11 | with:
12 | fetch-depth: 0
13 | - uses: actions/setup-go@v3
14 | with:
15 | go-version: '1.22'
16 | - uses: crazy-max/ghaction-import-gpg@v5
17 | id: import_gpg
18 | with:
19 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
20 | passphrase: ${{ secrets.PASSPHRASE }}
21 | - uses: goreleaser/goreleaser-action@v3
22 | with:
23 | args: release --clean
24 | version: latest
25 | env:
26 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 | GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
28 |
--------------------------------------------------------------------------------
/.github/workflows/revive-lint.yml:
--------------------------------------------------------------------------------
1 | name: revive-lint
2 |
3 | on:
4 | pull_request:
5 |
6 | jobs:
7 | build:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v3
11 | with:
12 | fetch-depth: 0
13 | - uses: actions/setup-go@v3
14 | - name: Run Revive Action by pulling pre-built image
15 | uses: docker://morphy/revive-action:v2
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, build with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # Editors
15 | .atom/
16 | .idea/
17 | .vscode/
18 |
19 | # Go Debugging
20 | OFF/
21 |
22 | # Terraform
23 | .terraform/
24 | terraform.*
25 | *.tfstate
26 | *.tfstate.backup
27 | crash.log
28 | tflog.txt
29 |
30 | # TF Binaries
31 | terraform-provider-octopusdeploy
32 | terraform-provider-octopusdeploy.exe
33 |
34 | # Commenting the below because I wasn't able to save my main.tf configs for examples
35 | #main.tf
36 | artifacts/
37 | build/
38 | vendor/
39 | .release/
40 | *.tfplan
41 |
42 | node_modules/
43 | .env
44 |
45 | examples/provider.tf
46 |
47 | # goreleaser
48 | dist/
49 |
50 | # Ignore lock and state files in the terraform test directory
51 | terraform/**/.terraform.lock.hcl
52 | terraform/**/.terraform.tfstate.lock.info
53 | terraform/**/terrform.tfstate
54 | terraform/**/.terraform/*
55 |
56 | # Ignore the test results file
57 | results.xml
58 |
59 | .DS_Store
60 |
--------------------------------------------------------------------------------
/.golangci.yml:
--------------------------------------------------------------------------------
1 | linters:
2 | enable:
3 | - golint
4 | - gosec
5 | - unconvert
6 | - gocritic
7 | disable:
8 | - errcheck
9 | # Prevent this error: Error return value of `d.Set` is not checked (errcheck)
10 |
--------------------------------------------------------------------------------
/.run/Run provider.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/build.ps1:
--------------------------------------------------------------------------------
1 | # Set variables
2 | $VERSION = "0.7.104"
3 | $BINARY = "terraform-provider-octopusdeploy.exe"
4 | $HOSTNAME = "octopus.com"
5 | $NAMESPACE = "com"
6 | $NAME = "octopusdeploy"
7 | $OS_ARCH = "windows_amd64"
8 |
9 | # Build the provider
10 | go build -o $BINARY
11 |
12 | # Create the plugin directory if it doesn't exist
13 | $pluginDir = "$env:APPDATA\terraform.d\plugins\$HOSTNAME\$NAMESPACE\$NAME\$VERSION\$OS_ARCH"
14 | New-Item -ItemType Directory -Force -Path $pluginDir
15 |
16 | # Move the binary to the plugin directory
17 | Move-Item -Force $BINARY $pluginDir
18 |
19 | Write-Host "Provider installed successfully to $pluginDir"
--------------------------------------------------------------------------------
/ci-scripts/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | # Clean the directories
5 | ci-scripts/helpers/clean.sh
6 |
7 | # Load the release version environment variable
8 | . ci-scripts/helpers/get_release_version.sh
9 |
10 | # Build the binaries
11 | ci-scripts/helpers/build_binaries.sh
12 |
13 | # Create zip files
14 | ci-scripts/helpers/create_artifacts.sh
15 |
--------------------------------------------------------------------------------
/ci-scripts/helpers/build_binaries.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | if [ -z "${RELEASE_VERSION}" ]; then
5 | echo "The environment variable RELEASE_VERSION needs to be set. Exiting script."
6 | exit 1
7 | fi
8 |
9 | BUILD_PATH_TEMPLATE="build/terraform-provider-octopusdeploy-{{.OS}}_{{.Arch}}-${RELEASE_VERSION}/{{.Dir}}_v${RELEASE_VERSION}"
10 |
11 | go get github.com/mitchellh/gox
12 | gox -osarch="linux/amd64" -osarch="linux/386" -osarch="windows/amd64" -osarch="windows/386" -osarch="darwin/amd64" -osarch="darwin/386" -output="${BUILD_PATH_TEMPLATE}"
13 |
--------------------------------------------------------------------------------
/ci-scripts/helpers/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | echo "Performing Clean"
5 |
6 | rm -rf build/
7 | rm -rf artifacts/
8 |
--------------------------------------------------------------------------------
/ci-scripts/helpers/create_artifacts.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | ARTIFACTS_PATH="${PWD}/artifacts"
5 | mkdir -p $ARTIFACTS_PATH
6 |
7 | for build in $(ls -d build/*)
8 | do
9 | pushd $build
10 |
11 | RELEASENAME=$(basename $build)
12 | ZIPNAME="${RELEASENAME}.zip"
13 |
14 | echo "Preparing zip file ${ZIPNAME}"
15 |
16 | # Adding files to zip
17 | zip $ZIPNAME *
18 |
19 | mv $ZIPNAME $ARTIFACTS_PATH
20 | popd
21 | done
22 |
--------------------------------------------------------------------------------
/ci-scripts/helpers/create_github_release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | if [ -z "${RELEASE_VERSION}" ]; then
5 | echo "The environment variable RELEASE_VERSION needs to be set. Exiting script."
6 | exit 1
7 | fi
8 |
9 | go get -u github.com/tcnksm/ghr
10 |
11 | ghr -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${RELEASE_VERSION} ./artifacts/
12 |
--------------------------------------------------------------------------------
/ci-scripts/helpers/get_release_version.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Dot Source this script to set the RELEASE_VERSION environment variable
4 |
5 | set -eo pipefail
6 |
7 | if [ -z "${CIRCLE_BUILD_NUM}" ]; then
8 | echo "The environment variable CIRCLE_BUILD_NUM is not set. Setting as 999."
9 | CIRCLE_BUILD_NUM="999"
10 | fi
11 |
12 | RELEASE_VERSION="0.0.2-alpha.${CIRCLE_BUILD_NUM}"
13 | echo "Release version is ${RELEASE_VERSION}"
14 |
15 | export RELEASE_VERSION=$RELEASE_VERSION
16 |
--------------------------------------------------------------------------------
/ci-scripts/pull_request.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eo pipefail
3 |
4 | # Download modules first otherwise linting has errors
5 | go mod download
6 |
7 | # Lint
8 |
9 | ## When in CI, install linter and run from a special path
10 | if [ -n "${CI}" ]; then
11 | curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.27.0
12 |
13 | ./bin/golangci-lint run --timeout 2m0s
14 | else
15 | golangci-lint run --timeout 2m0s
16 | fi
17 |
18 | # Test
19 |
20 | ## Enable TF Acceptance Tests
21 | export TF_ACC=1
22 |
23 | go test -v -timeout 240s ./octopusdeploy/...
24 |
--------------------------------------------------------------------------------
/docs/data-sources/git_credentials.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_git_credentials Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Use this data source to retrieve information about Git credentials in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_git_credentials (Data Source)
10 |
11 | Use this data source to retrieve information about Git credentials in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Optional
19 |
20 | - `name` (String) The name of the Git Credential to filter by.
21 | - `skip` (Number) The number of records to skip.
22 | - `space_id` (String) The space ID associated with this Git Credential.
23 | - `take` (Number) The number of records to take.
24 |
25 | ### Read-Only
26 |
27 | - `git_credentials` (Attributes List) Provides information about existing GitCredentials. (see [below for nested schema](#nestedatt--git_credentials))
28 | - `id` (String) The unique ID for this resource.
29 |
30 |
31 | ### Nested Schema for `git_credentials`
32 |
33 | Read-Only:
34 |
35 | - `description` (String) The description of this Git Credential.
36 | - `id` (String) The unique ID for this resource.
37 | - `name` (String) The name of this Git Credential.
38 | - `space_id` (String) The space ID associated with this Git Credential.
39 | - `type` (String) The Git credential authentication type.
40 | - `username` (String) The username for the Git credential.
41 |
42 |
43 |
--------------------------------------------------------------------------------
/docs/data-sources/machine.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_machine Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 |
7 | ---
8 |
9 | # octopusdeploy_machine (Data Source)
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `name` (String)
21 |
22 | ### Read-Only
23 |
24 | - `endpoint_communicationstyle` (String)
25 | - `endpoint_id` (String)
26 | - `endpoint_proxyid` (String)
27 | - `endpoint_tentacleversiondetails_upgradelocked` (String)
28 | - `endpoint_tentacleversiondetails_upgraderequired` (String)
29 | - `endpoint_tentacleversiondetails_upgradesuggested` (String)
30 | - `endpoint_tentacleversiondetails_version` (String)
31 | - `endpoint_thumbprint` (String)
32 | - `endpoint_uri` (String)
33 | - `environments` (List of String)
34 | - `haslatestcalamari` (Boolean)
35 | - `id` (String) The ID of this resource.
36 | - `isdisabled` (Boolean)
37 | - `isinprocess` (Boolean)
38 | - `machinepolicy` (String)
39 | - `roles` (List of String)
40 | - `status` (String)
41 | - `statussummary` (String)
42 | - `tenanteddeploymentparticipation` (String)
43 | - `tenantids` (List of String)
44 | - `tenanttags` (List of String)
45 |
46 |
47 |
--------------------------------------------------------------------------------
/docs/data-sources/service_account_oidc_identity.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_service_account_oidc_identity Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 |
7 | ---
8 |
9 | # octopusdeploy_service_account_oidc_identity (Data Source)
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `service_account_id` (String) ID of the user associated to this identity
21 |
22 | ### Optional
23 |
24 | - `id` (String) The unique ID for this resource.
25 |
26 | ### Read-Only
27 |
28 | - `issuer` (String) OIDC issuer url
29 | - `name` (String) Name of the user associated to this identity
30 | - `subject` (String) OIDC subject claims
31 |
32 |
33 |
--------------------------------------------------------------------------------
/docs/data-sources/space.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_space Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Provides information about an existing space.
7 | ---
8 |
9 | # octopusdeploy_space (Data Source)
10 |
11 | Provides information about an existing space.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Optional
19 |
20 | - `name` (String) The name of this resource, no more than 20 characters long
21 |
22 | ### Read-Only
23 |
24 | - `description` (String) The description of this space.
25 | - `id` (String) The unique ID for this resource.
26 | - `is_default` (Boolean) Specifies if this space is the default space in Octopus.
27 | - `is_task_queue_stopped` (Boolean) Specifies the status of the task queue for this space.
28 | - `slug` (String) The unique slug of this space
29 | - `space_managers_team_members` (Set of String) A list of user IDs designated to be managers of this space.
30 | - `space_managers_teams` (Set of String) A list of team IDs designated to be managers of this space.
31 |
32 |
33 |
--------------------------------------------------------------------------------
/docs/data-sources/tag_sets.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tag_sets Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Provides information about existing tag sets.
7 | ---
8 |
9 | # octopusdeploy_tag_sets (Data Source)
10 |
11 | Provides information about existing tag sets.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Optional
19 |
20 | - `ids` (List of String) A filter to search by a list of IDs.
21 | - `partial_name` (String) A filter to search by the partial match of a name.
22 | - `skip` (Number) A filter to specify the number of items to skip in the response.
23 | - `space_id` (String) The space ID associated with this resource.
24 | - `take` (Number) A filter to specify the number of items to take (or return) in the response.
25 |
26 | ### Read-Only
27 |
28 | - `id` (String) The ID of this resource.
29 | - `tag_sets` (Attributes List) A list of tag sets that match the filter(s). (see [below for nested schema](#nestedatt--tag_sets))
30 |
31 |
32 | ### Nested Schema for `tag_sets`
33 |
34 | Read-Only:
35 |
36 | - `description` (String) The description of this tag set.
37 | - `id` (String) The unique ID for this resource.
38 | - `name` (String) The name of this resource.
39 | - `sort_order` (Number) The sort order associated with this resource.
40 | - `space_id` (String) The space ID associated with this resource.
41 |
42 |
43 |
--------------------------------------------------------------------------------
/docs/data-sources/tenant_projects.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tenant_projects Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Provides information about existing tenants.
7 | ---
8 |
9 | # octopusdeploy_tenant_projects (Data Source)
10 |
11 | Provides information about existing tenants.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Optional
19 |
20 | - `environment_ids` (List of String) A filter to search by a list of IDs.
21 | - `project_ids` (List of String) A filter to search by a list of IDs.
22 | - `space_id` (String) The space ID associated with this tenant projects.
23 | - `tenant_ids` (List of String) A filter to search by a list of IDs.
24 |
25 | ### Read-Only
26 |
27 | - `tenant_projects` (Attributes List) A list of related tenants, projects and environments that match the filter(s). (see [below for nested schema](#nestedatt--tenant_projects))
28 |
29 |
30 | ### Nested Schema for `tenant_projects`
31 |
32 | Read-Only:
33 |
34 | - `environment_ids` (List of String) The environment IDs associated with this tenant.
35 | - `id` (String) The unique ID for this resource.
36 | - `project_id` (String) The project ID associated with this tenant.
37 | - `tenant_id` (String) The tenant ID associated with this tenant.
38 |
39 |
40 |
--------------------------------------------------------------------------------
/docs/data-sources/worker_pools.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_worker_pools Data Source - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Provides information about existing worker pools.
7 | ---
8 |
9 | # octopusdeploy_worker_pools (Data Source)
10 |
11 | Provides information about existing worker pools.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Optional
19 |
20 | - `ids` (List of String) A filter to search by a list of IDs.
21 | - `name` (String) A filter to search by name.
22 | - `partial_name` (String) A filter to search by the partial match of a name.
23 | - `skip` (Number) A filter to specify the number of items to skip in the response.
24 | - `space_id` (String) The space ID associated with this resource.
25 | - `take` (Number) A filter to specify the number of items to take (or return) in the response.
26 |
27 | ### Read-Only
28 |
29 | - `id` (String) The ID of this resource.
30 | - `worker_pools` (List of Object) A list of worker pools that match the filter(s). (see [below for nested schema](#nestedatt--worker_pools))
31 |
32 |
33 | ### Nested Schema for `worker_pools`
34 |
35 | Read-Only:
36 |
37 | - `can_add_workers` (Boolean)
38 | - `description` (String)
39 | - `id` (String)
40 | - `is_default` (Boolean)
41 | - `name` (String)
42 | - `sort_order` (Number)
43 | - `space_id` (String)
44 | - `worker_pool_type` (String)
45 | - `worker_type` (String)
46 |
47 |
48 |
--------------------------------------------------------------------------------
/docs/guides/breaking-changes-list.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "Breaking Changes List"
3 | subcategory: "Upgrades & Migrations"
4 | ---
5 |
6 | # Breaking Changes
7 | This page details the breaking changes and deprecations we're managing according to our [Breaking Changes policy](./breaking-changes-policy.md).
8 |
9 | ## Announced
10 |
11 | | Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
12 | |---------|---------------------------------------------------------|-------------|-----------------|-----------|------------|
13 | | [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
14 |
15 | ## Enacted
16 |
17 | We aren't currently tracking any enacted Breaking Changes.
18 |
19 |
20 | ## Completed
21 |
22 | | Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
23 | |---------|------------|-------------|-----------------|-----------|------------|
24 | | [v0.8.0](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.8.0) | Many changes* | Many changes* | [Guide](./migration-guide-v0.8.0.md) | N/A | N/A |
25 |
26 |
27 | -> *The breaking changes in v0.8.0 were all done years before our Breaking Changes policy was officially established, so didn't follow those procedures, but the Migration Guide is noted here just in case.
28 |
--------------------------------------------------------------------------------
/docs/resources/deployment_freeze_tenant.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_deployment_freeze_tenant Resource - terraform-provider-octopusdeploy"
3 | subcategory: ""
4 | description: |-
5 |
6 | ---
7 |
8 | # octopusdeploy_deployment_freeze_tenant (Resource)
9 |
10 |
11 |
12 | -> Supported by Octopus Server starting from version 2025.1
13 |
14 | ## Example Usage
15 |
16 | ```terraform
17 | # Deployment freeze
18 | resource "octopusdeploy_deployment_freeze" "example" {
19 | name = "Summer break"
20 | start = "2024-06-25T00:00:00+10:00"
21 | end = "2024-06-27T00:00:00+08:00"
22 | }
23 |
24 | # Freeze with ids sourced from resources and data sources.
25 | # Tenants can be sourced from different spaces, a single scope can only reference resources from the same space.
26 |
27 | resource "octopusdeploy_deployment_freeze_tenant" "production_freeze" {
28 | deploymentfreeze_id = octopusdeploy_deployment_freeze.example.id
29 | tenant_id = resource.octopusdeploy_tenant.example.id
30 | project_id = resource.octopusdeploy_project.example.id
31 | environment_id = data.environments.production.id
32 | }
33 | ```
34 |
35 | ## Schema
36 |
37 | ### Required
38 |
39 | - `deploymentfreeze_id` (String) The deployment freeze ID associated with this freeze scope.
40 | - `environment_id` (String) The environment ID associated with this freeze scope.
41 | - `project_id` (String) The project ID associated with this freeze scope.
42 | - `tenant_id` (String) The tenant ID associated with this freeze scope.
43 |
44 | ### Read-Only
45 |
46 | - `id` (String) The unique ID for this resource.
47 |
48 |
49 |
--------------------------------------------------------------------------------
/docs/resources/docker_container_registry.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_docker_container_registry Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Feeds"
4 | description: |-
5 | This resource manages a Docker Container Registry in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_docker_container_registry (Resource)
9 |
10 | This resource manages a Docker Container Registry in Octopus Deploy.
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_docker_container_registry" "example" {
16 | feed_uri = "https://index.docker.io"
17 | name = "Test Docker Container Registry (OK to Delete)"
18 | password = "test-password"
19 | registry_path = "testing/test-image"
20 | username = "test-username"
21 | }
22 | ```
23 |
24 | ## Schema
25 |
26 | ### Required
27 |
28 | - `feed_uri` (String)
29 | - `name` (String) The name of this resource.
30 |
31 | ### Optional
32 |
33 | - `api_version` (String)
34 | - `package_acquisition_location_options` (List of String)
35 | - `password` (String, Sensitive) The password associated with this resource.
36 | - `registry_path` (String)
37 | - `space_id` (String) The space ID associated with this docker container registry feed.
38 | - `username` (String, Sensitive) The username associated with this resource.
39 |
40 | ### Read-Only
41 |
42 | - `id` (String) The unique ID for this resource.
43 |
44 | ## Import
45 |
46 | Import is supported using the following syntax:
47 |
48 | ```shell
49 | terraform import [options] octopusdeploy_docker_container_registry.
50 | ```
51 |
--------------------------------------------------------------------------------
/docs/resources/dynamic_worker_pool.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_dynamic_worker_pool Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Worker Pools"
4 | description: |-
5 | This resource manages dynamic worker pools in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_dynamic_worker_pool (Resource)
9 |
10 | This resource manages dynamic worker pools in Octopus Deploy.
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_dynamic_worker_pool" "example" {
16 | description = "Description for the dynamic worker pool."
17 | is_default = true
18 | name = "Test Dynamic Worker Pool (OK to Delete)"
19 | sort_order = 5
20 | worker_type = "UbuntuDefault"
21 | }
22 | ```
23 |
24 | ## Schema
25 |
26 | ### Required
27 |
28 | - `name` (String) The name of this resource.
29 | - `worker_type` (String)
30 |
31 | ### Optional
32 |
33 | - `description` (String) The description of this dynamic worker pool.
34 | - `id` (String) The unique ID for this resource.
35 | - `is_default` (Boolean)
36 | - `sort_order` (Number) The order number to sort a dynamic worker pool.
37 | - `space_id` (String) The space ID associated with this resource.
38 |
39 | ### Read-Only
40 |
41 | - `can_add_workers` (Boolean)
42 |
43 |
44 |
--------------------------------------------------------------------------------
/docs/resources/gcp_account.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_gcp_account Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Accounts"
4 | description: |-
5 | This resource manages GCP accounts in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_gcp_account (Resource)
9 |
10 | This resource manages GCP accounts in Octopus Deploy.
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_gcp_account" "example" {
16 | json_key = "json-key"
17 | name = "GCP Account (OK to Delete)"
18 | }
19 | ```
20 |
21 | ## Schema
22 |
23 | ### Required
24 |
25 | - `json_key` (String, Sensitive) The JSON key associated with this GCP account.
26 | - `name` (String) The name of this GCP account.
27 |
28 | ### Optional
29 |
30 | - `description` (String) A user-friendly description of this GCP account.
31 | - `environments` (List of String) A list of environment IDs associated with this resource.
32 | - `space_id` (String) The space ID associated with this resource.
33 | - `tenant_tags` (List of String) A list of tenant tags associated with this resource.
34 | - `tenanted_deployment_participation` (String) The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
35 | - `tenants` (List of String) A list of tenant IDs associated with this resource.
36 |
37 | ### Read-Only
38 |
39 | - `id` (String) The ID of this resource.
40 |
41 | ## Import
42 |
43 | Import is supported using the following syntax:
44 |
45 | ```shell
46 | terraform import [options] octopusdeploy_gcp_account.
47 | ```
48 |
--------------------------------------------------------------------------------
/docs/resources/git_credential.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_git_credential Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Manages a Git credential in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_git_credential (Resource)
10 |
11 | Manages a Git credential in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `name` (String) The name of this Git Credential.
21 | - `password` (String, Sensitive) The password for the Git credential.
22 | - `username` (String) The username for the Git credential.
23 |
24 | ### Optional
25 |
26 | - `description` (String) The description of this Git Credential.
27 | - `space_id` (String) The space ID associated with this Git Credential.
28 | - `type` (String) The Git credential authentication type.
29 |
30 | ### Read-Only
31 |
32 | - `id` (String) The unique ID for this resource.
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/resources/helm_feed.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_helm_feed Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Feeds"
4 | description: |-
5 | This resource manages a Helm Feed in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_helm_feed (Resource)
9 |
10 | This resource manages a Helm Feed in Octopus Deploy.
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_helm_feed" "example" {
16 | feed_uri = "https://charts.helm.sh/stable"
17 | password = "test-password"
18 | name = "Test Helm Feed (OK to Delete)"
19 | username = "test-username"
20 | }
21 | ```
22 |
23 | ## Schema
24 |
25 | ### Required
26 |
27 | - `feed_uri` (String)
28 | - `name` (String) The name of this resource.
29 |
30 | ### Optional
31 |
32 | - `package_acquisition_location_options` (List of String)
33 | - `password` (String, Sensitive) The password associated with this resource.
34 | - `space_id` (String) The space ID associated with this helm feed.
35 | - `username` (String, Sensitive) The username associated with this resource.
36 |
37 | ### Read-Only
38 |
39 | - `id` (String) The unique ID for this resource.
40 |
41 | ## Import
42 |
43 | Import is supported using the following syntax:
44 |
45 | ```shell
46 | terraform import [options] octopusdeploy_helm_feed.
47 | ```
48 |
--------------------------------------------------------------------------------
/docs/resources/machine_proxy.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_machine_proxy Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | This resource manages machine proxies in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_machine_proxy (Resource)
10 |
11 | This resource manages machine proxies in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `host` (String) DNS hostname of the proxy server
21 | - `name` (String) The name of this resource.
22 | - `password` (String, Sensitive) Password of the proxy server
23 | - `username` (String) Username of the proxy server
24 |
25 | ### Optional
26 |
27 | - `port` (Number) The port number for the proxy server.
28 | - `space_id` (String) The space ID associated with this machine_proxy.
29 |
30 | ### Read-Only
31 |
32 | - `id` (String) The unique ID for this resource.
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/resources/oci_registry_feed.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_oci_registry_feed Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | This resource manages a OCI Registry feed in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_oci_registry_feed (Resource)
10 |
11 | This resource manages a OCI Registry feed in Octopus Deploy.
12 |
13 | ## Example Usage
14 |
15 | ```terraform
16 | resource "octopusdeploy_oci_registry_feed" "example" {
17 | feed_uri = "oci://test-registry.docker.io"
18 | password = "test-password"
19 | name = "Test oci Registry Feed (OK to Delete)"
20 | username = "test-username"
21 | }
22 | ```
23 |
24 |
25 | ## Schema
26 |
27 | ### Required
28 |
29 | - `feed_uri` (String)
30 | - `name` (String) The name of this resource.
31 |
32 | ### Optional
33 |
34 | - `password` (String, Sensitive) The password associated with this resource.
35 | - `space_id` (String) The space ID associated with this OCI registry.
36 | - `username` (String, Sensitive) The username associated with this resource.
37 |
38 | ### Read-Only
39 |
40 | - `id` (String) The unique ID for this resource.
41 |
42 | ## Import
43 |
44 | Import is supported using the following syntax:
45 |
46 | ```shell
47 | terraform import [options] octopusdeploy_oci_registry_feed.
48 | ```
49 |
--------------------------------------------------------------------------------
/docs/resources/polling_subscription_id.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_polling_subscription_id Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | A unique polling subscription ID that can be used by polling tentacles.
7 | ---
8 |
9 | # octopusdeploy_polling_subscription_id (Resource)
10 |
11 | A unique polling subscription ID that can be used by polling tentacles.
12 |
13 | ## Example Usage
14 |
15 | ```terraform
16 | resource "octopusdeploy_polling_subscription_id" "example" {}
17 |
18 | resource "octopusdeploy_polling_subscription_id" "example_with_dependencies" {
19 | dependencies = {
20 | "target" = octopusdeploy_kubernetes_agent_deployment_target.example.id
21 | }
22 | }
23 |
24 | # Usage
25 | resource "octopusdeploy_kubernetes_agent_deployment_target" "agent" {
26 | name = "agent"
27 | environments = ["environments-1"]
28 | roles = ["role-1", "role-2"]
29 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
30 | uri = octopusdeploy_polling_subscription_id.example_with_dependencies.polling_uri
31 | }
32 | ```
33 |
34 |
35 | ## Schema
36 |
37 | ### Optional
38 |
39 | - `dependencies` (Map of String) Optional map of dependencies that when modified will trigger a re-creation of this resource.
40 |
41 | ### Read-Only
42 |
43 | - `id` (String) The generated polling subscription ID.
44 | - `polling_uri` (String) The URI of the polling subscription ID.
45 |
46 |
47 |
--------------------------------------------------------------------------------
/docs/resources/project_group.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_project_group Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 |
7 | ---
8 |
9 | # octopusdeploy_project_group (Resource)
10 |
11 |
12 |
13 | ## Example Usage
14 |
15 | ```terraform
16 | resource "octopusdeploy_project_group" "example" {
17 | description = "The development project group."
18 | name = "Development Project Group (OK to Delete)"
19 | }
20 | ```
21 |
22 |
23 | ## Schema
24 |
25 | ### Required
26 |
27 | - `name` (String) The name of this resource.
28 |
29 | ### Optional
30 |
31 | - `description` (String) The description of this project group.
32 | - `space_id` (String) The space ID associated with this project group.
33 |
34 | ### Read-Only
35 |
36 | - `id` (String) The unique ID for this resource.
37 |
38 | ## Import
39 |
40 | Import is supported using the following syntax:
41 |
42 | ```shell
43 | terraform import [options] octopusdeploy_project_group.
44 | ```
45 |
--------------------------------------------------------------------------------
/docs/resources/scoped_user_role.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_scoped_user_role Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | This resource manages scoped user roles in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_scoped_user_role (Resource)
10 |
11 | This resource manages scoped user roles in Octopus Deploy.
12 |
13 | ~> **NOTE on Team User Roles and Scoped User Roles:** We currently
14 | provides both a standalone [Scoped User Role resource](scoped_user_role.html)
15 | and a Team resource with `user_roles` blocks defined in-line. At this time you
16 | cannot use a Team with in-line user_roles in conjunction with any Scoped User Role
17 | resources. Doing so will cause a conflict of user role settings and will overwrite
18 | user roles.
19 |
20 |
21 |
22 | ## Schema
23 |
24 | ### Required
25 |
26 | - `space_id` (String)
27 | - `team_id` (String)
28 | - `user_role_id` (String)
29 |
30 | ### Optional
31 |
32 | - `environment_ids` (Set of String)
33 | - `id` (String) The unique ID for this resource.
34 | - `project_group_ids` (Set of String)
35 | - `project_ids` (Set of String)
36 | - `tenant_ids` (Set of String)
37 |
--------------------------------------------------------------------------------
/docs/resources/service_account_oidc_identity.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_service_account_oidc_identity Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | This resource manages manages OIDC service account for the associated user
7 | ---
8 |
9 | # octopusdeploy_service_account_oidc_identity (Resource)
10 |
11 | This resource manages manages OIDC service account for the associated user
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `issuer` (String) OIDC issuer url
21 | - `name` (String) The name of this resource.
22 | - `service_account_id` (String) ID of the user to associate this identity to
23 | - `subject` (String) OIDC subject claims
24 |
25 | ### Read-Only
26 |
27 | - `id` (String) The unique ID for this resource.
28 |
29 |
30 |
--------------------------------------------------------------------------------
/docs/resources/static_worker_pool.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_static_worker_pool Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Worker Pools"
4 | description: |-
5 | This resource manages static worker pools in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_static_worker_pool (Resource)
9 |
10 | This resource manages static worker pools in Octopus Deploy.
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_static_worker_pool" "example" {
16 | description = "Description for the static worker pool."
17 | is_default = true
18 | name = "Test Static Worker Pool (OK to Delete)"
19 | sort_order = 5
20 | }
21 | ```
22 |
23 | ## Schema
24 |
25 | ### Required
26 |
27 | - `name` (String) The name of this resource.
28 |
29 | ### Optional
30 |
31 | - `description` (String) The description of this static worker pool.
32 | - `id` (String) The unique ID for this resource.
33 | - `is_default` (Boolean)
34 | - `sort_order` (Number) The order number to sort a dynamic worker pool.
35 | - `space_id` (String) The space ID associated with this resource.
36 |
37 | ### Read-Only
38 |
39 | - `can_add_workers` (Boolean)
40 |
41 |
42 |
--------------------------------------------------------------------------------
/docs/resources/tag.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tag Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | This resource manages tags in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_tag (Resource)
10 |
11 | This resource manages tags in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `color` (String) The color of the tag.
21 | - `name` (String) The name of the tag.
22 | - `tag_set_id` (String) The ID of the associated tag set.
23 |
24 | ### Optional
25 |
26 | - `description` (String) The description of the tag.
27 | - `sort_order` (Number) The sort order of the tag.
28 | - `tag_set_space_id` (String) The Space ID of the associated tag set. Required if the tag set is not in the same space as what is configured on the provider.
29 |
30 | ### Read-Only
31 |
32 | - `canonical_tag_name` (String) The canonical name of the tag.
33 | - `id` (String) The ID of this resource.
34 |
35 |
36 |
--------------------------------------------------------------------------------
/docs/resources/tenant.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_tenant Resource - terraform-provider-octopusdeploy"
3 | subcategory: ""
4 | description: |-
5 | This resource manages tenants in Octopus Deploy.
6 | ---
7 |
8 | # octopusdeploy_tenant (Resource)
9 |
10 | This resource manages tenants in Octopus Deploy.
11 |
12 |
13 | ## Schema
14 |
15 | ### Required
16 |
17 | - `name` (String) The name of this resource.
18 |
19 | ### Optional
20 |
21 | - `cloned_from_tenant_id` (String) The ID of the tenant from which this tenant was cloned.
22 | - `description` (String) The description of this tenant.
23 | - `is_disabled` (Boolean) The disabled status of this tenant.
24 | - `space_id` (String) The space ID associated with this tenant.
25 | - `tenant_tags` (Set of String) A list of tenant tags associated with this resource.
26 |
27 | ### Read-Only
28 |
29 | - `id` (String) The unique ID for this resource.
30 |
31 | ~> **NOTE property `project_environment` deprecated:** The `project_environment` property has been replaced by the `octopusdeploy_tenant_project` resource to allow more advanced provisioning scenarioes.
--------------------------------------------------------------------------------
/docs/resources/tenant_common_variable.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tenant_common_variable Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Manages a tenant common variable in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_tenant_common_variable (Resource)
10 |
11 | Manages a tenant common variable in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `library_variable_set_id` (String) The ID of the library variable set.
21 | - `template_id` (String) The ID of the variable template.
22 | - `tenant_id` (String) The ID of the tenant.
23 |
24 | ### Optional
25 |
26 | - `space_id` (String) The space ID associated with this Tenant Common Variable.
27 | - `value` (String, Sensitive) The value of the variable.
28 |
29 | ### Read-Only
30 |
31 | - `id` (String) The unique ID for this resource.
32 |
33 |
34 |
--------------------------------------------------------------------------------
/docs/resources/tenant_project.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tenant_project Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 |
7 | ---
8 |
9 | # octopusdeploy_tenant_project (Resource)
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `project_id` (String) The project ID associated with this tenant.
21 | - `tenant_id` (String) The tenant ID associated with this tenant.
22 |
23 | ### Optional
24 |
25 | - `environment_ids` (List of String) The environment IDs associated with this tenant.
26 | - `space_id` (String) The space ID associated with this project tenant.
27 |
28 | ### Read-Only
29 |
30 | - `id` (String) The unique ID for this resource.
31 |
32 |
33 |
--------------------------------------------------------------------------------
/docs/resources/tenant_project_variable.md:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "octopusdeploy_tenant_project_variable Resource - terraform-provider-octopusdeploy"
4 | subcategory: ""
5 | description: |-
6 | Manages a tenant project variable in Octopus Deploy.
7 | ---
8 |
9 | # octopusdeploy_tenant_project_variable (Resource)
10 |
11 | Manages a tenant project variable in Octopus Deploy.
12 |
13 |
14 |
15 |
16 | ## Schema
17 |
18 | ### Required
19 |
20 | - `environment_id` (String) The ID of the environment.
21 | - `project_id` (String) The ID of the project.
22 | - `template_id` (String) The ID of the variable template.
23 | - `tenant_id` (String) The ID of the tenant.
24 |
25 | ### Optional
26 |
27 | - `space_id` (String) The space ID associated with this Tenant Project Variable.
28 | - `value` (String, Sensitive) The value of the variable.
29 |
30 | ### Read-Only
31 |
32 | - `id` (String) The unique ID for this resource.
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/resources/token_account.md:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "octopusdeploy_token_account Resource - terraform-provider-octopusdeploy"
3 | subcategory: "Accounts"
4 | description: |-
5 |
6 | ---
7 |
8 | # octopusdeploy_token_account (Resource)
9 |
10 |
11 |
12 | ## Example Usage
13 |
14 | ```terraform
15 | resource "octopusdeploy_token_account" "example" {
16 | name = "Token Account (OK to Delete)"
17 | token = "[token]"
18 | }
19 | ```
20 |
21 | ## Schema
22 |
23 | ### Required
24 |
25 | - `name` (String) The name of this resource.
26 | - `token` (String, Sensitive) The token of this resource.
27 |
28 | ### Optional
29 |
30 | - `description` (String) The description of this token account.
31 | - `environments` (List of String) A list of environment IDs associated with this resource.
32 | - `id` (String) The unique ID for this resource.
33 | - `space_id` (String) The space ID associated with this resource.
34 | - `tenant_tags` (List of String) A list of tenant tags associated with this resource.
35 | - `tenanted_deployment_participation` (String) The tenanted deployment mode of the resource. Valid account types are `Untenanted`, `TenantedOrUntenanted`, or `Tenanted`.
36 | - `tenants` (List of String) A list of tenant IDs associated with this resource.
37 |
38 | ## Import
39 |
40 | Import is supported using the following syntax:
41 |
42 | ```shell
43 | terraform import [options] octopusdeploy_token_account.
44 | ```
45 |
--------------------------------------------------------------------------------
/examples/EnvBuild/terraform.tfvars:
--------------------------------------------------------------------------------
1 | serverURL = "https://mikelevanoctopus.octopus.app"
2 | apiKey = "octous_deploy_api_key"
3 | space = "Spaces-1"
4 | accessKey = "aws_access_key"
5 | secretKey = "aws_secret_key"
6 | channelName = "DevChannel"
7 | environmentName = "DevEnv"
8 | lifecycleName = "DevLifecycle"
9 | projectGroupName = "DevTest"
10 | projectName = "DevTest1"
11 | client_id = "azure_app_registration_client_id"
12 | tenant_id = "azure_app_registration_tenant_id"
13 | subscription_number = "azure_subscription_id"
14 | key = "azure_app_registration_access_key"
15 | varName = "testVar"
16 | awsAccountName = "DevAWS"
--------------------------------------------------------------------------------
/examples/EnvBuild/variables.tf:
--------------------------------------------------------------------------------
1 | variable "serverURL" {
2 | type = string
3 | }
4 |
5 | variable "apiKey" {
6 | type = string
7 | }
8 |
9 | variable "space" {
10 | type = string
11 | }
12 |
13 | variable "accessKey" {
14 | type = string
15 | }
16 |
17 | variable "secretKey" {
18 | type = string
19 | }
20 |
21 | variable "channelName" {
22 | type = string
23 | }
24 |
25 | variable "environmentName" {
26 | type = string
27 | }
28 |
29 | variable "lifecycleName" {
30 | type = string
31 | }
32 |
33 | variable "projectGroupName" {
34 | type = string
35 | }
36 |
37 | variable "projectName" {
38 | type = string
39 | }
40 |
41 | variable "client_id" {
42 | type = string
43 | }
44 |
45 | variable "tenant_id" {
46 | type = string
47 | }
48 |
49 | variable "subscription_number" {
50 | type = string
51 | }
52 |
53 | variable "key" {
54 | type = string
55 | }
56 |
57 | variable "varName" {
58 | type = string
59 | }
60 |
61 | variable "awsAccountName" {
62 | type = string
63 | }
--------------------------------------------------------------------------------
/examples/Feeds-Creation/.terraform/plugins/darwin_amd64/lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "octopusdeploy": "be5228cb0c348004179376584fd19717af9ffec1ad37c28e39c19567553dcc2c"
3 | }
--------------------------------------------------------------------------------
/examples/Feeds-Creation/main.tf:
--------------------------------------------------------------------------------
1 | provider "octopusdeploy" {
2 | address = var.serverURL
3 | apikey = var.apiKey
4 | space_id = var.space
5 | }
6 |
7 | # Feed username and password are only needed if authentication is required
8 |
9 | resource "octopusdeploy_feed" "newFeed" {
10 | name = var.feedName
11 | feed_type = "GitHub"
12 | feed_uri = var.feed_uri
13 | #username = github_username
14 | #password = github_password
15 | }
16 |
--------------------------------------------------------------------------------
/examples/Feeds-Creation/terraform.tfvars:
--------------------------------------------------------------------------------
1 | serverURL = "https://mikelevanoctopus.octopus.app"
2 | space = "Spaces-1"
3 | feedName= "GitHubFeed"
4 | feed_uri = "https://github.com/AdminTurnedDevOps/GoWebAPI"
--------------------------------------------------------------------------------
/examples/Feeds-Creation/variables.tf:
--------------------------------------------------------------------------------
1 | variable "apiKey" {
2 | type = string
3 | }
4 |
5 | variable "space" {
6 | type = string
7 | }
8 |
9 | variable "serverURL" {
10 | type = string
11 | }
12 |
13 | variable "feedName" {
14 | type = string
15 | }
16 |
17 | variable "feed_uri" {
18 | type = string
19 | }
20 |
--------------------------------------------------------------------------------
/examples/Library-VariableSet-Creation/.terraform/plugins/darwin_amd64/lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "octopusdeploy": "be5228cb0c348004179376584fd19717af9ffec1ad37c28e39c19567553dcc2c"
3 | }
--------------------------------------------------------------------------------
/examples/Library-VariableSet-Creation/main.tf:
--------------------------------------------------------------------------------
1 | provider "octopusdeploy" {
2 | address = var.serverURL
3 | api_key = var.apiKey
4 | space_id = var.space
5 | }
6 |
7 | resource "octopusdeploy_library_variable_set" "newaccount" {
8 | description = var.description
9 | name = var.variableSetName
10 | }
11 |
--------------------------------------------------------------------------------
/examples/Library-VariableSet-Creation/terraform.tfvars:
--------------------------------------------------------------------------------
1 | serverURL = "https://mikelevanoctopus.octopus.app"
2 | space = "Spaces-1"
3 | variableSetName = "testSet"
4 | description = "test description"
--------------------------------------------------------------------------------
/examples/Library-VariableSet-Creation/variables.tf:
--------------------------------------------------------------------------------
1 | variable "apiKey" {
2 | type = string
3 | }
4 |
5 | variable "space" {
6 | type = string
7 | }
8 |
9 | variable "serverURL" {
10 | type = string
11 | }
12 |
13 | variable "variableSetName" {
14 | type = string
15 | }
16 |
17 | variable "description" {
18 | type = string
19 | }
--------------------------------------------------------------------------------
/examples/Project-Group-Creation/.terraform/plugins/darwin_amd64/lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "octopusdeploy": "be5228cb0c348004179376584fd19717af9ffec1ad37c28e39c19567553dcc2c"
3 | }
--------------------------------------------------------------------------------
/examples/Project-Group-Creation/main.tf:
--------------------------------------------------------------------------------
1 | provider "octopusdeploy" {
2 | address = var.serverURL
3 | apikey = var.apiKey
4 | space_id = var.space
5 | }
6 |
7 | resource "octopusdeploy_project_group" "DevOpsProject" {
8 | description = "my test project group"
9 | name = "testProject"
10 | }
11 |
--------------------------------------------------------------------------------
/examples/Project-Group-Creation/terraform.tfvars:
--------------------------------------------------------------------------------
1 | serverURL = "https://mikelevanoctopus.octopus.app"
2 | space = "Spaces-1"
--------------------------------------------------------------------------------
/examples/Project-Group-Creation/variables.tf:
--------------------------------------------------------------------------------
1 | variable "apiKey" {
2 | type = string
3 | }
4 |
5 | variable "space" {
6 | type = string
7 | }
8 |
9 | variable "serverURL" {
10 | type = string
11 | }
--------------------------------------------------------------------------------
/examples/Variable-Creation/.terraform/plugins/darwin_amd64/lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "octopusdeploy": "be5228cb0c348004179376584fd19717af9ffec1ad37c28e39c19567553dcc2c"
3 | }
--------------------------------------------------------------------------------
/examples/Variable-Creation/main.tf:
--------------------------------------------------------------------------------
1 | provider "octopusdeploy" {
2 | address = var.serverURL
3 | apikey = var.apiKey
4 | space_id = var.space
5 | }
6 |
7 | resource "octopusdeploy_variable" "newVariable" {
8 | name = var.varName
9 | project_id = var.projectID
10 | type = "String"
11 | }
12 |
--------------------------------------------------------------------------------
/examples/Variable-Creation/terraform.tfvars:
--------------------------------------------------------------------------------
1 | serverURL = "https://mikelevanoctopus.octopus.app"
2 | space = "Spaces-1"
3 | projectID = "Projects-1"
4 | varName = "DevKey"
--------------------------------------------------------------------------------
/examples/Variable-Creation/variables.tf:
--------------------------------------------------------------------------------
1 | variable "apiKey" {
2 | type = string
3 | }
4 |
5 | variable "space" {
6 | type = string
7 | }
8 |
9 | variable "serverURL" {
10 | type = string
11 | }
12 |
13 | variable "projectID" {
14 | type = string
15 | }
16 |
17 | variable "varName" {
18 | type = string
19 | }
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_accounts/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_accounts" "example" {
2 | account_type = "UsernamePassword"
3 | ids = ["Accounts-123", "Accounts-321"]
4 | partial_name = "Defau"
5 | skip = 5
6 | take = 100
7 | }
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_azure_cloud_service_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_azure_cloud_service_deployment_targets" "example" {
2 | health_statuses = ["Healthy", "Unavailable"]
3 | ids = ["Machines-123", "Machines-321"]
4 | partial_name = "Defau"
5 | skip = 5
6 | take = 100
7 | }
8 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_azure_service_fabric_cluster_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_azure_service_fabric_cluster_deployment_targets" "example" {
2 | health_statuses = ["Healthy", "Unavailable"]
3 | ids = ["Machines-123", "Machines-321"]
4 | partial_name = "Defau"
5 | skip = 5
6 | take = 100
7 | }
8 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_azure_web_app_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_azure_web_app_deployment_targets" "example" {
2 | health_statuses = ["Healthy", "Unavailable"]
3 | ids = ["Machines-123", "Machines-321"]
4 | partial_name = "Defau"
5 | skip = 5
6 | take = 100
7 | }
8 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_certificates/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_certificates" "example" {
2 | archived = false
3 | ids = ["Certificates-123", "Certificates-321"]
4 | partial_name = "Defau"
5 | skip = 5
6 | take = 100
7 | }
8 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_channels/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_channels" "example" {
2 | ids = ["Channels-123", "Channels-321"]
3 | partial_name = "Defau"
4 | skip = 5
5 | take = 100
6 | }
7 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_cloud_region_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_cloud_region_deployment_targets" "example" {
2 | environments = ["Environments-123", "Environments-321"]
3 | ids = ["Machines-123"]
4 | name = "Azure North America"
5 | partial_name = "Azure Nor"
6 | skip = 5
7 | take = 100
8 | }
9 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_deployment_freezes/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_deployment_freezes" "test_freeze" {
2 | ids = null
3 | partial_name = "Freeze Name"
4 | skip = 5
5 | take = 100
6 | }
7 |
8 |
9 | data "octopusdeploy_deployment_freezes" "project_freezes" {
10 | project_ids = ["projects-1"]
11 | skip = 0
12 | take = 5
13 | }
14 |
15 | data "octopusdeploy_deployment_freezes" "tenant_freezes" {
16 | tenant_ids = ["tenants-1"]
17 | skip = 0
18 | take = 10
19 | }
20 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_environments/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_environments" "example" {
2 | ids = ["Environments-123", "Environments-321"]
3 | name = "Production"
4 | partial_name = "Produc"
5 | skip = 5
6 | take = 100
7 | }
8 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_feeds/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_feeds" "example" {
2 | feed_type = "NuGet"
3 | ids = ["Feeds-123", "Feeds-321"]
4 | partial_name = "Develop"
5 | skip = 5
6 | take = 100
7 | }
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_kubernetes_agent_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_kubernetes_agent_deployment_targets" "kubernetes_agent_deployment_targets" {
2 | deployment_id = "Deployments-123"
3 | environments = ["Environments-123", "Environments-321"]
4 | health_statuses = ["HasWarnings"]
5 | ids = ["Machines-123", "Machines-321"]
6 | is_disabled = false
7 | name = "Kubernetes Agent"
8 | partial_name = "Kubernetes Age"
9 | roles = ["Roles-123", "Roles-321"]
10 | shell_names = []
11 | skip = 5
12 | take = 100
13 | tenant_tags = ["TagSet1/Tag"]
14 | tenants = ["Tenants-123"]
15 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
16 | }
17 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_lifecycles/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_lifecycles" "example" {
2 | ids = ["Lifecycles-123", "Lifecycles-321"]
3 | partial_name = "Defau"
4 | skip = 5
5 | take = 100
6 | }
7 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_listening_tentacle_deployment_targets/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_listening_tentacle_deployment_targets" "listening_tentacle_deployment_targets" {
2 | # deployment_id = "Deployments-123"
3 | # environments = ["Environments-123", "Environments-321"]
4 | # health_statuses = ["HasWarnings"]
5 | # ids = ["Machines-123", "Machines-321"]
6 | # is_disabled = false
7 | # name = "Listening Tentacle (OK to Delete)"
8 | # partial_name = "Listening Tentac"
9 | # roles = ["Roles-123", "Roles-321"]
10 | # shell_names = []
11 | # skip = 5
12 | # take = 100
13 | # tenant_tags = []
14 | # tenants = []
15 | # thumbprint = ""
16 | }
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_project_groups/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_project_groups" "example" {
2 | ids = ["ProjectGroups-123", "ProjectGroups-321"]
3 | partial_name = "Defau"
4 | skip = 5
5 | take = 100
6 | }
7 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_projects/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_projects" "example" {
2 | cloned_from_project_id = "Projects-456"
3 | ids = ["Projects-123", "Projects-321"]
4 | is_clone = true
5 | name = "Default"
6 | partial_name = "Defau"
7 | skip = 5
8 | take = 100
9 | }
10 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_script_modules/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_script_modules" "example" {
2 | ids = ["LibraryVariableSets-123", "LibraryVariableSets-321"]
3 | partial_name = "Defau"
4 | skip = 5
5 | take = 100
6 | }
7 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_spaces/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_spaces" "spaces" {
2 | ids = ["Spaces-123", "Spaces-321"]
3 | partial_name = "Defau"
4 | skip = 5
5 | take = 100
6 | }
7 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_user_roles/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_user_roles" "example" {
2 | ids = ["UserRoles-123", "UserRoles-321"]
3 | partial_name = "Administra"
4 | skip = 5
5 | take = 100
6 | }
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_users/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_users" "example" {
2 | ids = ["Users-123", "Users-321"]
3 | skip = 5
4 | take = 100
5 | }
6 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_variables/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_variables" "example" {
2 | }
3 |
--------------------------------------------------------------------------------
/examples/data-sources/octopusdeploy_workers/data-source.tf:
--------------------------------------------------------------------------------
1 | data "octopusdeploy_workers" "example" {
2 | communication_styles = ["TentaclePassive"]
3 | health_statuses = ["Unavailable"]
4 | ids = ["Workers-123"]
5 | name = "Exact name"
6 | partial_name = "Test"
7 | skip = 5
8 | take = 100
9 | is_disabled = true
10 | }
--------------------------------------------------------------------------------
/examples/how-to-install-the-octopus-deploy-terraform-provider.md:
--------------------------------------------------------------------------------
1 | ## Installation
2 | Because the Octopus Deploy Terraform provider is not official and community based, it is considered a third-party provider. Since it's a third-party provider, it must be manually installed.
3 |
4 | ## Golang Installation
5 | To perform the needed task, you must install Golang. Depending on the operating system you're running, you can simply google **install golang*
6 |
7 | # Install the Terraform Provider
8 | The first command you will want to run is `go get` to pull down the executable
9 | 1. `go get github.com/OctopusDeploy/terraform-provider-octopusdeploy`
10 |
11 | Once the executable is pulled down, it'll automatically go into the `~/go` directory on Linux/MacOS or the `go` directory on the home folder in Windows. Three folders will be shown in the `go` directory:
12 |
13 | - bin
14 | - pkg
15 | - src
16 |
17 | Typically the executable is in the **bin* directory.
18 |
19 | 2. `cd` into `~/go/bin`
20 |
21 | 3. Switching gears for a moment - in the directory where you want the Terraform configuration files to exist to use the Octopus Deploy Terraform provider, create the directory `.terraform/plugins/OS plugin`. The OS Plugin will be different based on OS, so for example, MacOS would look like `.terraform/plugins/darwin_amd64`
22 |
23 | 4. Copy the `terraform-provider-octopusdeploy` into `.terraform/plugins/OS plugin`
24 |
25 | You should know be able to initialize the environment.
--------------------------------------------------------------------------------
/examples/provider/provider.tf:
--------------------------------------------------------------------------------
1 | provider "octopusdeploy" {
2 | address = "https://octopus.example.com"
3 | api_key = "API-XXXXXXXXXXXXX"
4 | space_id = "Spaces-321" # the ID of the space
5 | }
6 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_artifactory_generic_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_artifactory_generic_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_artifactory_generic_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_artifactory_generic_feed" "example" {
2 | feed_uri = "https://example.jfrog.io"
3 | password = "test-password"
4 | name = "Test Artifactory Generic Feed (OK to Delete)"
5 | username = "test-username"
6 | repository = "repo"
7 | layout_regex = "this is regex"
8 | }
9 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_aws_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_aws_account.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_aws_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_aws_account" "example" {
2 | access_key = "access-key"
3 | name = "AWS Account (OK to Delete)"
4 | secret_key = "###########" # required; get from secure environment/store
5 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_aws_elastic_container_registry/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_aws_elastic_container_registry.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_aws_elastic_container_registry/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_aws_elastic_container_registry" "example" {
2 | access_key = "access-key"
3 | name = "Test AWS Elastic Container Registry (OK to Delete)"
4 | region = "us-east-1"
5 | secret_key = "secret-key"
6 | }
7 |
8 | resource "octopusdeploy_aws_elastic_container_registry" "example_with_oidc" {
9 | name = "Test AWS Elastic Container Registry with OIDC (OK to Delete)"
10 | region = "us-east-1"
11 | oidc_authentication = {
12 | session_duration = 3600
13 | role_arn = "role_arn_value"
14 | subject_keys = [ "feed", "space" ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_cloud_service_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_cloud_service_deployment_target.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_cloud_service_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_cloud_service_deployment_target" "example" {
2 | account_id = "Accounts-123"
3 | cloud_service_name = "[cloud_service_name]"
4 | environments = ["Environments-123", "Environment-321"]
5 | name = "Azure Cloud Service Deployment Target (OK to Delete)"
6 | storage_account_name = "[storage_account_name]"
7 | roles = ["Development Team", "System Administrators"]
8 | tenanted_deployment_participation = "Untenanted"
9 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_container_registry/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_container_registry.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_container_registry/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_container_registry" "example" {
2 | name = "Test Azure Container Registry (OK to Delete)"
3 | feed_uri = "https://test-azure.azurecr.io"
4 | username = "username"
5 | password = "password"
6 | }
7 |
8 | resource "octopusdeploy_azure_container_register" "example_with_oidc" {
9 | name = "Test Azure Container Registry (OK to Delete)"
10 | feed_uri = "https://test-azure.azurecr.io"
11 | oidc_authentication {
12 | client_id = "client_id"
13 | tenant_id = "tenant_id"
14 | audience = "audience"
15 | subject_keys = ["feed", "space"]
16 | }
17 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_openid_connect/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_openid_connect.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_openid_connect/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_openid_connect" "example" {
2 | application_id = "00000000-0000-0000-0000-000000000000"
3 | name = "Azure OpenID Connect Account (OK to Delete)"
4 | subscription_id = "00000000-0000-0000-0000-000000000000"
5 | tenant_id = "00000000-0000-0000-0000-000000000000"
6 | execution_subject_keys = ["space", "project"]
7 | health_subject_keys = ["space", "target", "type"]
8 | account_test_subject_keys = ["space", "type"]
9 | audience = "api://AzureADTokenExchange"
10 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_service_fabric_cluster_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_service_fabric_cluster_deployment_target.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_service_fabric_cluster_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_service_fabric_cluster_deployment_target" "example" {
2 | connection_endpoint = "[connection-endpoint]"
3 | environments = ["Environments-123", "Environment-321"]
4 | name = "Azure Service Fabric Cluster Deployment Target (OK to Delete)"
5 | roles = ["Development Team", "System Administrators"]
6 | tenanted_deployment_participation = "Untenanted"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_service_principal/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_service_principal.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_service_principal/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_service_principal" "example" {
2 | application_id = "00000000-0000-0000-0000-000000000000"
3 | name = "Azure Service Principal Account (OK to Delete)"
4 | password = "###########" # required; get from secure environment/store
5 | subscription_id = "00000000-0000-0000-0000-000000000000"
6 | tenant_id = "00000000-0000-0000-0000-000000000000"
7 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_subscription_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_subscription_account.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_subscription_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_subscription_account" "example" {
2 | name = "Azure Subscription Account (OK to Delete)"
3 | subscription_id = "00000000-0000-0000-0000-000000000000"
4 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_web_app_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_azure_web_app_deployment_target.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_azure_web_app_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_azure_web_app_deployment_target" "example" {
2 | account_id = "Accounts-123"
3 | environments = ["Environments-123"]
4 | name = "Azure Web App Deployment Target (OK to Delete)"
5 | resource_group_name = "resource-group-name"
6 | roles = ["Development Team", "System Administrators"]
7 | tenanted_deployment_participation = "Untenanted"
8 | web_app_name = "web-app-name"
9 | }
10 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_certificate/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_certificate.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_certificate/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_certificate" "example" {
2 | certificate_data = "a-base-64-encoded-string-representing-the-certificate-data"
3 | name = "Development Certificate"
4 | password = "###########" # required; get from secure environment/store
5 | }
6 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_channel/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_channel.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_channel/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_channel" "example" {
2 | name = "Development Channel (OK to Delete)"
3 | project_id = "Projects-123"
4 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_cloud_region_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_cloud_region_deployment_target.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_cloud_region_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_cloud_region_deployment_target" "example" {
2 | default_worker_pool_id = "WorkerPools-123"
3 | environments = ["Environments-123", "Environment-321"]
4 | name = "Azure Web App Deployment Target (OK to Delete)"
5 | roles = ["Development Team", "System Administrators"]
6 | }
7 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_freeze/resource.tf:
--------------------------------------------------------------------------------
1 | # Basic freeze with no project scopes
2 | resource "octopusdeploy_deployment_freeze" "freeze" {
3 | name = "Xmas"
4 | start = "2024-12-25T00:00:00+10:00"
5 | end = "2024-12-27T00:00:00+08:00"
6 | }
7 |
8 | # Freeze with different timezones and single project/environment scope
9 | resource "octopusdeploy_deployment_freeze" "freeze" {
10 | name = "Xmas"
11 | start = "2024-12-25T00:00:00+10:00"
12 | end = "2024-12-27T00:00:00+08:00"
13 | }
14 |
15 | # Freeze recurring freeze yearly on Xmas
16 | resource "octopusdeploy_deployment_freeze" "freeze" {
17 | name = "Xmas"
18 | start = "2024-12-25T00:00:00+10:00"
19 | end = "2024-12-27T00:00:00+08:00"
20 | recurring_schedule = {
21 | type = "Annually"
22 | unit = 1
23 | end_type = "Never"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_freeze_project/resource.tf:
--------------------------------------------------------------------------------
1 | # Deployment freeze
2 | resource "octopusdeploy_deployment_freeze" "freeze" {
3 | name = "Xmas"
4 | start = "2024-12-25T00:00:00+10:00"
5 | end = "2024-12-27T00:00:00+08:00"
6 | }
7 |
8 |
9 | resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
10 | deploymentfreeze_id= octopusdeploy_deployment_freeze.freeze.id
11 | project_id = "Projects-123"
12 | environment_ids = [ "Environments-123", "Environments-456" ]
13 | }
14 |
15 | # Freeze with ids sourced from resources and data sources.
16 | # Projects can be sourced from different spaces, a single scope can only reference projects and environments from the same space.
17 | resource "octopusdeploy_deployment_freeze" "freeze" {
18 | name = "End of financial year shutdown"
19 | start = "2025-06-30T00:00:00+10:00"
20 | end = "2025-07-02T00:00:00+10:00"
21 | }
22 |
23 | resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
24 | deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
25 | project_id = resource.octopusdeploy_project.project1.id
26 | environment_ids = [resource.octopusdeploy_environment.production.id]
27 | }
28 |
29 | resource "octopusdeploy_deployment_freeze_project" "project_freeze" {
30 | deploymentfreeze_id = octopusdeploy_deployment_freeze.freeze.id
31 | project_id = data.octopusdeploy_projects.second_project.projects[0].id
32 | environment_ids = [ data.octopusdeploy_environments.default_environment.environments[0].id ]
33 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_freeze_tenant/resource.tf:
--------------------------------------------------------------------------------
1 | # Deployment freeze
2 | resource "octopusdeploy_deployment_freeze" "example" {
3 | name = "Summer break"
4 | start = "2024-06-25T00:00:00+10:00"
5 | end = "2024-06-27T00:00:00+08:00"
6 | }
7 |
8 | # Freeze with ids sourced from resources and data sources.
9 | # Tenants can be sourced from different spaces, a single scope can only reference resources from the same space.
10 |
11 | resource "octopusdeploy_deployment_freeze_tenant" "production_freeze" {
12 | deploymentfreeze_id = octopusdeploy_deployment_freeze.example.id
13 | tenant_id = resource.octopusdeploy_tenant.example.id
14 | project_id = resource.octopusdeploy_project.example.id
15 | environment_id = data.environments.production.id
16 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_process/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_deployment_process.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_deployment_target" "example" {
2 | }
3 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_docker_container_registry/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_docker_container_registry.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_docker_container_registry/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_docker_container_registry" "example" {
2 | feed_uri = "https://index.docker.io"
3 | name = "Test Docker Container Registry (OK to Delete)"
4 | password = "test-password"
5 | registry_path = "testing/test-image"
6 | username = "test-username"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_dynamic_worker_pool/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_dynamic_worker_pool" "example" {
2 | description = "Description for the dynamic worker pool."
3 | is_default = true
4 | name = "Test Dynamic Worker Pool (OK to Delete)"
5 | sort_order = 5
6 | worker_type = "UbuntuDefault"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_environment/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_environment.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_environment/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_environment" "example" {
2 | allow_dynamic_infrastructure = false
3 | description = "An environment for the development team."
4 | name = "Development Environment (OK to Delete)"
5 | use_guided_failure = false
6 |
7 | jira_extension_settings {
8 | environment_type = "unmapped"
9 | }
10 |
11 | jira_service_management_extension_settings {
12 | is_enabled = false
13 | }
14 |
15 | servicenow_extension_settings {
16 | is_enabled = false
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_external_feed_create_release_trigger/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_external_feed_create_release_trigger.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_external_feed_create_release_trigger/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_external_feed_create_release_trigger" "my_trigger" {
2 | name = "My feed trigger"
3 | space_id = "Spaces-1"
4 | project_id = "Projects-2"
5 | package {
6 | deployment_action = "My Helm step"
7 | package_reference = "nginx"
8 | }
9 | package {
10 | deployment_action = "My container step"
11 | package_reference = "busybox"
12 | }
13 | channel_id = "Channels-21"
14 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_feed" "example" {
2 | download_attempts = 10
3 | download_retry_backoff_seconds = 60
4 | feed_uri = "https://repo.maven.apache.org/maven2/"
5 | name = "Test Maven Feed (OK to Delete)"
6 | package_acquisition_location_options = ["Server", "ExecutionTarget"]
7 | password = "password123"
8 | space_id = "Spaces-123"
9 | username = "john.smith@example.com"
10 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_gcp_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_gcp_account.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_gcp_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_gcp_account" "example" {
2 | json_key = "json-key"
3 | name = "GCP Account (OK to Delete)"
4 | }
5 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_generic_oidc_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_generic_oidc_account.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_generic_oidc_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_generic_oidc_account" "example" {
2 | name = "Generic OpenID Connect Account (OK to Delete)"
3 | execution_subject_keys = ["space", "project"]
4 | audience = "api://default"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_git_trigger/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_git_trigger.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_git_trigger/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_git_trigger" "my_trigger" {
2 | name = "My Git trigger"
3 | space_id = "Spaces-1"
4 | description = "My Git trigger description"
5 | project_id = "Projects-1"
6 | channel_id = "Channels-1"
7 | sources {
8 | deployment_action_slug = "deploy-action-slug"
9 | git_dependency_name = ""
10 | include_file_paths = [
11 | "include/me",
12 | "include/this/too"
13 | ]
14 | exclude_file_paths = [
15 | "exclude/me",
16 | "exclude/this/too"
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_github_repository_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_github_repository_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_github_repository_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_github_repository_feed" "example" {
2 | download_attempts = 1
3 | download_retry_backoff_seconds = 30
4 | feed_uri = "https://api.github.com"
5 | password = "test-password"
6 | name = "Test GitHub Repository Feed (OK to Delete)"
7 | username = "test-username"
8 | }
9 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_google_container_registry/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_google_container_registry.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_google_container_registry/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_google_container_registry" "example" {
2 | name = "Test Google Container Registry (OK to Delete)"
3 | feed_uri = "https://google.docker.test"
4 | registry_path = "testing/test-image"
5 | password = "google authentication key file contents (json)"
6 | }
7 |
8 | resource "octopusdeploy_google_container_registry" "example_with_oidc" {
9 | name = "Test Google Container Registry (OK to Delete)"
10 | feed_uri = "https://google.docker.test"
11 | registry_path = "testing/test-image"
12 | oidc_authentication {
13 | audience = "audience"
14 | subject_keys = ["feed", "space"]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_helm_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_helm_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_helm_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_helm_feed" "example" {
2 | feed_uri = "https://charts.helm.sh/stable"
3 | password = "test-password"
4 | name = "Test Helm Feed (OK to Delete)"
5 | username = "test-username"
6 | }
7 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_agent_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_kubernetes_agent_deployment_target.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_agent_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_kubernetes_agent_deployment_target" "minimal" {
2 | name = "agent-minimal"
3 | environments = ["environments-1"]
4 | roles = ["role-1", "role-2"]
5 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
6 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
7 | }
8 |
9 | resource "octopusdeploy_kubernetes_agent_deployment_target" "optionals" {
10 | name = "agent-optionals"
11 | environments = ["environments-1"]
12 | roles = ["role-1", "role-2"]
13 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
14 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
15 | machine_policy_id = "machinepolicies-1"
16 | default_namespace = "kubernetes-namespace"
17 | upgrade_locked = true
18 | is_disabled = true
19 | }
20 |
21 | resource "octopusdeploy_kubernetes_agent_deployment_target" "tenanted_agent" {
22 | name = "agent-tenanted"
23 | environments = ["environments-1"]
24 | roles = ["role-1", "role-2"]
25 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
26 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
27 | tenanted_deployment_participation = "Tenanted"
28 | tenants = ["tenants-1"]
29 | tenant_tags = ["TagSets-1/Tags-1"]
30 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_agent_worker/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_kubernetes_agent_worker.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_agent_worker/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_kubernetes_agent_worker" "minimal" {
2 | name = "agent-minimal"
3 | worker_pools = ["worker-pools-1"]
4 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
5 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
6 | }
7 |
8 | resource "octopusdeploy_kubernetes_agent_worker" "optionals" {
9 | name = "agent-optionals"
10 | worker_pools = ["worker-pools-1", "worker-pools-3"]
11 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
12 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
13 | machine_policy_id = "machinepolicies-1"
14 | upgrade_locked = true
15 | is_disabled = true
16 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_cluster_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_kubernetes_cluster_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_kubernetes_cluster_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_kubernetes_cluster_deployment_target" "k8s-target" {
2 | cluster_url = "https://example.com:1234/"
3 | environments = ["Environments-123", "Environment-321"]
4 | name = "Kubernetes Cluster Deployment Target (OK to Delete)"
5 | roles = ["Development Team", "System Administrators"]
6 | tenanted_deployment_participation = "Untenanted"
7 |
8 | aws_account_authentication {
9 | account_id = "Accounts-123"
10 | cluster_name = "cluster-name"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_lifecycle/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_lifecycle.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_lifecycle/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_lifecycle" "example" {
2 | description = "This is the default lifecycle."
3 | name = "Test Lifecycle (OK to Delete)"
4 |
5 | release_retention_policy {
6 | quantity_to_keep = 0
7 | should_keep_forever = true // true only if quantity_to_keep = 0
8 | unit = "Days"
9 | }
10 |
11 | tentacle_retention_policy {
12 | quantity_to_keep = 30
13 | should_keep_forever = false
14 | unit = "Items"
15 | }
16 |
17 | phase {
18 | automatic_deployment_targets = ["Environments-321"]
19 | name = "foo"
20 |
21 | release_retention_policy {
22 | quantity_to_keep = 1
23 | should_keep_forever = false
24 | unit = "Days"
25 | }
26 |
27 | tentacle_retention_policy {
28 | quantity_to_keep = 30
29 | should_keep_forever = false
30 | unit = "Items"
31 | }
32 | }
33 |
34 | phase {
35 | is_optional_phase = true
36 | name = "bar"
37 | optional_deployment_targets = ["Environments-321"]
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_listening_tentacle_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_listening_tentacle_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_listening_tentacle_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_listening_tentacle_deployment_target" "example" {
2 | environments = ["Environments-123", "Environment-321"]
3 | is_disabled = true
4 | machine_policy_id = "MachinePolicies-123"
5 | name = "Listening Tentacle Deployment Target (OK to Delete)"
6 | roles = ["Development Team", "System Administrators"]
7 | tenanted_deployment_participation = "Untenanted"
8 | tentacle_url = "https://example.com:1234/"
9 | thumbprint = ""
10 | }
11 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_listening_tentacle_worker/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_listening_tentacle_worker.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_listening_tentacle_worker/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_listening_tentacle_worker" "minimum" {
2 | name = "listening_worker"
3 | machine_policy_id = "machine-policy-1"
4 | worker_pools = ["worker-pools-1", "worker-pools-2"]
5 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
6 | uri = "https://tentacle.listening/"
7 | }
8 |
9 | resource "octopusdeploy_listening_tentacle_worker" "optionals" {
10 | name = "optional_worker"
11 | machine_policy_id = "machine-policy-1"
12 | worker_pools = ["worker-pools-1"]
13 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
14 | uri = "https://tentacle.listening/"
15 | proxy_id = "proxys-1"
16 | is_disabled = true
17 | }
18 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_maven_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_maven_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_maven_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_maven_feed" "example" {
2 | download_attempts = 10
3 | download_retry_backoff_seconds = 20
4 | feed_uri = "https://repo.maven.apache.org/maven2/"
5 | password = "test-password"
6 | name = "Test Maven Feed (OK to Delete)"
7 | username = "test-username"
8 | }
9 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_nuget_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_nuget_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_nuget_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_nuget_feed" "example" {
2 | download_attempts = 1
3 | download_retry_backoff_seconds = 30
4 | feed_uri = "https://api.nuget.org/v3/index.json"
5 | is_enhanced_mode = true
6 | password = "test-password"
7 | name = "Test NuGet Feed (OK to Delete)"
8 | username = "test-username"
9 | }
10 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_oci_registry_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_oci_registry_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_oci_registry_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_oci_registry_feed" "example" {
2 | feed_uri = "oci://test-registry.docker.io"
3 | password = "test-password"
4 | name = "Test oci Registry Feed (OK to Delete)"
5 | username = "test-username"
6 | }
7 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_offline_package_drop_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_listening_tentacle_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_offline_package_drop_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_offline_package_drop_deployment_target" "example" {
2 | environments = ["Environments-123", "Environment-321"]
3 | is_disabled = true
4 | machine_policy_id = "MachinePolicies-123"
5 | name = "Offline Package Drop Deployment Target (OK to Delete)"
6 | roles = ["Development Team", "System Administrators"]
7 | tenanted_deployment_participation = "Untenanted"
8 | thumbprint = ""
9 | working_directory = ""
10 | applications_directory = ""
11 | }
12 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_polling_subscription_id/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_polling_subscription_id" "example" {}
2 |
3 | resource "octopusdeploy_polling_subscription_id" "example_with_dependencies" {
4 | dependencies = {
5 | "target" = octopusdeploy_kubernetes_agent_deployment_target.example.id
6 | }
7 | }
8 |
9 | # Usage
10 | resource "octopusdeploy_kubernetes_agent_deployment_target" "agent" {
11 | name = "agent"
12 | environments = ["environments-1"]
13 | roles = ["role-1", "role-2"]
14 | thumbprint = "96203ED84246201C26A2F4360D7CBC36AC1D232D"
15 | uri = octopusdeploy_polling_subscription_id.example_with_dependencies.polling_uri
16 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_polling_tentacle_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_listening_tentacle_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_polling_tentacle_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_polling_tentacle_deployment_target" "example" {
2 | environments = ["Environments-123", "Environment-321"]
3 | is_disabled = true
4 | machine_policy_id = "MachinePolicies-123"
5 | name = "Polling Tentacle Deployment Target (OK to Delete)"
6 | roles = ["Development Team", "System Administrators"]
7 | tenanted_deployment_participation = "Untenanted"
8 | tentacle_url = "https://example.com:1234/"
9 | thumbprint = ""
10 | }
11 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_project.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project_deployment_target_trigger/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_project_deployment_target_trigger.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project_deployment_target_trigger/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_project_deployment_target_trigger" "example" {
2 | name = "[deployment_target_trigger_name]"
3 | project_id = "Projects-123"
4 | event_categories = ["MachineUnhealthy"]
5 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project_group/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_project_group.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project_group/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_project_group" "example" {
2 | description = "The development project group."
3 | name = "Development Project Group (OK to Delete)"
4 | }
5 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_project_scheduled_trigger/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_project_scheduled_trigger.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_s3_feed/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_s3_feed.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_s3_feed/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_s3_feed" "example" {
2 | name = "AWS S3 Bucket (Ok Delete)"
3 | use_machine_credentials = false
4 | access_key = "given_access_key"
5 | secret_key = "some_secret_key"
6 | }
7 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_script_module/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_script_module.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_script_module/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_script_module" "example" {
2 | description = "A script module to use."
3 | name = "Hello Octopus Script Module"
4 |
5 | script {
6 | body = "function Say-Hello()\r\n{\r\n Write-Output \"Hello, Octopus!\"\r\n}\r\n"
7 | syntax = "PowerShell"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_space/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_space.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_space/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_space" "example" {
2 | description = "A space for the development team."
3 | name = "Dev Team Space"
4 | is_default = false
5 | is_task_queue_stopped = false
6 | space_managers_team_members = ["Users-123", "Users-321"]
7 | space_managers_teams = ["teams-everyone"]
8 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_connection_deployment_target/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_ssh_connection_deployment_target.
2 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_connection_deployment_target/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_ssh_connection_deployment_target" "example" {
2 | name = "SSH Connection Deployment Target (OK to Delete)"
3 | fingerprint = ""
4 | host = ""
5 | port = 22
6 | environments = ["Environments-123", "Environment-321"]
7 | account_id = "Accounts-1"
8 | roles = ["Development Team", "System Administrators"]
9 | }
10 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_connection_worker/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_ssh_connection_worker.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_connection_worker/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_ssh_connection_worker" "minimum" {
2 | name = "ssh_worker"
3 | machine_policy_id = "machine-policy-1"
4 | worker_pools = ["worker-pools-1"]
5 | account_id = "account-42"
6 | host = "hostname"
7 | port = 22
8 | fingerprint = "SHA256: 12345abc"
9 | dotnet_platform = "linux-x64"
10 | }
11 |
12 | resource "octopusdeploy_ssh_connection_worker" "optionals" {
13 | name = "optional_ssh_worker"
14 | machine_policy_id = "machine-policy-1"
15 | worker_pools = ["worker-pools-1", "worker-pools-2"]
16 | account_id = "account-42"
17 | host = "hostname"
18 | port = 22
19 | fingerprint = "SHA256: 12345abc"
20 | dotnet_platform = "linux-x64"
21 | proxy_id = "proxy-31"
22 | is_disabled = true
23 | }
24 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_key_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_ssh_key_account.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_ssh_key_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_ssh_key_account" "example" {
2 | name = "SSH Key Pair Account (OK to Delete)"
3 | private_key_file = "[private_key_file]"
4 | username = "[username]"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_static_worker_pool/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_static_worker_pool" "example" {
2 | description = "Description for the static worker pool."
3 | is_default = true
4 | name = "Test Static Worker Pool (OK to Delete)"
5 | sort_order = 5
6 | }
7 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_tag_set/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_tag_set.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_tag_set/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_tag_set" "example" {
2 | description = "Provides tenants with access to certain early access programs."
3 | name = "Early Access Program (EAP)"
4 | }
5 |
6 | # tags are distinct resources and associated with tag sets through tag_set_id
7 |
8 | resource "octopusdeploy_tag" "alpha" {
9 | color = "#00FF00"
10 | name = "Alpha"
11 | tag_set_id = octopusdeploy_tag_set.example.id
12 | }
13 |
14 | resource "octopusdeploy_tag" "beta" {
15 | color = "#FF0000"
16 | name = "Beta"
17 | tag_set_id = octopusdeploy_tag_set.example.id
18 | }
19 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_tentacle_certificate/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_tentacle_certificate" "example" {}
2 |
3 | resource "octopusdeploy_tentacle_certificate" "example_with_dependencies" {
4 | dependencies = {
5 | "target" = octopusdeploy_kubernetes_agent_deployment_target.agent.id
6 | }
7 | }
8 |
9 | # Usage
10 | resource "octopusdeploy_kubernetes_agent_deployment_target" "agent" {
11 | name = "agent"
12 | environments = ["environments-1"]
13 | roles = ["role-1", "role-2"]
14 | thumbprint = octopusdeploy_tentacle_certificate.example_with_dependencies.thumbprint
15 | uri = "poll://kcxzcv2fpsxkn6tk9u6d/"
16 | }
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_token_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_token_account.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_token_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_token_account" "example" {
2 | name = "Token Account (OK to Delete)"
3 | token = "[token]"
4 | }
5 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_user/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_user.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_user/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_user" "example" {
2 | display_name = "Bob Smith"
3 | email_address = "bob.smith@example.com"
4 | is_active = true
5 | is_service = false
6 | password = "###########" # get from secure environment/store
7 | username = "[username]"
8 |
9 | identity {
10 | provider = "Octopus ID"
11 | claim {
12 | name = "email"
13 | is_identifying_claim = true
14 | value = "bob.smith@example.com"
15 | }
16 | claim {
17 | name = "dn"
18 | is_identifying_claim = false
19 | value = "Bob Smith"
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_user_role/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_user_role.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_user_role/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_user_role" "example" {
2 | can_be_deleted = true
3 | description = "Responsible for all development-related operations."
4 | granted_space_permissions = ["DeploymentCreate", "DeploymentDelete", "DeploymentView"]
5 | granted_system_permissions = ["SpaceCreate"]
6 | name = "Developer Managers"
7 | space_permission_descriptions = [
8 | "Delete deployments (restrictable to Environments, Projects, Tenants)",
9 | "Deploy releases to target environments (restrictable to Environments, Projects, Tenants)",
10 | "View deployments (restrictable to Environments, Projects, Tenants)"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_username_password_account/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_username_password_account.
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_username_password_account/resource.tf:
--------------------------------------------------------------------------------
1 | resource "octopusdeploy_username_password_account" "example" {
2 | name = "Username-Password Account (OK to Delete)"
3 | password = "###########" # get from secure environment/store
4 | username = "[username]"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/resources/octopusdeploy_variable/import.sh:
--------------------------------------------------------------------------------
1 | terraform import [options] octopusdeploy_variable.
--------------------------------------------------------------------------------
/examples/terraform.tfvars:
--------------------------------------------------------------------------------
1 | client_id = "azure_client_id"
2 | tenant_id = "azure_"
3 | subscription_number = "auzre_subscription_id"
4 | key = "password"
5 | serverURL = "octopus_server_url"
6 | space = "Default"
7 | channelName = "DevOpsChannel5"
8 | name = "AzureTrigger"
9 | environmentName = "DevOpsEnv"
10 | feedName= "GitHubFeed"
11 | feed_uri = "https://github.com/AdminTurnedDevOps/GoWebAPI"
12 | variableSetName = "testSet"
13 | description = "test description"
14 | lifecycleName = "devlife"
15 | projectID = "Projects-1"
16 | varName = "DevKey"
17 | accessKey = "aws_access_key"
18 | secretKey = "aws_secret_key"
19 | apiKey = "octopus_deploy_api_key"
--------------------------------------------------------------------------------
/github-app-jwt.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # From https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app#example-using-python-to-generate-a-jwt
4 |
5 | import jwt
6 | import time
7 | import os
8 |
9 | # Get the App ID
10 | app_id = os.environ['GH_APP_ID']
11 |
12 | # Open PEM
13 | signing_key = jwt.jwk_from_pem(os.environ['GH_APP_PRIVATE_KEY'].encode('utf-8'))
14 |
15 | payload = {
16 | # Issued at time
17 | 'iat': int(time.time()),
18 | # JWT expiration time (10 minutes maximum)
19 | 'exp': int(time.time()) + 600,
20 | # GitHub App's identifier
21 | 'iss': app_id
22 | }
23 |
24 | # Create JWT
25 | jwt_instance = jwt.JWT()
26 | encoded_jwt = jwt_instance.encode(payload, signing_key, alg='RS256')
27 |
28 | print('jwt=' + encoded_jwt)
29 |
--------------------------------------------------------------------------------
/internal/mutex.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import "sync"
4 |
5 | var Mutex = &sync.Mutex{}
6 |
--------------------------------------------------------------------------------
/internal/project_settings.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/newclient"
5 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/projects"
6 | )
7 |
8 | // CheckRunbookInGit the Projects persistence settings to see if the runbook are stored in git
9 | // spaceId is not required(can be empty string)
10 | func CheckRunbookInGit(client newclient.Client, spaceID string, projectID string) (bool, error) {
11 | // We need both to be able to check the git runbook setting
12 | // If project ID is not set, assume the runbook is not in git to maintain backwards compatibility
13 | if projectID == "" {
14 | return false, nil
15 | }
16 |
17 | project, err := projects.GetByID(client, spaceID, projectID)
18 |
19 | if err != nil {
20 | return false, err
21 | }
22 |
23 | if project.PersistenceSettings != nil && project.PersistenceSettings.Type() == projects.PersistenceSettingsTypeVersionControlled && project.PersistenceSettings.(projects.GitPersistenceSettings).RunbooksAreInGit() {
24 | return true, nil
25 | }
26 |
27 | return false, nil
28 | }
29 |
--------------------------------------------------------------------------------
/internal/random.go:
--------------------------------------------------------------------------------
1 | package internal
2 |
3 | import (
4 | "crypto/rand"
5 | "log"
6 | "math/big"
7 | )
8 |
9 | const (
10 | letterBytes = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789"
11 | letterIdxBits = 6
12 | letterIdxMask = 1< 0 {
34 | configuration += fmt.Sprintf(`description = "%s"`, options.Resource.Description)
35 | configuration += "\n"
36 | }
37 |
38 | configuration += "}"
39 | return configuration
40 | }
41 |
--------------------------------------------------------------------------------
/internal/test/listening_tentacle_deployment_target_test_options.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
7 | )
8 |
9 | type ListeningTentacleDeploymentTargetTestOptions struct {
10 | TestOptions[machines.ListeningTentacleDeploymentTarget]
11 | }
12 |
13 | func NewListeningTentacleDeploymentTargetTestOptions() *ListeningTentacleDeploymentTargetTestOptions {
14 | return &ListeningTentacleDeploymentTargetTestOptions{
15 | TestOptions: *NewTestOptions[machines.ListeningTentacleDeploymentTarget]("listening_tentacle_deployment_target"),
16 | }
17 | }
18 |
19 | func ListeningTentacleDeploymentTargetConfiguration(options *ListeningTentacleDeploymentTargetTestOptions) string {
20 | configuration := fmt.Sprintf(`resource "%s" "%s" {`, options.ResourceName, options.LocalName)
21 |
22 | if options.Resource != nil && len(options.Resource.Name) > 0 {
23 | configuration += fmt.Sprintf(`name = "%s"`, options.Resource.Name)
24 | }
25 |
26 | configuration += "}"
27 | return configuration
28 | }
29 |
--------------------------------------------------------------------------------
/internal/test/project_group_test_options.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/projectgroups"
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8 | )
9 |
10 | type ProjectGroupTestOptions struct {
11 | TestOptions[projectgroups.ProjectGroup]
12 | }
13 |
14 | func NewProjectGroupTestOptions() *ProjectGroupTestOptions {
15 | name := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
16 | description := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
17 |
18 | options := &ProjectGroupTestOptions{
19 | TestOptions: *NewTestOptions[projectgroups.ProjectGroup]("project_group"),
20 | }
21 | options.Resource = projectgroups.NewProjectGroup(name)
22 | options.Resource.Description = description
23 |
24 | return options
25 | }
26 |
27 | func ProjectGroupConfiguration(options *ProjectGroupTestOptions) string {
28 | configuration := fmt.Sprintf(`resource "%s" "%s" {`, options.ResourceName, options.LocalName)
29 | configuration += "\n"
30 |
31 | if len(options.Resource.Description) > 0 {
32 | configuration += fmt.Sprintf(`description = "%s"`, options.Resource.Description)
33 | configuration += "\n"
34 | }
35 |
36 | configuration += fmt.Sprintf(`name = "%s"`, options.Resource.Name)
37 | configuration += "\n"
38 |
39 | configuration += "}"
40 | return configuration
41 | }
42 |
--------------------------------------------------------------------------------
/internal/test/space_test_options.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/spaces"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
6 | )
7 |
8 | type SpaceTestOptions struct {
9 | Description string
10 | TestOptions[spaces.Space]
11 | }
12 |
13 | func NewSpaceTestOptions() *SpaceTestOptions {
14 | return &SpaceTestOptions{
15 | Description: acctest.RandStringFromCharSet(20, acctest.CharSetAlpha),
16 | TestOptions: *NewTestOptions[spaces.Space]("space"),
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/internal/test/test_options.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
4 |
5 | type TestOptions[T any] struct {
6 | Resource *T
7 | LocalName string
8 | QualifiedName string
9 | ResourceName string
10 | }
11 |
12 | func NewTestOptions[T any](resource string) *TestOptions[T] {
13 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
14 | resourceName := "octopusdeploy_" + resource
15 | qualifiedName := resourceName + "." + localName
16 |
17 | return &TestOptions[T]{
18 | LocalName: localName,
19 | QualifiedName: qualifiedName,
20 | ResourceName: resourceName,
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/internal/test/util.go:
--------------------------------------------------------------------------------
1 | package test
2 |
3 | import (
4 | "os"
5 | "testing"
6 | )
7 |
8 | func SkipCI(t *testing.T, reason string) {
9 | if os.Getenv("Skip_Legacy_Tests") == "" {
10 | t.Skip(reason)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/octopusdeploy/account_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8 | )
9 |
10 | func testAccountExists(prefix string) resource.TestCheckFunc {
11 | return func(s *terraform.State) error {
12 | accountID := s.RootModule().Resources[prefix].Primary.ID
13 | if _, err := octoClient.Accounts.GetByID(accountID); err != nil {
14 | return err
15 | }
16 |
17 | return nil
18 | }
19 | }
20 |
21 | func testAccountCheckDestroy(s *terraform.State) error {
22 | for _, rs := range s.RootModule().Resources {
23 | if rs.Type != "octopusdeploy_account" {
24 | continue
25 | }
26 |
27 | account, err := octoClient.Accounts.GetByID(rs.Primary.ID)
28 | if err == nil && account != nil {
29 | return fmt.Errorf("account (%s) still exists", rs.Primary.ID)
30 | }
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_accounts_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 |
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
10 | )
11 |
12 | func TestAccDataSourceAccounts(t *testing.T) {
13 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
14 | name := fmt.Sprintf("data.octopusdeploy_accounts.%s", localName)
15 | take := 10
16 |
17 | resource.Test(t, resource.TestCase{
18 | PreCheck: func() { testAccPreCheck(t) },
19 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
20 | Steps: []resource.TestStep{
21 | {
22 | Config: testAccDataSourceAccountsConfig(localName, take),
23 | Check: resource.ComposeTestCheckFunc(
24 | testAccCheckAccountsDataSourceID(name),
25 | )},
26 | },
27 | })
28 | }
29 |
30 | func testAccCheckAccountsDataSourceID(n string) resource.TestCheckFunc {
31 | return func(s *terraform.State) error {
32 | all := s.RootModule().Resources
33 | rs, ok := all[n]
34 | if !ok {
35 | return fmt.Errorf("cannot find Accounts data source: %s", n)
36 | }
37 |
38 | if rs.Primary.ID == "" {
39 | return fmt.Errorf("snapshot Accounts source ID not set")
40 | }
41 | return nil
42 | }
43 | }
44 |
45 | func testAccDataSourceAccountsConfig(localName string, take int) string {
46 | return fmt.Sprintf(`data "octopusdeploy_accounts" "%s" {
47 | take = %v
48 | }`, localName, take)
49 | }
50 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_channels_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 |
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
10 | )
11 |
12 | func TestAccDataSourceChannels(t *testing.T) {
13 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
14 | name := fmt.Sprintf("data.octopusdeploy_channels.%s", localName)
15 | take := 10
16 |
17 | resource.Test(t, resource.TestCase{
18 | PreCheck: func() { testAccPreCheck(t) },
19 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
20 | Steps: []resource.TestStep{
21 | {
22 | Config: testAccDataSourceChannelsConfig(localName, take),
23 | Check: resource.ComposeTestCheckFunc(
24 | testAccCheckChannelsDataSourceID(name),
25 | )},
26 | },
27 | })
28 | }
29 |
30 | func testAccCheckChannelsDataSourceID(n string) resource.TestCheckFunc {
31 | return func(s *terraform.State) error {
32 | all := s.RootModule().Resources
33 | rs, ok := all[n]
34 | if !ok {
35 | return fmt.Errorf("cannot find Channels data source: %s", n)
36 | }
37 |
38 | if rs.Primary.ID == "" {
39 | return fmt.Errorf("snapshot Channels source ID not set")
40 | }
41 | return nil
42 | }
43 | }
44 |
45 | func testAccDataSourceChannelsConfig(localName string, take int) string {
46 | return fmt.Sprintf(`data "octopusdeploy_channels" "%s" {
47 | take = %v
48 | }`, localName, take)
49 | }
50 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_machine_policies.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "context"
5 | "time"
6 |
7 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client"
8 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machinepolicies"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
10 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
11 | )
12 |
13 | func dataSourceMachinePolicies() *schema.Resource {
14 | return &schema.Resource{
15 | Description: "Provides information about existing machine policies.",
16 | ReadContext: dataSourceMachinePoliciesRead,
17 | Schema: getMachinePolicyDataSchema(),
18 | }
19 | }
20 |
21 | func dataSourceMachinePoliciesRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
22 | query := machinepolicies.MachinePoliciesQuery{
23 | IDs: expandArray(d.Get("ids").([]interface{})),
24 | PartialName: d.Get("partial_name").(string),
25 | Skip: d.Get("skip").(int),
26 | Take: d.Get("take").(int),
27 | }
28 |
29 | spaceID := d.Get("space_id").(string)
30 | client := m.(*client.Client)
31 | existingMachinePolicies, err := machinepolicies.Get(client, spaceID, query)
32 | if err != nil {
33 | return diag.FromErr(err)
34 | }
35 |
36 | flattenedMachinePolicies := []interface{}{}
37 | for _, machinePolicy := range existingMachinePolicies.Items {
38 | flattenedMachinePolicies = append(flattenedMachinePolicies, flattenMachinePolicy(machinePolicy))
39 | }
40 |
41 | d.Set("machine_policies", flattenedMachinePolicies)
42 | d.SetId("Machine Policies " + time.Now().UTC().String())
43 |
44 | return nil
45 | }
46 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_projects_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 |
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
10 | )
11 |
12 | func TestAccDataSourceProjects(t *testing.T) {
13 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
14 | name := fmt.Sprintf("data.octopusdeploy_projects.%s", localName)
15 | take := 10
16 |
17 | resource.Test(t, resource.TestCase{
18 | PreCheck: func() { testAccPreCheck(t) },
19 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
20 | Steps: []resource.TestStep{
21 | {
22 | Config: testAccDataSourceProjectsConfig(localName, take),
23 | Check: resource.ComposeTestCheckFunc(
24 | testAccCheckProjectsDataSourceID(name),
25 | )},
26 | },
27 | })
28 | }
29 |
30 | func testAccCheckProjectsDataSourceID(n string) resource.TestCheckFunc {
31 | return func(s *terraform.State) error {
32 | all := s.RootModule().Resources
33 | rs, ok := all[n]
34 | if !ok {
35 | return fmt.Errorf("cannot find Projects data source: %s", n)
36 | }
37 |
38 | if rs.Primary.ID == "" {
39 | return fmt.Errorf("snapshot Projects source ID not set")
40 | }
41 | return nil
42 | }
43 | }
44 |
45 | func testAccDataSourceProjectsConfig(localName string, take int) string {
46 | return fmt.Sprintf(`data "octopusdeploy_projects" "%s" {
47 | take = %v
48 | }`, localName, take)
49 | }
50 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_spaces_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 |
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
8 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
10 | )
11 |
12 | func TestAccDataSourceSpaces(t *testing.T) {
13 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
14 | name := fmt.Sprintf("data.octopusdeploy_spaces.%s", localName)
15 | take := 10
16 |
17 | resource.Test(t, resource.TestCase{
18 | PreCheck: func() { testAccPreCheck(t) },
19 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
20 | Steps: []resource.TestStep{
21 | {
22 | Config: testAccDataSourceSpacesConfig(localName, take),
23 | Check: resource.ComposeTestCheckFunc(
24 | testAccCheckSpacesDataSourceID(name),
25 | )},
26 | },
27 | })
28 | }
29 |
30 | func testAccCheckSpacesDataSourceID(n string) resource.TestCheckFunc {
31 | return func(s *terraform.State) error {
32 | all := s.RootModule().Resources
33 | rs, ok := all[n]
34 | if !ok {
35 | return fmt.Errorf("cannot find Spaces data source: %s", n)
36 | }
37 |
38 | if rs.Primary.ID == "" {
39 | return fmt.Errorf("snapshot Spaces source ID not set")
40 | }
41 | return nil
42 | }
43 | }
44 |
45 | func testAccDataSourceSpacesConfig(localName string, take int) string {
46 | return fmt.Sprintf(`data "octopusdeploy_spaces" "%s" {
47 | take = %v
48 | }`, localName, take)
49 | }
50 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_teams.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "context"
5 | "time"
6 |
7 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client"
8 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/teams"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
10 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
11 | )
12 |
13 | func dataSourceTeams() *schema.Resource {
14 | return &schema.Resource{
15 | Description: "Provides information about existing users.",
16 | ReadContext: dataSourceTeamsRead,
17 | Schema: getTeamDataSchema(),
18 | }
19 | }
20 |
21 | func dataSourceTeamsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
22 | query := teams.TeamsQuery{
23 | IDs: expandArray(d.Get("ids").([]interface{})),
24 | IncludeSystem: d.Get("include_system").(bool),
25 | PartialName: d.Get("partial_name").(string),
26 | Spaces: expandArray(d.Get("spaces").([]interface{})),
27 | Skip: d.Get("skip").(int),
28 | Take: d.Get("take").(int),
29 | }
30 |
31 | client := meta.(*client.Client)
32 | existingTeams, err := client.Teams.Get(query)
33 | if err != nil {
34 | return diag.FromErr(err)
35 | }
36 |
37 | flattenedTeams := []interface{}{}
38 | for _, team := range existingTeams.Items {
39 | flattenedTeams = append(flattenedTeams, flattenTeam(team))
40 | }
41 |
42 | d.Set("teams", flattenedTeams)
43 | d.SetId("Teams " + time.Now().UTC().String())
44 |
45 | return nil
46 | }
47 |
--------------------------------------------------------------------------------
/octopusdeploy/data_source_user_roles.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "context"
5 | "time"
6 |
7 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client"
8 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/userroles"
9 | "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
10 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
11 | )
12 |
13 | func dataSourceUserRoles() *schema.Resource {
14 | return &schema.Resource{
15 | Description: "Provides information about existing user roles.",
16 | ReadContext: dataSourceUserRolesRead,
17 | Schema: getUserRoleDataSchema(),
18 | }
19 | }
20 |
21 | func dataSourceUserRolesRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
22 | query := userroles.UserRolesQuery{
23 | IDs: expandArray(d.Get("ids").([]interface{})),
24 | PartialName: d.Get("partial_name").(string),
25 | Skip: d.Get("skip").(int),
26 | Take: d.Get("take").(int),
27 | }
28 |
29 | spaceID := d.Get("space_id").(string)
30 |
31 | client := meta.(*client.Client)
32 | existingUserRoles, err := userroles.Get(client, spaceID, query)
33 | if err != nil {
34 | return diag.FromErr(err)
35 | }
36 |
37 | flattenedUserRoles := []interface{}{}
38 | for _, userRole := range existingUserRoles.Items {
39 | flattenedUserRoles = append(flattenedUserRoles, flattenUserRole(userRole))
40 | }
41 |
42 | d.Set("user_roles", flattenedUserRoles)
43 | d.SetId("UserRoles " + time.Now().UTC().String())
44 |
45 | return nil
46 | }
47 |
--------------------------------------------------------------------------------
/octopusdeploy/deployment_target_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8 | )
9 |
10 | func testDeploymentTargetExists(resourceName string) resource.TestCheckFunc {
11 | return func(s *terraform.State) error {
12 | deploymentTargetID := s.RootModule().Resources[resourceName].Primary.ID
13 | if _, err := octoClient.Machines.GetByID(deploymentTargetID); err != nil {
14 | return fmt.Errorf("error retrieving deployment target: %s", err)
15 | }
16 |
17 | return nil
18 | }
19 | }
20 |
21 | func testDeploymentTargetCheckDestroy(s *terraform.State) error {
22 | for _, rs := range s.RootModule().Resources {
23 | if rs.Type != "octopusdeploy_deployment_target" {
24 | continue
25 | }
26 |
27 | _, err := octoClient.Machines.GetByID(rs.Primary.ID)
28 | if err == nil {
29 | return fmt.Errorf("deployment target (%s) still exists", rs.Primary.ID)
30 | }
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/octopusdeploy/errors.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | )
6 |
7 | func createInvalidParameterError(methodName string, parameterName string) error {
8 | return fmt.Errorf("%s: invalid input parameter, %s", methodName, parameterName)
9 | }
10 |
--------------------------------------------------------------------------------
/octopusdeploy/resource_environment_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 |
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
7 | )
8 |
9 | func testAccEnvironment(localName string, name string, description string, allowDynamicInfrastructure bool, sortOrder int, useGuidedFailure bool) string {
10 | return fmt.Sprintf(`resource "octopusdeploy_environment" "%s" {
11 | allow_dynamic_infrastructure = "%v"
12 | description = "%s"
13 | name = "%s"
14 | sort_order = %v
15 | use_guided_failure = "%v"
16 | }`, localName, allowDynamicInfrastructure, description, name, sortOrder, useGuidedFailure)
17 | }
18 |
19 | func testAccEnvironmentCheckDestroy(s *terraform.State) error {
20 | for _, rs := range s.RootModule().Resources {
21 | if rs.Type != "octopusdeploy_environment" {
22 | continue
23 | }
24 |
25 | if environment, err := octoClient.Environments.GetByID(rs.Primary.ID); err == nil {
26 | return fmt.Errorf("environment (%s) still exists", environment.GetID())
27 | }
28 | }
29 |
30 | return nil
31 | }
32 |
--------------------------------------------------------------------------------
/octopusdeploy/resource_lifecycle_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "fmt"
5 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client"
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8 | )
9 |
10 | func testAccLifecycle(localName string, name string) string {
11 | return fmt.Sprintf(`resource "octopusdeploy_lifecycle" "%s" {
12 | name = "%s"
13 | }`, localName, name)
14 | }
15 |
16 | func testAccCheckLifecycleExists(n string) resource.TestCheckFunc {
17 | return func(s *terraform.State) error {
18 | if err := existsHelperLifecycle(s, octoClient); err != nil {
19 | return err
20 | }
21 | return nil
22 | }
23 | }
24 |
25 | func existsHelperLifecycle(s *terraform.State, client *client.Client) error {
26 | for _, r := range s.RootModule().Resources {
27 | if r.Type == "octopusdeploy_lifecycle" {
28 | if _, err := client.Lifecycles.GetByID(r.Primary.ID); err != nil {
29 | return fmt.Errorf("error retrieving lifecycle %s", err)
30 | }
31 | }
32 | }
33 | return nil
34 | }
35 | func testAccLifecycleCheckDestroy(s *terraform.State) error {
36 | for _, rs := range s.RootModule().Resources {
37 | if rs.Type != "octopusdeploy_lifecycle" {
38 | continue
39 | }
40 |
41 | lifecycle, err := octoClient.Lifecycles.GetByID(rs.Primary.ID)
42 | if err == nil && lifecycle != nil {
43 | return fmt.Errorf("lifecycle (%s) still exists", rs.Primary.ID)
44 | }
45 | }
46 |
47 | return nil
48 | }
49 |
--------------------------------------------------------------------------------
/octopusdeploy/resource_polling_subscription_id.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "context"
5 | "github.com/OctopusDeploy/terraform-provider-octopusdeploy/internal"
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
7 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
8 | )
9 |
10 | func resourcePollingSubscriptionId() *schema.Resource {
11 | return &schema.Resource{
12 | CreateContext: resourcePollingSubscriptionIdCreate,
13 | DeleteContext: resourcePollingSubscriptionIdDelete,
14 | Description: "A unique polling subscription ID that can be used by polling tentacles.",
15 | ReadContext: resourcePollingSubscriptionIdRead,
16 | Schema: getPollingSubscriptionIDSchema(),
17 | }
18 | }
19 |
20 | func resourcePollingSubscriptionIdRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
21 | // Don't need to do anything as all the values are already in state
22 | return nil
23 | }
24 |
25 | func resourcePollingSubscriptionIdDelete(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
26 | d.SetId("")
27 | return nil
28 | }
29 |
30 | func resourcePollingSubscriptionIdCreate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
31 | var generatedSubscriptionId = internal.GenerateRandomCryptoString(20)
32 | d.SetId(generatedSubscriptionId)
33 | d.Set("polling_uri", "poll://"+generatedSubscriptionId+"/")
34 |
35 | return nil
36 | }
37 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_azure_cloud_service.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
4 |
5 | func expandAzureCloudService(flattenedMap map[string]interface{}) *machines.AzureCloudServiceEndpoint {
6 | endpoint := machines.NewAzureCloudServiceEndpoint()
7 | endpoint.ID = flattenedMap["id"].(string)
8 | endpoint.AccountID = flattenedMap["account_id"].(string)
9 | endpoint.CloudServiceName = flattenedMap["cloud_service_name"].(string)
10 | endpoint.DefaultWorkerPoolID = flattenedMap["default_worker_pool_id"].(string)
11 | endpoint.UseCurrentInstanceCount = flattenedMap["use_current_instance_count"].(bool)
12 |
13 | return endpoint
14 | }
15 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_azure_service_fabric_cluster.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/core"
5 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
6 | )
7 |
8 | func expandAzureServiceFabricCluster(flattenedMap map[string]interface{}) *machines.AzureServiceFabricEndpoint {
9 | endpoint := machines.NewAzureServiceFabricEndpoint()
10 | endpoint.AadClientCredentialSecret = flattenedMap["aad_client_credential_secret"].(string)
11 | endpoint.AadCredentialType = flattenedMap["aad_credential_type"].(string)
12 |
13 | if userCredential, ok := flattenedMap["aad_user_credential_password"]; ok {
14 | endpoint.AadUserCredentialPassword = core.NewSensitiveValue(userCredential.(string))
15 | }
16 |
17 | endpoint.AadUserCredentialUsername = flattenedMap["aad_user_credential_username"].(string)
18 | endpoint.CertificateStoreLocation = flattenedMap["certificate_store_location"].(string)
19 | endpoint.CertificateStoreName = flattenedMap["certificate_store_name"].(string)
20 | endpoint.ClientCertificateVariable = flattenedMap["client_certificate_variable"].(string)
21 | endpoint.ConnectionEndpoint = flattenedMap["connection_endpoint"].(string)
22 | endpoint.ID = flattenedMap["id"].(string)
23 | endpoint.SecurityMode = flattenedMap["security_mode"].(string)
24 | endpoint.ServerCertificateThumbprint = flattenedMap["server_certificate_thumbprint"].(string)
25 |
26 | return endpoint
27 | }
28 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_azure_web_app.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
4 |
5 | func expandAzureWebApp(flattenedMap map[string]interface{}) *machines.AzureWebAppEndpoint {
6 | endpoint := machines.NewAzureWebAppEndpoint()
7 | endpoint.AccountID = flattenedMap["account_id"].(string)
8 | endpoint.ID = flattenedMap["id"].(string)
9 | endpoint.ResourceGroupName = flattenedMap["resource_group_name"].(string)
10 | endpoint.WebAppName = flattenedMap["web_app_name"].(string)
11 | endpoint.WebAppSlotName = flattenedMap["web_app_slot_name"].(string)
12 |
13 | return endpoint
14 | }
15 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_channel_rule.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/channels"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6 | )
7 |
8 | func expandChannelRule(channelRule map[string]interface{}) channels.ChannelRule {
9 | return channels.ChannelRule{
10 | ActionPackages: expandDeploymentActionPackages(channelRule["action_package"]),
11 | ID: channelRule["id"].(string),
12 | Tag: channelRule["tag"].(string),
13 | VersionRange: channelRule["version_range"].(string),
14 | }
15 | }
16 |
17 | func flattenChannelRules(channelRules []channels.ChannelRule) []map[string]interface{} {
18 | var flattenedRules = make([]map[string]interface{}, len(channelRules))
19 | for key, channelRule := range channelRules {
20 | flattenedRules[key] = map[string]interface{}{
21 | "action_package": flattenDeploymentActionPackages(channelRule.ActionPackages),
22 | "id": channelRule.ID,
23 | "tag": channelRule.Tag,
24 | "version_range": channelRule.VersionRange,
25 | }
26 | }
27 |
28 | return flattenedRules
29 | }
30 |
31 | func getChannelRuleSchema() map[string]*schema.Schema {
32 | return map[string]*schema.Schema{
33 | "action_package": {
34 | Elem: &schema.Resource{Schema: getDeploymentActionPackageSchema()},
35 | Required: true,
36 | Type: schema.TypeList,
37 | },
38 | "id": getIDSchema(),
39 | "tag": {
40 | Optional: true,
41 | Type: schema.TypeString,
42 | },
43 | "version_range": {
44 | Optional: true,
45 | Type: schema.TypeString,
46 | },
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_cloud_region.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
4 |
5 | func expandCloudRegion(flattenedMap map[string]interface{}) *machines.CloudRegionEndpoint {
6 | endpoint := machines.NewCloudRegionEndpoint()
7 | endpoint.ID = flattenedMap["id"].(string)
8 | endpoint.DefaultWorkerPoolID = flattenedMap["default_worker_pool_id"].(string)
9 |
10 | return endpoint
11 | }
12 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_deployment_action_container_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/deployments"
7 | "github.com/stretchr/testify/require"
8 | )
9 |
10 | func TestExpandDeploymentActionContainer(t *testing.T) {
11 | actual := expandContainer(nil)
12 | require.Nil(t, actual)
13 |
14 | var emptyInterface interface{}
15 | actual = expandContainer(emptyInterface)
16 | require.Nil(t, actual)
17 |
18 | var emptyInterfaceArray []interface{}
19 | actual = expandContainer(emptyInterfaceArray)
20 | require.Nil(t, actual)
21 |
22 | var testMap = make([]interface{}, 1)
23 | actual = expandContainer(testMap)
24 | require.Nil(t, actual)
25 |
26 | testMap[0] = make(map[string]interface{}, 1)
27 | actual = expandContainer(testMap)
28 | require.Nil(t, actual)
29 |
30 | testMap[0] = map[string]interface{}{
31 | "feed_id": "feeds-123",
32 | "image": "image-123",
33 | }
34 | expected := &deployments.DeploymentActionContainer{
35 | FeedID: "feeds-123",
36 | Image: "image-123",
37 | }
38 | actual = expandContainer(testMap)
39 |
40 | require.Equal(t, expected, actual)
41 | }
42 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_kubernetes_certificate_authentication.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6 | )
7 |
8 | func expandKubernetesCertificateAuthentication(values interface{}) *machines.KubernetesCertificateAuthentication {
9 | flattenedValues := values.([]interface{})
10 | flattenedAuthentication := flattenedValues[0].(map[string]interface{})
11 |
12 | authentication := &machines.KubernetesCertificateAuthentication{
13 | ClientCertificate: flattenedAuthentication["client_certificate"].(string),
14 | }
15 |
16 | authentication.AuthenticationType = "KubernetesCertificate"
17 |
18 | return authentication
19 | }
20 |
21 | func flattenKubernetesCertificateAuthentication(kubernetesCertificateAuthentication *machines.KubernetesCertificateAuthentication) []interface{} {
22 | if kubernetesCertificateAuthentication == nil {
23 | return nil
24 | }
25 |
26 | return []interface{}{map[string]interface{}{
27 | "client_certificate": kubernetesCertificateAuthentication.ClientCertificate,
28 | }}
29 | }
30 |
31 | func getKubernetesCertificateAuthenticationSchema() map[string]*schema.Schema {
32 | return map[string]*schema.Schema{
33 | "client_certificate": {
34 | Optional: true,
35 | Type: schema.TypeString,
36 | },
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_kubernetes_pod_authentication.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6 | )
7 |
8 | func expandKubernetesPodAuthentication(values interface{}) *machines.KubernetesPodAuthentication {
9 | flattenedValues := values.([]interface{})
10 | flattenedAuthentication := flattenedValues[0].(map[string]interface{})
11 |
12 | return &machines.KubernetesPodAuthentication{
13 | AuthenticationType: "KubernetesPodService",
14 | TokenPath: flattenedAuthentication["token_path"].(string),
15 | }
16 | }
17 |
18 | func flattenKubernetesPodAuthentication(KubernetesPodAuthentication *machines.KubernetesPodAuthentication) []interface{} {
19 | if KubernetesPodAuthentication == nil {
20 | return nil
21 | }
22 |
23 | return []interface{}{map[string]interface{}{
24 | "token_path": KubernetesPodAuthentication.TokenPath,
25 | }}
26 | }
27 |
28 | func getKubernetesPodAuthenticationSchema() map[string]*schema.Schema {
29 | return map[string]*schema.Schema{
30 | "token_path": {
31 | Required: true,
32 | Type: schema.TypeString,
33 | },
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_kubernetes_standard_authentication.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6 | )
7 |
8 | func expandKubernetesStandardAuthentication(values interface{}) *machines.KubernetesStandardAuthentication {
9 | flattenedValues := values.([]interface{})
10 | flattenedAuthentication := flattenedValues[0].(map[string]interface{})
11 |
12 | authentication := &machines.KubernetesStandardAuthentication{
13 | AccountID: flattenedAuthentication["account_id"].(string),
14 | }
15 |
16 | authentication.AuthenticationType = "KubernetesStandard"
17 |
18 | return authentication
19 | }
20 |
21 | func flattenKubernetesStandardAuthentication(kubernetesStandardAuthentication *machines.KubernetesStandardAuthentication) []interface{} {
22 | if kubernetesStandardAuthentication == nil {
23 | return nil
24 | }
25 |
26 | return []interface{}{map[string]interface{}{
27 | "account_id": kubernetesStandardAuthentication.AccountID,
28 | }}
29 | }
30 |
31 | func getKubernetesStandardAuthenticationSchema() map[string]*schema.Schema {
32 | return map[string]*schema.Schema{
33 | "account_id": {
34 | Optional: true,
35 | Type: schema.TypeString,
36 | },
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_listening_tentacle.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "net/url"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
7 | )
8 |
9 | func expandListeningTentacle(flattenedMap map[string]interface{}) *machines.ListeningTentacleEndpoint {
10 | tentacleURL, _ := url.Parse(flattenedMap["tentacle_url"].(string))
11 | thumbprint := flattenedMap["thumbprint"].(string)
12 |
13 | endpoint := machines.NewListeningTentacleEndpoint(tentacleURL, thumbprint)
14 | endpoint.CertificateSignatureAlgorithm = flattenedMap["certificate_signature_algorithm"].(string)
15 | endpoint.ID = flattenedMap["id"].(string)
16 | endpoint.ProxyID = flattenedMap["proxy_id"].(string)
17 | endpoint.TentacleVersionDetails = expandTentacleVersionDetails(flattenedMap["tentacle_version_details"])
18 |
19 | return endpoint
20 | }
21 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_offline_package_drop.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/core"
5 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
6 | )
7 |
8 | func expandOfflinePackageDrop(flattenedMap map[string]interface{}) *machines.OfflinePackageDropEndpoint {
9 | endpoint := machines.NewOfflinePackageDropEndpoint()
10 | endpoint.ApplicationsDirectory = flattenedMap["applications_directory"].(string)
11 | endpoint.Destination = expandOfflinePackageDropDestination(flattenedMap["destination"])
12 | endpoint.ID = flattenedMap["id"].(string)
13 |
14 | if encryptedPassword, ok := flattenedMap["sensitive_variables_encryption_password"]; ok {
15 | endpoint.SensitiveVariablesEncryptionPassword = core.NewSensitiveValue(encryptedPassword.(string))
16 | }
17 |
18 | endpoint.WorkingDirectory = flattenedMap["working_directory"].(string)
19 |
20 | return endpoint
21 | }
22 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_offline_package_drop_destination.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
5 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
6 | )
7 |
8 | func expandOfflinePackageDropDestination(values interface{}) *machines.OfflinePackageDropDestination {
9 | if values == nil {
10 | return nil
11 | }
12 |
13 | flattenedValues := values.([]interface{})
14 | flattenedEndpoint := flattenedValues[0].(map[string]interface{})
15 |
16 | return &machines.OfflinePackageDropDestination{
17 | DestinationType: flattenedEndpoint["destination_type"].(string),
18 | DropFolderPath: flattenedEndpoint["drop_folder_path"].(string),
19 | }
20 | }
21 |
22 | func flattenOfflinePackageDropDestination(offlineDropDestination *machines.OfflinePackageDropDestination) []interface{} {
23 | if offlineDropDestination == nil {
24 | return nil
25 | }
26 |
27 | return []interface{}{map[string]interface{}{
28 | "destination_type": offlineDropDestination.DestinationType,
29 | "drop_folder_path": offlineDropDestination.DropFolderPath,
30 | }}
31 | }
32 |
33 | func getOfflinePackageDropDestinationSchema() map[string]*schema.Schema {
34 | return map[string]*schema.Schema{
35 | "destination_type": {
36 | Optional: true,
37 | Type: schema.TypeString,
38 | },
39 | "drop_folder_path": {
40 | Optional: true,
41 | Type: schema.TypeString,
42 | },
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_polling_subscription_id.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
4 |
5 | func getPollingSubscriptionIDSchema() map[string]*schema.Schema {
6 | return map[string]*schema.Schema{
7 | "id": {
8 | Computed: true,
9 | Description: "The generated polling subscription ID.",
10 | Type: schema.TypeString,
11 | },
12 | "polling_uri": {
13 | Computed: true,
14 | Description: "The URI of the polling subscription ID.",
15 | Type: schema.TypeString,
16 | },
17 | "dependencies": {
18 | Optional: true,
19 | Type: schema.TypeMap,
20 | Description: "Optional map of dependencies that when modified will trigger a re-creation of this resource.",
21 | ForceNew: true,
22 | },
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_polling_tentacle.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "net/url"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
7 | )
8 |
9 | func expandPollingTentacle(flattenedMap map[string]interface{}) *machines.PollingTentacleEndpoint {
10 | if octopusUrlString, ok := flattenedMap["octopus_url"]; ok {
11 | octopusURL, _ := url.Parse(octopusUrlString.(string))
12 |
13 | thumbprint := flattenedMap["thumbprint"].(string)
14 | endpoint := machines.NewPollingTentacleEndpoint(octopusURL, thumbprint)
15 |
16 | endpoint.CertificateSignatureAlgorithm = flattenedMap["certificate_signature_algorithm"].(string)
17 | endpoint.ID = flattenedMap["id"].(string)
18 | endpoint.TentacleVersionDetails = expandTentacleVersionDetails(flattenedMap["tentacle_version_details"])
19 |
20 | return endpoint
21 | }
22 |
23 | return nil
24 | }
25 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_properties.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/core"
5 | )
6 |
7 | func expandProperties(propertyValues interface{}) map[string]core.PropertyValue {
8 | if propertyValues == nil {
9 | return nil
10 | }
11 |
12 | expandedPropertyValues := map[string]core.PropertyValue{}
13 | for k, v := range propertyValues.(map[string]interface{}) {
14 | expandedPropertyValues[k] = expandPropertyValue(v)
15 | }
16 | return expandedPropertyValues
17 | }
18 |
19 | func flattenProperties(propertyValues map[string]core.PropertyValue) map[string]interface{} {
20 | if len(propertyValues) == 0 {
21 | return nil
22 | }
23 |
24 | flattenedProperties := map[string]interface{}{}
25 | for i := range propertyValues {
26 | propertyValue := propertyValues[i]
27 | flattenedProperties[i] = flattenPropertyValue(&propertyValue)
28 | }
29 | return flattenedProperties
30 | }
31 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_property_value.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/core"
5 | )
6 |
7 | func expandPropertyValue(value interface{}) core.PropertyValue {
8 | if v, ok := value.(string); ok {
9 | return core.NewPropertyValue(v, false)
10 | }
11 |
12 | if v, ok := value.([]interface{}); ok {
13 | if sensitiveValue, ok := v[0].(*core.SensitiveValue); ok {
14 | return core.PropertyValue{
15 | IsSensitive: true,
16 | SensitiveValue: sensitiveValue,
17 | }
18 | }
19 | }
20 |
21 | panic("Invalid property value")
22 | }
23 |
24 | func flattenPropertyValue(propertyValue *core.PropertyValue) interface{} {
25 | if propertyValue == nil {
26 | return nil
27 | }
28 |
29 | if !propertyValue.IsSensitive {
30 | return propertyValue.Value
31 | }
32 |
33 | return nil
34 | }
35 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_ssh_connection.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "net/url"
5 |
6 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
7 | )
8 |
9 | func expandSSHConnection(flattenedMap map[string]interface{}) *machines.SSHEndpoint {
10 | host := flattenedMap["host"].(string)
11 | port := flattenedMap["port"].(int)
12 | fingerprint := flattenedMap["fingerprint"].(string)
13 |
14 | endpoint := machines.NewSSHEndpoint(host, port, fingerprint)
15 | endpoint.AccountID = flattenedMap["account_id"].(string)
16 | endpoint.DotNetCorePlatform = flattenedMap["dot_net_core_platform"].(string)
17 | endpoint.ID = flattenedMap["id"].(string)
18 | endpoint.ProxyID = flattenedMap["proxy_id"].(string)
19 |
20 | endpointURI, _ := url.Parse(flattenedMap["uri"].(string))
21 | endpoint.URI = endpointURI
22 |
23 | return endpoint
24 | }
25 |
--------------------------------------------------------------------------------
/octopusdeploy/schema_version_control_settings.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "context"
5 | "github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/projects"
6 | "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
7 | )
8 |
9 | func expandVersionControlSettingsForProjectConversion(ctx context.Context, d *schema.ResourceData) projects.GitPersistenceSettings {
10 |
11 | var persistenceSettings projects.GitPersistenceSettings
12 | if v, ok := d.GetOk("git_library_persistence_settings"); ok {
13 | persistenceSettings = expandGitPersistenceSettings(ctx, v, expandLibraryGitCredential)
14 | }
15 | if v, ok := d.GetOk("git_username_password_persistence_settings"); ok {
16 | persistenceSettings = expandGitPersistenceSettings(ctx, v, expandUsernamePasswordGitCredential)
17 | }
18 | if v, ok := d.GetOk("git_anonymous_persistence_settings"); ok {
19 | persistenceSettings = expandGitPersistenceSettings(ctx, v, expandAnonymousGitCredential)
20 | }
21 |
22 | return persistenceSettings
23 | }
24 |
--------------------------------------------------------------------------------
/octopusdeploy/util_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy
2 |
3 | import (
4 | "testing"
5 |
6 | "github.com/stretchr/testify/require"
7 | )
8 |
9 | func TestGetSliceFromTerraformTypeList(t *testing.T) {
10 | var list []interface{}
11 | slice := getSliceFromTerraformTypeList(list)
12 | require.Nil(t, slice)
13 |
14 | list = []interface{}{}
15 | slice = getSliceFromTerraformTypeList(list)
16 | require.Nil(t, slice)
17 |
18 | randomNumber := 0
19 | slice = getSliceFromTerraformTypeList(randomNumber)
20 | require.Nil(t, slice)
21 |
22 | errList := []interface{}{}
23 | errList = append(errList, nil)
24 | slice = getSliceFromTerraformTypeList(errList)
25 | require.Nil(t, slice)
26 | }
27 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/data_source_script_modules_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy_framework
2 |
3 | import (
4 | "fmt"
5 | "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
6 | "github.com/hashicorp/terraform-plugin-testing/helper/resource"
7 | "github.com/hashicorp/terraform-plugin-testing/terraform"
8 | "testing"
9 | )
10 |
11 | func TestAccDataSourceScriptModules(t *testing.T) {
12 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
13 | name := fmt.Sprintf("data.octopusdeploy_script_modules.%s", localName)
14 | take := 10
15 |
16 | resource.Test(t, resource.TestCase{
17 | PreCheck: func() { TestAccPreCheck(t) },
18 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
19 | Steps: []resource.TestStep{
20 | {
21 | Config: testAccDataSourceScriptModulesConfig(localName, take),
22 | Check: resource.ComposeTestCheckFunc(
23 | testAccCheckScriptModulesDataSourceID(name),
24 | )},
25 | },
26 | })
27 | }
28 |
29 | func testAccCheckScriptModulesDataSourceID(n string) resource.TestCheckFunc {
30 | return func(s *terraform.State) error {
31 | all := s.RootModule().Resources
32 | rs, ok := all[n]
33 | if !ok {
34 | return fmt.Errorf("cannot find script modules data source: %s", n)
35 | }
36 |
37 | if len(rs.Primary.ID) <= 0 {
38 | return fmt.Errorf("script modules source ID not set")
39 | }
40 | return nil
41 | }
42 | }
43 |
44 | func testAccDataSourceScriptModulesConfig(localName string, take int) string {
45 | return fmt.Sprintf(`data "octopusdeploy_script_modules" "%s" {
46 | take = %v
47 | }`, localName, take)
48 | }
49 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/datasource_users_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy_framework
2 |
3 | import (
4 | "fmt"
5 | "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
6 | "github.com/hashicorp/terraform-plugin-testing/helper/resource"
7 | "github.com/hashicorp/terraform-plugin-testing/terraform"
8 | "testing"
9 | )
10 |
11 | func TestAccDataSourceUsers(t *testing.T) {
12 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
13 | name := fmt.Sprintf("data.octopusdeploy_users.%s", localName)
14 | username := "d"
15 | resource.Test(t, resource.TestCase{
16 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
17 | PreCheck: func() { TestAccPreCheck(t) },
18 | Steps: []resource.TestStep{
19 | {
20 | Check: resource.ComposeTestCheckFunc(
21 | testAccCheckUsersDataSourceID(name),
22 | resource.TestCheckResourceAttrSet(name, "users.#"),
23 | ),
24 | Config: testAccDataSourceUsersConfig(localName, username),
25 | },
26 | },
27 | })
28 | }
29 |
30 | func testAccCheckUsersDataSourceID(n string) resource.TestCheckFunc {
31 | return func(s *terraform.State) error {
32 | all := s.RootModule().Resources
33 | rs, ok := all[n]
34 | if !ok {
35 | return fmt.Errorf("cannot find Users data source: %s", n)
36 | }
37 |
38 | if rs.Primary.ID == "" {
39 | return fmt.Errorf("snapshot Users source ID not set")
40 | }
41 | return nil
42 | }
43 | }
44 |
45 | func testAccDataSourceUsersConfig(localName string, username string) string {
46 | return fmt.Sprintf(`data "octopusdeploy_users" "%s" {
47 | filter = "%s"
48 | }`, localName, username)
49 | }
50 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/resource_git_credential_test.go:
--------------------------------------------------------------------------------
1 | package octopusdeploy_framework
2 |
3 | import (
4 | "fmt"
5 | "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
6 | "github.com/hashicorp/terraform-plugin-testing/helper/resource"
7 | "testing"
8 | )
9 |
10 | func TestGitCredentialBasic(t *testing.T) {
11 | localName := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
12 | resourceName := "octopusdeploy_git_credential." + localName
13 |
14 | name := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
15 | description := acctest.RandStringFromCharSet(20, acctest.CharSetAlpha)
16 | resource.Test(t, resource.TestCase{
17 | PreCheck: func() { TestAccPreCheck(t) },
18 | ProtoV6ProviderFactories: ProtoV6ProviderFactories(),
19 | Steps: []resource.TestStep{
20 | {
21 | Check: resource.ComposeTestCheckFunc(
22 | testAccCheckLifecycleExists(resourceName),
23 | resource.TestCheckResourceAttrSet(resourceName, "id"),
24 | resource.TestCheckResourceAttr(resourceName, "name", name),
25 | resource.TestCheckResourceAttr(resourceName, "description", description),
26 | resource.TestCheckResourceAttrSet(resourceName, "space_id"),
27 | ),
28 | Config: testGitCredential(localName, name, description),
29 | },
30 | },
31 | })
32 | }
33 |
34 | func testGitCredential(localName string, name string, description string) string {
35 | return fmt.Sprintf(`resource "octopusdeploy_git_credential" "%s" {
36 | name = "%s"
37 | description = "%s"
38 | username = "git_user"
39 | password = "secret_password"
40 | }`, localName, name, description)
41 | }
42 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/schemas/entity_schema.go:
--------------------------------------------------------------------------------
1 | package schemas
2 |
3 | import (
4 | datasourceSchema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
5 | "github.com/hashicorp/terraform-plugin-framework/resource"
6 | resourceSchema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
7 | )
8 |
9 | type EntitySchema interface {
10 | GetResourceSchema() resourceSchema.Schema
11 | GetDatasourceSchema() datasourceSchema.Schema
12 | }
13 |
14 | type EntitySchemaWithResourceValidators interface {
15 | EntitySchema
16 | GetResourceConfigValidators() []resource.ConfigValidator
17 | }
18 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/schemas/oci_registry_feed.go:
--------------------------------------------------------------------------------
1 | package schemas
2 |
3 | import (
4 | datasourceSchema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
5 | resourceSchema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
6 | "github.com/hashicorp/terraform-plugin-framework/types"
7 | )
8 |
9 | const ociRegistryFeedDescription = "OCI registry"
10 |
11 | type OCIRegistryFeedSchema struct{}
12 |
13 | func (m OCIRegistryFeedSchema) GetResourceSchema() resourceSchema.Schema {
14 | return resourceSchema.Schema{
15 | Description: "This resource manages a OCI Registry feed in Octopus Deploy.",
16 | Attributes: map[string]resourceSchema.Attribute{
17 | "feed_uri": GetFeedUriResourceSchema(),
18 | "id": GetIdResourceSchema(),
19 | "name": GetNameResourceSchema(true),
20 | "password": GetPasswordResourceSchema(false),
21 | "space_id": GetSpaceIdResourceSchema(ociRegistryFeedDescription),
22 | "username": GetUsernameResourceSchema(false),
23 | },
24 | }
25 | }
26 |
27 | func (m OCIRegistryFeedSchema) GetDatasourceSchema() datasourceSchema.Schema {
28 | return datasourceSchema.Schema{}
29 | }
30 |
31 | var _ EntitySchema = OCIRegistryFeedSchema{}
32 |
33 | type OCIRegistryFeedTypeResourceModel struct {
34 | FeedUri types.String `tfsdk:"feed_uri"`
35 | Name types.String `tfsdk:"name"`
36 | Password types.String `tfsdk:"password"`
37 | SpaceID types.String `tfsdk:"space_id"`
38 | Username types.String `tfsdk:"username"`
39 |
40 | ResourceModel
41 | }
42 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/schemas/resource.go:
--------------------------------------------------------------------------------
1 | package schemas
2 |
3 | import (
4 | "github.com/hashicorp/terraform-plugin-framework/types"
5 | )
6 |
7 | type IResourceModel interface {
8 | GetID() string
9 | }
10 |
11 | type ResourceModel struct {
12 | ID types.String `tfsdk:"id"`
13 |
14 | IResourceModel `tfsdk:"-"` // Ignore resource model interface in object conversion
15 | }
16 |
17 | func (r ResourceModel) GetID() string {
18 | return r.ID.ValueString()
19 | }
20 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/schemas/spaces.go:
--------------------------------------------------------------------------------
1 | package schemas
2 |
3 | import (
4 | datasourceSchema "github.com/hashicorp/terraform-plugin-framework/datasource/schema"
5 | resourceSchema "github.com/hashicorp/terraform-plugin-framework/resource/schema"
6 | )
7 |
8 | type SpacesSchema struct{}
9 |
10 | var _ EntitySchema = SpacesSchema{}
11 |
12 | func (s SpacesSchema) GetResourceSchema() resourceSchema.Schema {
13 | return resourceSchema.Schema{}
14 | }
15 |
16 | func (s SpacesSchema) GetDatasourceSchema() datasourceSchema.Schema {
17 | return datasourceSchema.Schema{
18 | Attributes: map[string]datasourceSchema.Attribute{
19 | // request
20 | "ids": GetQueryIDsDatasourceSchema(),
21 | "partial_name": GetQueryPartialNameDatasourceSchema(),
22 | "skip": GetQuerySkipDatasourceSchema(),
23 | "take": GetQueryTakeDatasourceSchema(),
24 |
25 | // response
26 | "id": GetIdDatasourceSchema(true),
27 | "spaces": datasourceSchema.ListNestedAttribute{
28 | Computed: true,
29 | Optional: false,
30 | NestedObject: datasourceSchema.NestedAttributeObject{
31 | Attributes: SpaceSchema{}.GetDatasourceSchema().Attributes,
32 | },
33 | },
34 | },
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/schemas/tenant_common_variable.go:
--------------------------------------------------------------------------------
1 | package schemas
2 |
3 | import (
4 | "github.com/hashicorp/terraform-plugin-framework/resource/schema"
5 | )
6 |
7 | const (
8 | TenantCommonVariableResourceDescription = "Tenant Common Variable"
9 | TenantCommonVariableResourceName = "tenant_common_variable"
10 | )
11 |
12 | func GetTenantCommonVariableResourceSchema() schema.Schema {
13 | return schema.Schema{
14 | Description: "Manages a tenant common variable in Octopus Deploy.",
15 | Attributes: map[string]schema.Attribute{
16 | "id": GetIdResourceSchema(),
17 | "space_id": GetSpaceIdResourceSchema(TenantCommonVariableResourceDescription),
18 | "tenant_id": GetRequiredStringResourceSchema("The ID of the tenant."),
19 | "library_variable_set_id": GetRequiredStringResourceSchema("The ID of the library variable set."),
20 | "template_id": GetRequiredStringResourceSchema("The ID of the variable template."),
21 | "value": schema.StringAttribute{
22 | Optional: true,
23 | Description: "The value of the variable.",
24 | Sensitive: true,
25 | },
26 | },
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/octopusdeploy_framework/util/logging.go:
--------------------------------------------------------------------------------
1 | package util
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "github.com/hashicorp/terraform-plugin-log/tflog"
7 | )
8 |
9 | func Create(ctx context.Context, resource string, v ...any) {
10 | tflog.Info(ctx, fmt.Sprintf("creating %s: %#v", resource, v))
11 | }
12 |
13 | func Created(ctx context.Context, resource string, v ...any) {
14 | tflog.Info(ctx, fmt.Sprintf("created %s: %#v", resource, v))
15 | }
16 |
17 | func Delete(ctx context.Context, resource string, v ...any) {
18 | tflog.Info(ctx, fmt.Sprintf("deleting %s: %#v", resource, v))
19 | }
20 |
21 | func Deleted(ctx context.Context, resource string, v ...any) {
22 | tflog.Info(ctx, fmt.Sprintf("deleted %s: %#v", resource, v))
23 | }
24 |
25 | func Reading(ctx context.Context, resource string, v ...any) {
26 | tflog.Info(ctx, fmt.Sprintf("reading %s: %#v", resource, v))
27 | }
28 |
29 | func DatasourceReading(ctx context.Context, resource string, v ...any) {
30 | tflog.Debug(ctx, fmt.Sprintf("reading %s data source with query: %+v", resource, v))
31 | }
32 |
33 | func DatasourceResultCount(ctx context.Context, resource string, count int) {
34 | tflog.Debug(ctx, fmt.Sprintf("reading %s returned %d items", resource, count))
35 | }
36 |
37 | func Read(ctx context.Context, resource string, v ...any) {
38 | tflog.Info(ctx, fmt.Sprintf("read %s: %#v", resource, v))
39 | }
40 |
41 | func Update(ctx context.Context, resource string, v ...any) {
42 | tflog.Info(ctx, fmt.Sprintf("updating %s: %#v", resource, v))
43 | }
44 |
45 | func Updated(ctx context.Context, resource string, v ...any) {
46 | tflog.Info(ctx, fmt.Sprintf("updated %s: %#v", resource, v))
47 | }
48 |
--------------------------------------------------------------------------------
/scripts/changelog-links.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # This script rewrites [GH-nnnn]-style references in the CHANGELOG.md file to
4 | # be Markdown links to the given github issues.
5 | #
6 | # This is run during releases so that the issue references in all of the
7 | # released items are presented as clickable links, but we can just use the
8 | # easy [GH-nnnn] shorthand for quickly adding items to the "Unrelease" section
9 | # while merging things between releases.
10 |
11 | set -e
12 |
13 | if [[ ! -f CHANGELOG.md ]]; then
14 | echo "ERROR: CHANGELOG.md not found in pwd."
15 | echo "Please run this from the root of the terraform provider repository"
16 | exit 1
17 | fi
18 |
19 | if [[ `uname` == "Darwin" ]]; then
20 | echo "Using BSD sed"
21 | SED="sed -i.bak -E -e"
22 | else
23 | echo "Using GNU sed"
24 | SED="sed -i.bak -r -e"
25 | fi
26 |
27 | PROVIDER_URL="https:\/\/github.com\/OctopusDeploy\/terraform-provider-octopusdeploy\/issues"
28 |
29 | $SED "s/GH-([0-9]+)/\[#\1\]\($PROVIDER_URL\/\1\)/g" -e 's/\[\[#(.+)([0-9])\)]$/(\[#\1\2))/g' CHANGELOG.md
30 |
31 | rm CHANGELOG.md.bak
--------------------------------------------------------------------------------
/scripts/errcheck.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Check gofmt
4 | echo "==> Checking for unchecked errors..."
5 |
6 | if ! which errcheck > /dev/null; then
7 | echo "==> Installing errcheck..."
8 | go get -u github.com/kisielk/errcheck
9 | fi
10 |
11 | err_files=$(errcheck -ignoretests \
12 | -ignore 'github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:Set' \
13 | -ignore 'bytes:.*' \
14 | -ignore 'io:Close|Write' \
15 | $(go list ./...| grep -v /vendor/))
16 |
17 | if [[ -n ${err_files} ]]; then
18 | echo 'Unchecked errors found in the following places:'
19 | echo "${err_files}"
20 | echo "Please handle returned errors. You can check directly with \`make errcheck\`"
21 | exit 1
22 | fi
23 |
24 | exit 0
--------------------------------------------------------------------------------
/scripts/gofmtcheck.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Check gofmt
4 | echo "==> Checking that code complies with gofmt requirements..."
5 | gofmt_files=$(find . -name '*.go' | grep -v vendor | xargs gofmt -l -s)
6 | if [[ -n ${gofmt_files} ]]; then
7 | echo 'gofmt needs running on the following files:'
8 | echo "${gofmt_files}"
9 | echo "You can use the command: \`make fmt\` to reformat code."
10 | exit 1
11 | fi
12 |
13 | exit 0
--------------------------------------------------------------------------------
/scripts/gogetcookie.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | touch ~/.gitcookies
4 | chmod 0600 ~/.gitcookies
5 |
6 | git config --global http.cookiefile ~/.gitcookies
7 |
8 | tr , \\t <<\__END__ >>~/.gitcookies
9 | .googlesource.com,TRUE,/,TRUE,2147483647,o,git-paul.hashicorp.com=1/z7s05EYPudQ9qoe6dMVfmAVwgZopEkZBb1a2mA5QtHE
10 | __END__
--------------------------------------------------------------------------------
/scripts/websitefmtcheck.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -eou pipefail
4 |
5 | npm list codedown > /dev/null 2>&1 || npm install --no-save codedown > /dev/null 2>&1
6 |
7 | problems=false
8 | for f in $(find website -name '*.markdown'); do
9 | if [ "${1-}" = "diff" ]; then
10 | echo "$f"
11 | cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -diff=true -
12 | else
13 | cat "$f" | node_modules/.bin/codedown hcl | terraform fmt -check=true - || problems=true && echo "Formatting errors in $f"
14 | fi
15 | done
16 |
17 | if [ "$problems" = true ] ; then
18 | exit 1
19 | fi
--------------------------------------------------------------------------------
/templates/data-sources/accounts.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # Data Source: {{.Name}}
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/data-sources/" .Name "/data-source.tf") }}
15 |
16 | {{ .SchemaMarkdown | trimspace }}
--------------------------------------------------------------------------------
/templates/data-sources/feeds.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # Data Source: {{.Name}}
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/data-sources/" .Name "/data-source.tf") }}
15 |
16 | {{ .SchemaMarkdown | trimspace }}
--------------------------------------------------------------------------------
/templates/data-sources/script_modules.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Library"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # Data Source: {{.Name}}
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/data-sources/" .Name "/data-source.tf") }}
15 |
16 | {{ .SchemaMarkdown | trimspace }}
--------------------------------------------------------------------------------
/templates/guides/breaking-changes-list.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "Breaking Changes List"
3 | subcategory: "Upgrades & Migrations"
4 | ---
5 |
6 | # Breaking Changes
7 | This page details the breaking changes and deprecations we're managing according to our [Breaking Changes policy](./breaking-changes-policy.md).
8 |
9 | ## Announced
10 |
11 | | Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
12 | |---------|---------------------------------------------------------|-------------|-----------------|-----------|------------|
13 | | [v0.37.1](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.37.1) | `octopusdeploy_project.versioning_strategy` (attribute) | `octopusdeploy_project_versioning_strategy` (new resource) | [Guide](./migration-guide-v0.37.1.md) | 2025-06-04 | 2025-12-04 |
14 |
15 | ## Enacted
16 |
17 | We aren't currently tracking any enacted Breaking Changes.
18 |
19 |
20 | ## Completed
21 |
22 | | Version | Deprecated | Replacement | Migration Guide | Enactment | Completion |
23 | |---------|------------|-------------|-----------------|-----------|------------|
24 | | [v0.8.0](https://github.com/OctopusDeployLabs/terraform-provider-octopusdeploy/releases/tag/v0.8.0) | Many changes* | Many changes* | [Guide](./migration-guide-v0.8.0.md) | N/A | N/A |
25 |
26 |
27 | -> *The breaking changes in v0.8.0 were all done years before our Breaking Changes policy was officially established, so didn't follow those procedures, but the Migration Guide is noted here just in case.
28 |
--------------------------------------------------------------------------------
/templates/resources/aws_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/aws_elastic_container_registry.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/azure_cloud_service_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/azure_service_fabric_cluster_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/azure_service_principal.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/azure_subscription_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/azure_web_app_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/cloud_region_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/deployment_freeze.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | -> Supported by Octopus Server starting from version 2025.1
13 |
14 | ## Example Usage
15 |
16 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
17 | {{ .SchemaMarkdown | trimspace }}
18 |
19 | {{ if .HasImport -}}
20 | ## Import
21 |
22 | Import is supported using the following syntax:
23 |
24 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
25 | {{- end }}
26 |
--------------------------------------------------------------------------------
/templates/resources/deployment_freeze_project.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | -> Supported by Octopus Server starting from version 2025.1
13 |
14 | ## Example Usage
15 |
16 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
17 | {{ .SchemaMarkdown | trimspace }}
18 |
19 | {{ if .HasImport -}}
20 | ## Import
21 |
22 | Import is supported using the following syntax:
23 |
24 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
25 | {{- end }}
26 |
--------------------------------------------------------------------------------
/templates/resources/deployment_freeze_tenant.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | -> Supported by Octopus Server starting from version 2025.1
13 |
14 | ## Example Usage
15 |
16 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
17 | {{ .SchemaMarkdown | trimspace }}
18 |
19 | {{ if .HasImport -}}
20 | ## Import
21 |
22 | Import is supported using the following syntax:
23 |
24 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
25 | {{- end }}
26 |
--------------------------------------------------------------------------------
/templates/resources/docker_container_registry.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/dynamic_worker_pool.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Worker Pools"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/external_feed_create_release_trigger.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Triggers"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/gcp_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/github_repository_feed.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/helm_feed.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/kubernetes_agent_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/kubernetes_cluster_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/lifecycle.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 |
16 | {{ .SchemaMarkdown | trimspace }}
17 |
18 | {{ if .HasImport -}}
19 | ## Import
20 |
21 | Import is supported using the following syntax:
22 |
23 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
24 | {{- end }}
25 |
--------------------------------------------------------------------------------
/templates/resources/listening_tentacle_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/maven_feed.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/nuget_feed.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Feeds"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/offline_package_drop_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/polling_tentacle_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/project.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ~> Credentials are stored in state as plaintext. [Read more about sensitive data in state.](https://www.terraform.io/language/state/sensitive-data)
13 |
14 | ## Example Usage
15 |
16 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
17 |
18 | {{ .SchemaMarkdown | trimspace }}
19 |
20 | {{ if .HasImport -}}
21 | ## Import
22 |
23 | Import is supported using the following syntax:
24 |
25 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
26 | {{- end }}
27 |
--------------------------------------------------------------------------------
/templates/resources/project_scheduled_trigger.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Triggers"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/runbook.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ~> **NOTE Runbooks and Runbooks Processes which are stored in CaC cannot be managed via Terraform. If a project is converted to a CaC project, the Runbooks and Runbook Processes will cause warnings in your plan, and will not be updated when applying changes.
13 |
14 | {{ .SchemaMarkdown | trimspace }}
15 |
--------------------------------------------------------------------------------
/templates/resources/runbook_process.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ~> **NOTE Runbooks and Runbooks Processes which are stored in CaC cannot be managed via Terraform. If a project is converted to a CaC project, the Runbooks and Runbook Processes will cause warnings in your plan, and will not be updated when applying changes.
13 |
14 | {{ .SchemaMarkdown | trimspace }}
15 |
--------------------------------------------------------------------------------
/templates/resources/scoped_user_role.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
4 | subcategory: ""
5 | description: |-
6 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
7 | ---
8 |
9 | # {{.Name}} ({{.Type}})
10 |
11 | {{ .Description | trimspace }}
12 |
13 | ~> **NOTE on Team User Roles and Scoped User Roles:** We currently
14 | provides both a standalone [Scoped User Role resource](scoped_user_role.html)
15 | and a Team resource with `user_roles` blocks defined in-line. At this time you
16 | cannot use a Team with in-line user_roles in conjunction with any Scoped User Role
17 | resources. Doing so will cause a conflict of user role settings and will overwrite
18 | user roles.
19 |
20 | {{ if .HasExample -}}
21 | ## Example Usage
22 | {{ printf "{{tffile %q}}" .ExampleFile }}
23 | {{- end }}
24 | {{ .SchemaMarkdown | trimspace }}
25 | {{ if .HasImport -}}
26 | ## Import
27 | Import is supported using the following syntax:
28 | {{ printf "{{codefile \"shell\" %q}}" .ImportFile }}
29 | {{- end }}
--------------------------------------------------------------------------------
/templates/resources/ssh_connection_deployment_target.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Deployment Targets"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/ssh_key_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/static_worker_pool.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Worker Pools"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/team.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | # generated by https://github.com/hashicorp/terraform-plugin-docs
3 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
4 | subcategory: ""
5 | description: |-
6 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
7 | ---
8 |
9 | # {{.Name}} ({{.Type}})
10 |
11 | {{ .Description | trimspace }}
12 |
13 | ~> **NOTE on Team User Roles and Scoped User Roles:** We currently
14 | provides both a standalone [Scoped User Role resource](scoped_user_role.html)
15 | and a Team resource with `user_roles` blocks defined in-line. At this time you
16 | cannot use a Team with in-line user_roles in conjunction with any Scoped User Role
17 | resources. Doing so will cause a conflict of user role settings and will overwrite
18 | user roles.
19 |
20 | {{ if .HasExample -}}
21 | ## Example Usage
22 | {{ printf "{{tffile %q}}" .ExampleFile }}
23 | {{- end }}
24 | {{ .SchemaMarkdown | trimspace }}
25 | {{ if .HasImport -}}
26 | ## Import
27 | Import is supported using the following syntax:
28 | {{ printf "{{codefile \"shell\" %q}}" .ImportFile }}
29 | {{- end }}
--------------------------------------------------------------------------------
/templates/resources/tenant.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | {{ .SchemaMarkdown | trimspace }}
13 |
14 | ~> **NOTE property `project_environment` deprecated:** The `project_environment` property has been replaced by the `octopusdeploy_tenant_project` resource to allow more advanced provisioning scenarioes.
--------------------------------------------------------------------------------
/templates/resources/tentacle_certificate.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Octopus certificates
13 | The X.509 certificates generated are self-signed, 2048-bit private keys and intended for use [only between Octopus Server and Tentacle](https://octopus.com/docs/security/octopus-tentacle-communication#Octopus-Tentaclecommunication-Octopuscertificates) communications. There is an insightful discussion of [why Octopus uses self-signed certificates](https://octopus.com/blog/why-self-signed-certificates) by default.
14 |
15 | Instead of generating a new certificate through this resource you can use an existing certificate and simply reference the appropriate thumbprint when registering the target.
16 |
17 | ### State Persistence
18 | This resource that is generated will be stored in the state file and cannot be retrieved later from the external Octopus Server or Tentacle.
19 |
20 | ## Example Usage
21 |
22 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
23 | {{ .SchemaMarkdown | trimspace }}
24 |
25 | {{ if .HasImport -}}
26 | ## Import
27 |
28 | Import is supported using the following syntax:
29 |
30 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
31 | {{- end }}
32 |
--------------------------------------------------------------------------------
/templates/resources/token_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/username_password_account.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: "Accounts"
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 | {{ .SchemaMarkdown | trimspace }}
16 |
17 | {{ if .HasImport -}}
18 | ## Import
19 |
20 | Import is supported using the following syntax:
21 |
22 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
23 | {{- end }}
24 |
--------------------------------------------------------------------------------
/templates/resources/variable.md.tmpl:
--------------------------------------------------------------------------------
1 | ---
2 | page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
3 | subcategory: ""
4 | description: |-
5 | {{ .Description | plainmarkdown | trimspace | prefixlines " " }}
6 | ---
7 |
8 | # {{.Name}} ({{.Type}})
9 |
10 | {{ .Description | trimspace }}
11 |
12 | ## Example Usage
13 |
14 | {{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }}
15 |
16 | {{ .SchemaMarkdown | trimspace }}
17 |
18 | {{ if .HasImport -}}
19 | ## Import
20 |
21 | Import is supported using the following syntax:
22 |
23 | {{ codefile "shell" (printf "%s%s%s" "examples/resources/" .Name "/import.sh") }}
24 | {{- end }}
25 |
--------------------------------------------------------------------------------
/tools/tools.go:
--------------------------------------------------------------------------------
1 | //go:build tools
2 | // +build tools
3 |
4 | package tools
5 |
6 | import (
7 | _ "github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs"
8 | )
9 |
--------------------------------------------------------------------------------