diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index c3f666199..aeb16672b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -28,6 +28,11 @@ jobs: e2e-test: runs-on: linux-amd64-cpu4 if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.event.workflow_run.event == 'push' }} + strategy: + matrix: + label: [default, legacy, dra, kernel] + name: E2E Test (${{ matrix.label }}) + steps: - name: Checkout code uses: actions/checkout@v4 @@ -42,9 +47,8 @@ jobs: run: | sudo apt-get update sudo apt-get install -y make - make ginkgo - - name: Run e2e tests + - name: Run e2e test for ${{ matrix.label }} env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -55,13 +59,16 @@ jobs: echo "${{ secrets.AWS_SSH_KEY }}" > "$e2e_ssh_key" chmod 600 "$e2e_ssh_key" export E2E_SSH_KEY="$e2e_ssh_key" - - make -f tests/Makefile test + if [ "${{ matrix.label }}" = "default" ]; then \ + make -f tests/Makefile test GINKGO_ARGS="--label-filter='${{ matrix.label }}' --json-report ginkgo.json"; \ + else \ + make -f tests/Makefile test GINKGO_ARGS="--label-filter='${{ matrix.label }}'"; \ + fi - name: Archive Ginkgo logs uses: actions/upload-artifact@v4 with: - name: ginkgo-logs + name: ginkgo-logs-${{ matrix.label }} path: ginkgo.json retention-days: 15 diff --git a/.github/workflows/golang.yaml b/.github/workflows/golang.yaml index fc9c3182c..d5cde7528 100644 --- a/.github/workflows/golang.yaml +++ b/.github/workflows/golang.yaml @@ -75,7 +75,14 @@ jobs: with: go-version: ${{ needs.variables.outputs.GOLANG_VERSION }} - - run: make coverage + - name: Run unit tests and generate coverage report + run: make coverage + + - name: Upload to Coveralls + uses: coverallsapp/github-action@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + file: coverage.out build: name: Build diff --git a/Makefile b/Makefile index 3096d2813..c9dc333d7 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,7 @@ test: go test -coverprofile=$(COVERAGE_FILE) ./pkg/... coverage: test - cat $(COVERAGE_FILE) | grep -v "_mock.go" > $(COVERAGE_FILE).no-mocks - go tool cover -func=$(COVERAGE_FILE).no-mocks + go tool cover -func=$(COVERAGE_FILE) mdlint: ${CONTAINER_RUN_CMD} \ diff --git a/README.md b/README.md index eea8f4257..92c39a8f5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Holodeck -> * Tech preview, under heavy development * +[![Latest Release](https://img.shields.io/github/v/release/NVIDIA/holodeck?label=latest%20release)](https://github.com/NVIDIA/holodeck/releases/latest) A tool for creating and managing GPU-ready Cloud test environments. @@ -13,6 +13,7 @@ A tool for creating and managing GPU-ready Cloud test environments. - [Commands Reference](docs/commands/) - [Contributing Guide](docs/contributing/) - [Examples](docs/examples/) +- [Latest Release](https://github.com/NVIDIA/holodeck/releases/latest) --- @@ -89,14 +90,6 @@ holodeck status holodeck dryrun -f ./examples/v1alpha1_environment.yaml ``` ---- - -## πŸ“¦ Supported Cuda-Drivers - -See [docs/prerequisites.md](docs/prerequisites.md#supported-cuda-drivers) for the full list and usage. - ---- - ## πŸ“‚ More - [Examples](docs/examples/) @@ -104,4 +97,4 @@ See [docs/prerequisites.md](docs/prerequisites.md#supported-cuda-drivers) for th --- -For more information, see the [docs/](docs/) directory. +For more information, see the [documentation](docs/README.md) directory. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..8fc423680 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,24 @@ +# Holodeck Documentation + +[![Latest Release](https://img.shields.io/github/v/release/NVIDIA/holodeck?label=latest%20release)](https://github.com/NVIDIA/holodeck/releases/latest) + +Welcome to the Holodeck documentation! Here you'll find everything you need to +get started, use, and contribute to Holodeck. + +## πŸ“š Sections + +- [Quick Start](quick-start.md): Get up and running with Holodeck in minutes. +- [Prerequisites](prerequisites.md): What you need before you begin. +- [Commands Reference](commands/README.md): Detailed documentation for every + Holodeck CLI command. +- [Contributing Guide](contributing/README.md): How to contribute to Holodeck, + including coding standards and PR process. +- [Examples](examples/README.md): Example configuration files and usage scenarios. +- [Guides](guides/README.md): In-depth guides and tutorials for advanced usage. +- [Latest Release](https://github.com/NVIDIA/holodeck/releases/latest) + +--- + +For general information, see the [main README](../README.md). + +If you have questions or want to contribute, check out the [Contributing Guide](contributing/README.md)! diff --git a/docs/examples/README.md b/docs/examples/README.md index 5bfa30d39..baa832129 100644 --- a/docs/examples/README.md +++ b/docs/examples/README.md @@ -67,4 +67,4 @@ A sample kind cluster configuration for use with the kind installer. --- For more details on configuration options, see the -[Command Reference](../commands/) and [Quick Start Guide](../quick-start.md). +[Command Reference](../commands/README.md) and [Quick Start Guide](../quick-start.md). diff --git a/docs/guides/README.md b/docs/guides/README.md new file mode 100644 index 000000000..380d2ca31 --- /dev/null +++ b/docs/guides/README.md @@ -0,0 +1,10 @@ +# Guides + +This section is for in-depth guides and tutorials related to Holodeck. + +- If you are looking for step-by-step instructions or advanced usage, guides + will be listed here as they are added. +- To contribute a guide, simply add a new Markdown file to this folder and + update this README with a link. + +*No guides are available yet. Stay tuned!* diff --git a/docs/quick-start.md b/docs/quick-start.md index f590c2801..c27d9487c 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -71,5 +71,5 @@ holodeck delete - Check out the [Prerequisites](prerequisites.md) for detailed setup requirements -- Explore the [Command Reference](commands/) for all available commands +- Explore the [Command Reference](commands/README.md) for all available commands - See [Examples](../examples/) for more complex configurations diff --git a/go.mod b/go.mod index 1d09066c5..67e6172c5 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.55.7 github.com/aws/aws-sdk-go-v2 v1.36.3 github.com/aws/aws-sdk-go-v2/config v1.29.14 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.222.0 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.224.0 github.com/aws/aws-sdk-go-v2/service/ssm v1.59.0 github.com/mattn/go-isatty v0.0.20 github.com/onsi/ginkgo/v2 v2.23.4 diff --git a/go.sum b/go.sum index 4efc56612..6c1f691c1 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,8 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34 h1:SZwFm17ZUNNg5Np0io github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.34/go.mod h1:dFZsC0BLo346mvKQLWmoJxT+Sjp+qcVR1tRVHQGOH9Q= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.222.0 h1:qPVuEWzRvc/Z8UA0CKG4QczxORbgYTbWwlviUAmVmgs= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.222.0/go.mod h1:ouvGEfHbLaIlWwpDpOVWPWR+YwO0HDv3vm5tYLq8ImY= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.224.0 h1:i7FB/N5pSvEzNOGHm7n6KQiBx2/X8UkrE/Ppb5Bh3QQ= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.224.0/go.mod h1:ouvGEfHbLaIlWwpDpOVWPWR+YwO0HDv3vm5tYLq8ImY= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3 h1:eAh2A4b5IzM/lum78bZ590jy36+d/aFLgKF/4Vd1xPE= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.3/go.mod h1:0yKJC/kb8sAnmlYa6Zs3QVYqaC8ug2AbnNChv5Ox3uA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.15 h1:dM9/92u2F1JbDaGooxTq18wmmFzbJRfXfVfy96/1CXM= diff --git a/pkg/provisioner/provisioner.go b/pkg/provisioner/provisioner.go index e3aba35ad..db8bf3258 100644 --- a/pkg/provisioner/provisioner.go +++ b/pkg/provisioner/provisioner.go @@ -93,8 +93,8 @@ func (p *Provisioner) waitForNodeReboot() error { } // Wait for the node to come back up - maxRetries := 30 - retryInterval := 10 * time.Second + maxRetries := 10 + retryInterval := 30 * time.Second for i := 0; i < maxRetries; i++ { p.log.Info("Waiting for node to come back online...") diff --git a/pkg/provisioner/templates/containerd.go b/pkg/provisioner/templates/containerd.go index d1cd222b5..2ac0df691 100644 --- a/pkg/provisioner/templates/containerd.go +++ b/pkg/provisioner/templates/containerd.go @@ -169,7 +169,7 @@ RUNC_VERSION=$(curl -fsSL https://api.github.com/repos/opencontainers/runc/relea if [ -z "$RUNC_VERSION" ]; then echo "Failed to fetch latest RUNC version. Using default version." - RUNC_VERSION="1.2.6" + RUNC_VERSION="1.3.0" fi RUNC_URL="https://github.com/opencontainers/runc/releases/download/v${RUNC_VERSION}/runc.${ARCH}" @@ -184,7 +184,7 @@ sudo install -m 755 runc.${ARCH} /usr/local/sbin/runc echo "Runc ${RUNC_VERSION} installed successfully." # Install CNI plugins -CNI_VERSION="1.1.1" +CNI_VERSION="1.3.0" CNI_TAR="cni-plugins-linux-${ARCH}-v${CNI_VERSION}.tgz" CNI_URL="https://github.com/containernetworking/plugins/releases/download/v${CNI_VERSION}/${CNI_TAR}" @@ -322,7 +322,7 @@ func NewContainerd(env v1alpha1.Environment) *Containerd { var version string if env.Spec.ContainerRuntime.Version == "" { - version = "1.6.27" + version = "1.7.26" } else { // remove the 'v' prefix from the version if it exists version = strings.TrimPrefix(env.Spec.ContainerRuntime.Version, "v") diff --git a/pkg/provisioner/templates/containerd_test.go b/pkg/provisioner/templates/containerd_test.go index 839fbf55f..bd842a441 100644 --- a/pkg/provisioner/templates/containerd_test.go +++ b/pkg/provisioner/templates/containerd_test.go @@ -11,8 +11,8 @@ import ( func TestNewContainerd_Defaults(t *testing.T) { env := v1alpha1.Environment{} c := NewContainerd(env) - if c.Version != "1.6.27" { - t.Errorf("expected default Version to be '1.6.27', got '%s'", c.Version) + if c.Version != "1.7.26" { + t.Errorf("expected default Version to be '1.7.26', got '%s'", c.Version) } } @@ -39,8 +39,8 @@ func TestNewContainerd_EmptyVersion(t *testing.T) { }, } c := NewContainerd(env) - if c.Version != "1.6.27" { - t.Errorf("expected default Version to be '1.6.27' when empty, got '%s'", c.Version) + if c.Version != "1.7.26" { + t.Errorf("expected default Version to be '1.7.26' when empty, got '%s'", c.Version) } } @@ -62,7 +62,7 @@ func TestContainerd_Execute_Version1(t *testing.T) { env := v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ ContainerRuntime: v1alpha1.ContainerRuntime{ - Version: "1.6.27", + Version: "1.7.26", }, }, } @@ -138,7 +138,7 @@ func TestContainerd_Execute_SystemChecks(t *testing.T) { env := v1alpha1.Environment{ Spec: v1alpha1.EnvironmentSpec{ ContainerRuntime: v1alpha1.ContainerRuntime{ - Version: "1.6.27", + Version: "1.7.26", }, }, } diff --git a/pkg/provisioner/templates/kubernetes.go b/pkg/provisioner/templates/kubernetes.go index 79d2586db..127f71a32 100644 --- a/pkg/provisioner/templates/kubernetes.go +++ b/pkg/provisioner/templates/kubernetes.go @@ -93,7 +93,7 @@ with_retry 3 10s sudo kubeadm init \ --ignore-preflight-errors=all {{- else }} # Using kubeadm config file for newer Kubernetes versions -with_retry 3 10s sudo kubeadm init --config /etc/kubernetes/kubeadm-config.yaml +with_retry 3 10s sudo kubeadm init --config /etc/kubernetes/kubeadm-config.yaml --ignore-preflight-errors=all {{- end }} mkdir -p $HOME/.kube @@ -101,28 +101,31 @@ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config export KUBECONFIG="${HOME}/.kube/config" +# Wait explicitly for kube-apiserver availability +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG version + # Install Calico # based on https://docs.tigera.io/calico/latest/getting-started/kubernetes/quickstart -with_retry 5 10s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG create -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/tigera-operator.yaml # Wait for Tigera operator to be ready -with_retry 5 10s kubectl --kubeconfig $KUBECONFIG wait --for=condition=available --timeout=300s deployment/tigera-operator -n tigera-operator +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG wait --for=condition=available --timeout=300s deployment/tigera-operator -n tigera-operator # Wait for all necessary CRDs to be established -with_retry 5 10s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/installations.operator.tigera.io -with_retry 5 10s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/apiservers.operator.tigera.io -with_retry 5 10s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/tigerastatuses.operator.tigera.io +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/installations.operator.tigera.io +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/apiservers.operator.tigera.io +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG wait --for=condition=established --timeout=300s crd/tigerastatuses.operator.tigera.io # Apply custom resources with increased retry attempts -with_retry 10 15s kubectl --kubeconfig $KUBECONFIG apply -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml - -# Wait for cluster to be ready -with_retry 10 20s kubectl --kubeconfig $KUBECONFIG wait --for=condition=ready --timeout=300s nodes --all +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG apply -f https://raw.githubusercontent.com/projectcalico/calico/${CALICO_VERSION}/manifests/custom-resources.yaml # Make single-node cluster schedulable -kubectl taint nodes --all node-role.kubernetes.io/control-plane:NoSchedule- -kubectl label node --all node-role.kubernetes.io/worker= -kubectl label node --all nvidia.com/holodeck.managed=true +with_retry 10 30s kubectl taint nodes --all node-role.kubernetes.io/control-plane:NoSchedule- +with_retry 10 30s kubectl label node --all node-role.kubernetes.io/worker= +with_retry 10 30s kubectl label node --all nvidia.com/holodeck.managed=true + +# Wait for cluster to be ready +with_retry 10 30s kubectl --kubeconfig $KUBECONFIG wait --for=condition=ready --timeout=300s nodes --all ` const KindTemplate = ` @@ -168,11 +171,14 @@ echo "ssh -i ubuntu@${INSTANCE_ENDPOINT_HOST}" const microk8sTemplate = ` : ${INSTANCE_ENDPOINT_HOST:={{.K8sEndpointHost}}} +: ${K8S_VERSION:={{.Version}}} + +# Remove leading 'v' from version if present for microk8s snap channel +MICROK8S_VERSION="${K8S_VERSION#v}" # Install microk8s sudo apt-get update - -sudo snap install microk8s --classic --channel={{.Version}} +sudo snap install microk8s --classic --channel=${MICROK8S_VERSION} sudo microk8s enable gpu dashboard dns registry sudo usermod -a -G microk8s ubuntu mkdir -p ~/.kube @@ -181,7 +187,7 @@ sudo microk8s config > ~/.kube/config sudo chown -f -R ubuntu ~/.kube sudo snap alias microk8s.kubectl kubectl -echo "Microk8s {{.Version}} installed successfully" +echo "Microk8s ${MICROK8S_VERSION} installed successfully" echo "you can now access the cluster with:" echo "ssh -i ubuntu@${INSTANCE_ENDPOINT_HOST}" ` @@ -269,14 +275,16 @@ type KubeadmConfig struct { } func NewKubernetes(env v1alpha1.Environment) (*Kubernetes, error) { - kubernetes := &Kubernetes{ - Version: env.Spec.Kubernetes.KubernetesVersion, - } - // check if env.Spec.Kubernetes.KubernetesVersion is in the format of vX.Y.Z - // if not, set the default version - if !strings.HasPrefix(env.Spec.Kubernetes.KubernetesVersion, "v") && env.Spec.Kubernetes.KubernetesInstaller != "microk8s" { - fmt.Printf("Kubernetes version %s is not in the format of vX.Y.Z, setting default version v1.32.1\n", env.Spec.Kubernetes.KubernetesVersion) + kubernetes := &Kubernetes{} + + // Normalize Kubernetes version: always ensure it starts with 'v' + switch { + case env.Spec.Kubernetes.KubernetesVersion == "": kubernetes.Version = defaultKubernetesVersion + case !strings.HasPrefix(env.Spec.Kubernetes.KubernetesVersion, "v"): + kubernetes.Version = "v" + env.Spec.Kubernetes.KubernetesVersion + default: + kubernetes.Version = env.Spec.Kubernetes.KubernetesVersion } if env.Spec.Kubernetes.KubeletReleaseVersion != "" { kubernetes.KubeletReleaseVersion = env.Spec.Kubernetes.KubeletReleaseVersion diff --git a/tests/Makefile b/tests/Makefile index 124deab00..cd3740f4b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -27,7 +27,7 @@ test: $(GINKGO_BIN) CI=$(CI) \ ENV_FILE=$(ENV_FILE) \ GINKGO_FOCUS=$(GINKGO_FOCUS) \ - $(GINKGO_BIN) $(GINKGO_ARGS) -v --json-report ginkgo.json ./tests/... + $(GINKGO_BIN) $(GINKGO_ARGS) -v ./tests/... $(GINKGO_BIN): mkdir -p $(CURDIR)/bin diff --git a/tests/aws_test.go b/tests/aws_test.go index ed0c66035..abe77a0f3 100644 --- a/tests/aws_test.go +++ b/tests/aws_test.go @@ -33,58 +33,41 @@ import ( "github.com/NVIDIA/holodeck/tests/common" ) +// Test configuration structure +type testConfig struct { + name string + filePath string + description string +} + +// Test state structure +type testState struct { + opts struct { + cachePath string + cachefile string + cfg v1alpha1.Environment + } + provider provider.Provider + log *logger.FunLogger + ctx context.Context +} + // AWSEnvironmentTests contains end-to-end tests for AWS environment provisioning and management. // These tests verify the complete lifecycle of AWS environments, including: // - Environment creation and validation // - Kubernetes cluster setup (when enabled) // - Resource provisioning and cleanup // - Configuration validation -var _ = Describe("AWS Environment", func() { - // Test configuration structure - type testConfig struct { - name string - filePath string - description string - } - - // Test state structure - type testState struct { - opts struct { - cachePath string - cachefile string - cfg v1alpha1.Environment - } - provider provider.Provider - log *logger.FunLogger - ctx context.Context - } +var _ = DescribeTable("AWS Environment E2E", + func(config testConfig) { + GinkgoWriter.Println("=== Starting test:", config.name, "===") - // Define test configurations - testConfigs := []testConfig{ - { - name: "Default AWS Test", - filePath: filepath.Join(packagePath, "data", "test_aws.yml"), - description: "Tests basic AWS environment setup with default configuration", - }, - { - name: "Legacy Kubernetes Test", - filePath: filepath.Join(packagePath, "data", "test_aws_legacy.yml"), - description: "Tests AWS environment with legacy Kubernetes version", - }, - { - name: "DRA Enabled Test", - filePath: filepath.Join(packagePath, "data", "test_aws_dra.yml"), - description: "Tests AWS environment with Dynamic Resource Allocation enabled", - }, - { - name: "Kernel Features Test", - filePath: filepath.Join(packagePath, "data", "test_aws_kernel.yml"), - description: "Tests AWS environment with kernel features enabled", - }, - } + // Generate a unique artifact directory for this test + uniqueID := common.GenerateUID() + artifactDir := filepath.Join(LogArtifactDir, config.name+"-"+uniqueID) + Expect(os.MkdirAll(artifactDir, 0750)).To(Succeed(), "Failed to create artifact directory") - // Shared setup function - setupTest := func(config testConfig) testState { + // Setup state := testState{ ctx: context.Background(), log: logger.NewLogger(), @@ -95,145 +78,104 @@ var _ = Describe("AWS Environment", func() { Expect(err).NotTo(HaveOccurred(), "Failed to read config file: %s", config.filePath) // Set unique name for the environment - cfg.Name = cfg.Name + "-" + common.GenerateUID() + cfg.Name = cfg.Name + "-" + uniqueID - // Setup cache directory and file - state.opts.cachePath = LogArtifactDir + // Setup unique cache file + state.opts.cachePath = artifactDir state.opts.cachefile = filepath.Join(state.opts.cachePath, cfg.Name+".yaml") - // Create cache directory if it doesn't exist - Expect(os.MkdirAll(state.opts.cachePath, 0750)).To(Succeed(), "Failed to create cache directory") - // Initialize provider state.provider, err = newProvider(state.log, cfg, state.opts.cachefile) Expect(err).NotTo(HaveOccurred(), "Failed to initialize provider") - state.opts.cfg = cfg - return state - } - // Shared cleanup function - cleanupTest := func(state testState) { - if !CurrentSpecReport().Failed() { - Expect(os.Remove(state.opts.cachefile)).To(Succeed(), "Failed to remove cache file") - } - } + // Cleanup: remove cache file and artifact dir if test passes + DeferCleanup(func() { + if !CurrentSpecReport().Failed() { + err := os.RemoveAll(artifactDir) + Expect(err).NotTo(HaveOccurred(), "Failed to remove artifact directory") + } + }) - // Run each test configuration sequentially to ensure proper resource management - // and avoid potential conflicts between concurrent test runs - for _, config := range testConfigs { - config := config // Create a new variable to avoid closure issues - When("testing "+config.name, Ordered, func() { - var state testState - - BeforeAll(func() { - state = setupTest(config) - }) - - AfterAll(func() { - cleanupTest(state) - }) - - Describe("Configuration Validation", func() { - When("validating the provider configuration", func() { - It("should validate the provider configuration", func() { - Expect(state.provider.DryRun()).To(Succeed(), "Provider validation failed") - }) - - It("should validate the provisioner configuration", func() { - Expect(provisioner.Dryrun(state.log, state.opts.cfg)).To(Succeed(), "Provisioner validation failed") - }) - }) - - When("validating the environment configuration", func() { - It("should have valid instance type", func() { - Expect(state.opts.cfg.Spec.Instance.Type).NotTo(BeEmpty(), "Instance type should not be empty") - }) - - It("should have valid region", func() { - Expect(state.opts.cfg.Spec.Instance.Region).NotTo(BeEmpty(), "Region should not be empty") - }) - - It("should have valid ingress IP ranges", func() { - Expect(state.opts.cfg.Spec.Instance.IngresIpRanges).NotTo(BeEmpty(), "Ingress IP ranges should not be empty") - }) - }) - }) - - Describe("Environment Management", func() { - When("creating the environment", func() { - AfterAll(func() { - // Ensure environment cleanup even if test fails - Expect(state.provider.Delete()).To(Succeed(), "Failed to delete environment") - }) - - It("should create the environment successfully", func() { - state.opts.cfg.Spec.PrivateKey = sshKey - state.opts.cfg.Spec.Username = "ubuntu" - Expect(state.provider.Create()).To(Succeed(), "Failed to create environment") - }) - - It("should have valid environment name", func() { - Expect(state.opts.cfg.Name).NotTo(BeEmpty(), "Environment name should not be empty") - }) - It("should provision the environment successfully", func() { - By("Reading the environment file") - env, err := jyaml.UnmarshalFromFile[v1alpha1.Environment](state.opts.cachefile) - Expect(err).NotTo(HaveOccurred(), "Failed to read environment file") - - var hostUrl string - for _, p := range env.Status.Properties { - if p.Name == aws.PublicDnsName { - hostUrl = p.Value - break - } - } - Expect(hostUrl).NotTo(BeEmpty(), "Host URL should not be empty") - - By("Provisioning the environment") - p, err := provisioner.New(state.log, state.opts.cfg.Spec.PrivateKey, state.opts.cfg.Spec.Username, hostUrl) - Expect(err).NotTo(HaveOccurred(), "Failed to create provisioner") - - // Ensure client is properly closed after test - defer func() { - if p.Client != nil { - // Try to create a new session to check if connection is alive - session, err := p.Client.NewSession() - if err == nil { - session.Close() // nolint:errcheck, gosec - // Connection is alive, close it - if err := p.Client.Close(); err != nil { - Expect(err).NotTo(HaveOccurred(), "Failed to close ssh client") - } - } - // If we get here, either the connection was already closed or we couldn't create a session - p.Client = nil - } - }() - - By("Running the provisioner") - Expect(p.Run(env)).To(Succeed(), "Failed to provision environment") - }) - }) - }) - - Describe("Kubernetes Configuration", func() { - When("kubernetes is enabled", func() { - BeforeEach(func() { - if state.opts.cfg.Spec.Kubernetes.KubernetesVersion == "" { - Skip("Skipping test: Kubernetes version not specified in environment file") - } - }) - - It("should have valid kubernetes version", func() { - Expect(state.opts.cfg.Spec.Kubernetes.KubernetesVersion).NotTo(BeEmpty(), "Kubernetes version should not be empty") - }) - - It("should have valid kubernetes installer", func() { - Expect(state.opts.cfg.Spec.Kubernetes.KubernetesInstaller).NotTo(BeEmpty(), "Kubernetes installer should not be empty") - }) - }) - }) + // --- Test logic (copied from original) --- + By("Configuration Validation") + Expect(state.provider.DryRun()).To(Succeed(), "Provider validation failed") + Expect(provisioner.Dryrun(state.log, state.opts.cfg)).To(Succeed(), "Provisioner validation failed") + Expect(state.opts.cfg.Spec.Instance.Type).NotTo(BeEmpty(), "Instance type should not be empty") + Expect(state.opts.cfg.Spec.Instance.Region).NotTo(BeEmpty(), "Region should not be empty") + Expect(state.opts.cfg.Spec.Instance.IngresIpRanges).NotTo(BeEmpty(), "Ingress IP ranges should not be empty") + + By("Environment Management") + // Ensure environment cleanup even if test fails + DeferCleanup(func() { + Expect(state.provider.Delete()).To(Succeed(), "Failed to delete environment") }) - } + + state.opts.cfg.Spec.PrivateKey = sshKey + state.opts.cfg.Spec.Username = "ubuntu" + Expect(state.provider.Create()).To(Succeed(), "Failed to create environment") + Expect(state.opts.cfg.Name).NotTo(BeEmpty(), "Environment name should not be empty") + + By("Provisioning the environment") + env, err := jyaml.UnmarshalFromFile[v1alpha1.Environment](state.opts.cachefile) + Expect(err).NotTo(HaveOccurred(), "Failed to read environment file") + var hostUrl string + for _, p := range env.Status.Properties { + if p.Name == aws.PublicDnsName { + hostUrl = p.Value + break + } + } + Expect(hostUrl).NotTo(BeEmpty(), "Host URL should not be empty") + p, err := provisioner.New(state.log, state.opts.cfg.Spec.PrivateKey, state.opts.cfg.Spec.Username, hostUrl) + Expect(err).NotTo(HaveOccurred(), "Failed to create provisioner") + defer func() { + if p.Client != nil { + session, err := p.Client.NewSession() + if err == nil { + session.Close() // nolint:errcheck, gosec + if err := p.Client.Close(); err != nil { + Expect(err).NotTo(HaveOccurred(), "Failed to close ssh client") + } + } + p.Client = nil + } + }() + Expect(p.Run(env)).To(Succeed(), "Failed to provision environment") + + By("Kubernetes Configuration") + if state.opts.cfg.Spec.Kubernetes.KubernetesVersion != "" { + Expect(state.opts.cfg.Spec.Kubernetes.KubernetesVersion).NotTo(BeEmpty(), "Kubernetes version should not be empty") + Expect(state.opts.cfg.Spec.Kubernetes.KubernetesInstaller).NotTo(BeEmpty(), "Kubernetes installer should not be empty") + } else { + Skip("Skipping test: Kubernetes version not specified in environment file") + } + + GinkgoWriter.Println("=== Finished test:", config.name, "===") + }, + Entry("Default AWS Test", testConfig{ + name: "Default AWS Test", + filePath: filepath.Join(packagePath, "data", "test_aws.yml"), + description: "Tests basic AWS environment setup with default configuration", + }, Label("default")), + Entry("Legacy Kubernetes Test", testConfig{ + name: "Legacy Kubernetes Test", + filePath: filepath.Join(packagePath, "data", "test_aws_legacy.yml"), + description: "Tests AWS environment with legacy Kubernetes version", + }, Label("legacy")), + Entry("DRA Enabled Test", testConfig{ + name: "DRA Enabled Test", + filePath: filepath.Join(packagePath, "data", "test_aws_dra.yml"), + description: "Tests AWS environment with Dynamic Resource Allocation enabled", + }, Label("dra")), + Entry("Kernel Features Test", testConfig{ + name: "Kernel Features Test", + filePath: filepath.Join(packagePath, "data", "test_aws_kernel.yml"), + description: "Tests AWS environment with kernel features enabled", + }, Label("kernel")), +) + +// Mark the table as parallel +var _ = BeforeEach(func() { + GinkgoParallelNode() // This ensures the test runs in parallel; Ginkgo v2 uses Parallel() as a method, but this is a no-op if not in a container }) diff --git a/tests/data/test_aws_dra.yml b/tests/data/test_aws_dra.yml index 05ab39871..b5d903d0f 100644 --- a/tests/data/test_aws_dra.yml +++ b/tests/data/test_aws_dra.yml @@ -26,6 +26,6 @@ spec: kubernetes: install: true installer: kubeadm - kubernetesVersion: v1.32.1 + version: v1.32.1 k8sFeatureGates: - DynamicResourceAllocation=true diff --git a/tests/data/test_aws_legacy.yml b/tests/data/test_aws_legacy.yml index c48563fc4..1b703742c 100644 --- a/tests/data/test_aws_legacy.yml +++ b/tests/data/test_aws_legacy.yml @@ -26,4 +26,4 @@ spec: kubernetes: install: true installer: kubeadm - kubernetesVersion: v1.29.0 + version: v1.29.0 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md index d749f99c7..e9b31c9b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md @@ -1,3 +1,11 @@ +# v1.224.0 (2025-05-28) + +* **Feature**: Enable the option to automatically delete underlying Amazon EBS snapshots when deregistering Amazon Machine Images (AMIs) + +# v1.223.0 (2025-05-27) + +* **Feature**: This release adds three features - option to store AWS Site-to-Site VPN pre-shared keys in AWS Secrets Manager, GetActiveVpnTunnelStatus API to check the in-use VPN algorithms, and SampleType option in GetVpnConnectionDeviceSampleConfiguration API to get recommended sample configs for VPN devices. + # v1.222.0 (2025-05-23) * **Feature**: This release adds support for the C7i-flex, M7i-flex, I7i, I7ie, I8g, P6-b200, Trn2, C8gd, M8gd and R8gd instances diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go index 22cc54a19..2aa359a6e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go @@ -24,11 +24,11 @@ import ( // by default using the default encryption key for the Region or the key that you // specify. Outposts do not support unencrypted snapshots. // -// For information about the prerequisites when copying an AMI, see [Copy an AMI] in the Amazon +// For information about the prerequisites when copying an AMI, see [Copy an Amazon EC2 AMI] in the Amazon // EC2 User Guide. // // [CreateStoreImageTask]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html -// [Copy an AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html +// [Copy an Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html func (c *Client) CopyImage(ctx context.Context, params *CopyImageInput, optFns ...func(*Options)) (*CopyImageOutput, error) { if params == nil { params = &CopyImageInput{} @@ -63,9 +63,9 @@ type CopyImageInput struct { SourceRegion *string // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see [Ensuring idempotency]in the Amazon EC2 API Reference. + // request. For more information, see [Ensuring idempotency in Amazon EC2 API requests]in the Amazon EC2 API Reference. // - // [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html + // [Ensuring idempotency in Amazon EC2 API requests]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html ClientToken *string // Indicates whether to include your user-defined AMI tags when copying the AMI. @@ -146,9 +146,9 @@ type CopyImageInput struct { // If you do not specify a value, the AMI copy operation is completed on a // best-effort basis. // - // For more information, see [Time-based copies]. + // For more information, see [Time-based copies for Amazon EBS snapshots and EBS-backed AMIs]. // - // [Time-based copies]: https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html + // [Time-based copies for Amazon EBS snapshots and EBS-backed AMIs]: https://docs.aws.amazon.com/ebs/latest/userguide/time-based-copies.html SnapshotCopyCompletionDurationMinutes *int64 // The tags to apply to the new AMI and new snapshots. You can tag the AMI, the diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go index 38fe4ff75..7c4b98fea 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go @@ -19,9 +19,9 @@ import ( // mapping information for those volumes. When you launch an instance from this new // AMI, the instance automatically launches with those additional volumes. // -// For more information, see [Create an Amazon EBS-backed Linux AMI] in the Amazon Elastic Compute Cloud User Guide. +// For more information, see [Create an Amazon EBS-backed AMI] in the Amazon Elastic Compute Cloud User Guide. // -// [Create an Amazon EBS-backed Linux AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html +// [Create an Amazon EBS-backed AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html func (c *Client) CreateImage(ctx context.Context, params *CreateImageInput, optFns ...func(*Options)) (*CreateImageOutput, error) { if params == nil { params = &CreateImageInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go index 3bb8fa328..f9d97153f 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go @@ -15,13 +15,13 @@ import ( // created by using [CreateStoreImageTask]. // // To use this API, you must have the required permissions. For more information, -// see [Permissions for storing and restoring AMIs using Amazon S3]in the Amazon EC2 User Guide. +// see [Permissions for storing and restoring AMIs using S3]in the Amazon EC2 User Guide. // -// For more information, see [Store and restore an AMI using Amazon S3] in the Amazon EC2 User Guide. +// For more information, see [Store and restore an AMI using S3] in the Amazon EC2 User Guide. // // [CreateStoreImageTask]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html -// [Store and restore an AMI using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html -// [Permissions for storing and restoring AMIs using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions +// [Store and restore an AMI using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html +// [Permissions for storing and restoring AMIs using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-ami-store-restore.html#ami-s3-permissions func (c *Client) CreateRestoreImageTask(ctx context.Context, params *CreateRestoreImageTaskInput, optFns ...func(*Options)) (*CreateRestoreImageTaskOutput, error) { if params == nil { params = &CreateRestoreImageTaskInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go index 355a02112..2d604b130 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go @@ -14,12 +14,12 @@ import ( // Stores an AMI as a single object in an Amazon S3 bucket. // // To use this API, you must have the required permissions. For more information, -// see [Permissions for storing and restoring AMIs using Amazon S3]in the Amazon EC2 User Guide. +// see [Permissions for storing and restoring AMIs using S3]in the Amazon EC2 User Guide. // -// For more information, see [Store and restore an AMI using Amazon S3] in the Amazon EC2 User Guide. +// For more information, see [Store and restore an AMI using S3] in the Amazon EC2 User Guide. // -// [Store and restore an AMI using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html -// [Permissions for storing and restoring AMIs using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions +// [Store and restore an AMI using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html +// [Permissions for storing and restoring AMIs using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-ami-store-restore.html#ami-s3-permissions func (c *Client) CreateStoreImageTask(ctx context.Context, params *CreateStoreImageTaskInput, optFns ...func(*Options)) (*CreateStoreImageTaskOutput, error) { if params == nil { params = &CreateStoreImageTaskInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go index 1661a4572..e60f03f00 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go @@ -69,6 +69,11 @@ type CreateVpnConnectionInput struct { // The options for the VPN connection. Options *types.VpnConnectionOptionsSpecification + // Specifies the storage mode for the pre-shared key (PSK). Valid values are + // Standard " (stored in the Site-to-Site VPN service) or SecretsManager (stored + // in Amazon Web Services Secrets Manager). + PreSharedKeyStorage *string + // The tags to apply to the VPN connection. TagSpecifications []types.TagSpecification diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go index e2030693d..245f8372e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) @@ -17,16 +18,20 @@ import ( // to the Recycle Bin for the specified retention period. It can be restored before // its retention period expires, after which it is permanently deleted. If the // deregistered AMI doesn't match a retention rule, it is permanently deleted -// immediately. For more information, see [Recycle Bin]in the Amazon EBS User Guide. +// immediately. For more information, see [Recover deleted Amazon EBS snapshots and EBS-backed AMIs with Recycle Bin]in the Amazon EBS User Guide. +// +// When deregistering an EBS-backed AMI, you can optionally delete its associated +// snapshots at the same time. However, if a snapshot is associated with multiple +// AMIs, it won't be deleted even if specified for deletion, although the AMI will +// still be deregistered. // // Deregistering an AMI does not delete the following: // // - Instances already launched from the AMI. You'll continue to incur usage // costs for the instances until you terminate them. // -// - For EBS-backed AMIs: The snapshots that were created of the root and data -// volumes of the instance during AMI creation. You'll continue to incur snapshot -// storage costs. +// - For EBS-backed AMIs: Snapshots that are associated with multiple AMIs. +// You'll continue to incur snapshot storage costs. // // - For instance store-backed AMIs: The files uploaded to Amazon S3 during AMI // creation. You'll continue to incur S3 storage costs. @@ -34,7 +39,7 @@ import ( // For more information, see [Deregister an Amazon EC2 AMI] in the Amazon EC2 User Guide. // // [Deregister an Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html -// [Recycle Bin]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html +// [Recover deleted Amazon EBS snapshots and EBS-backed AMIs with Recycle Bin]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html func (c *Client) DeregisterImage(ctx context.Context, params *DeregisterImageInput, optFns ...func(*Options)) (*DeregisterImageOutput, error) { if params == nil { params = &DeregisterImageInput{} @@ -58,6 +63,15 @@ type DeregisterImageInput struct { // This member is required. ImageId *string + // Specifies whether to delete the snapshots associated with the AMI during + // deregistration. + // + // If a snapshot is associated with multiple AMIs, it is not deleted, regardless + // of this setting. + // + // Default: The snapshots are not deleted. + DeleteAssociatedSnapshots *bool + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have the // required permissions, the error response is DryRunOperation . Otherwise, it is @@ -68,6 +82,14 @@ type DeregisterImageInput struct { } type DeregisterImageOutput struct { + + // The deletion result for each snapshot associated with the AMI, including the + // snapshot ID and its success or error code. + DeleteSnapshotResults []types.DeleteSnapshotReturnCode + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go index c8c98eb35..04a844ac0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go @@ -115,9 +115,9 @@ type DescribeImageAttributeOutput struct { // Base64 representation of the non-volatile UEFI variable store. To retrieve the // UEFI data, use the [GetInstanceUefiData]command. You can inspect and modify the UEFI data by using - // the [python-uefivars tool]on GitHub. For more information, see [UEFI Secure Boot] in the Amazon EC2 User Guide. + // the [python-uefivars tool]on GitHub. For more information, see [UEFI Secure Boot for Amazon EC2 instances] in the Amazon EC2 User Guide. // - // [UEFI Secure Boot]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html + // [UEFI Secure Boot for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html // [GetInstanceUefiData]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData // [python-uefivars tool]: https://github.com/awslabs/python-uefivars UefiData *types.AttributeValue diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go index 46a28ff7e..c0b00346a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go @@ -26,12 +26,12 @@ import ( // past 31 days can be viewed. // // To use this API, you must have the required permissions. For more information, -// see [Permissions for storing and restoring AMIs using Amazon S3]in the Amazon EC2 User Guide. +// see [Permissions for storing and restoring AMIs using S3]in the Amazon EC2 User Guide. // -// For more information, see [Store and restore an AMI using Amazon S3] in the Amazon EC2 User Guide. +// For more information, see [Store and restore an AMI using S3] in the Amazon EC2 User Guide. // -// [Store and restore an AMI using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html -// [Permissions for storing and restoring AMIs using Amazon S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions +// [Store and restore an AMI using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html +// [Permissions for storing and restoring AMIs using S3]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-ami-store-restore.html#ami-s3-permissions func (c *Client) DescribeStoreImageTasks(ctx context.Context, params *DescribeStoreImageTasksInput, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) { if params == nil { params = &DescribeStoreImageTasksInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go index d4dc61be3..11315eeb1 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go @@ -22,7 +22,7 @@ import ( // // For more information, see [Block public access to your AMIs] in the Amazon EC2 User Guide. // -// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis +// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-to-amis.html // [GetImageBlockPublicAccessState]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html func (c *Client) DisableImageBlockPublicAccess(ctx context.Context, params *DisableImageBlockPublicAccessInput, optFns ...func(*Options)) (*DisableImageBlockPublicAccessOutput, error) { if params == nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go index 234dfde61..d563db90a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go @@ -12,9 +12,9 @@ import ( // Cancels the deprecation of the specified AMI. // -// For more information, see [Deprecate an AMI] in the Amazon EC2 User Guide. +// For more information, see [Deprecate an Amazon EC2 AMI] in the Amazon EC2 User Guide. // -// [Deprecate an AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html +// [Deprecate an Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html func (c *Client) DisableImageDeprecation(ctx context.Context, params *DisableImageDeprecationInput, optFns ...func(*Options)) (*DisableImageDeprecationOutput, error) { if params == nil { params = &DisableImageDeprecationInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeregistrationProtection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeregistrationProtection.go index 95068d3ca..245b7e158 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeregistrationProtection.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeregistrationProtection.go @@ -17,9 +17,9 @@ import ( // deregistration protection for the AMI, then, when you disable deregistration // protection, you won’t immediately be able to deregister the AMI. // -// For more information, see [Protect an AMI from deregistration] in the Amazon EC2 User Guide. +// For more information, see [Protect an Amazon EC2 AMI from deregistration] in the Amazon EC2 User Guide. // -// [Protect an AMI from deregistration]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html#ami-deregistration-protection +// [Protect an Amazon EC2 AMI from deregistration]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deregistration-protection.html func (c *Client) DisableImageDeregistrationProtection(ctx context.Context, params *DisableImageDeregistrationProtectionInput, optFns ...func(*Options)) (*DisableImageDeregistrationProtectionOutput, error) { if params == nil { params = &DisableImageDeregistrationProtectionInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go index 1ce5221d2..94afc1ea4 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go @@ -18,9 +18,9 @@ import ( // // Only the AMI owner can re-enable a disabled AMI. // -// For more information, see [Disable an AMI] in the Amazon EC2 User Guide. +// For more information, see [Disable an Amazon EC2 AMI] in the Amazon EC2 User Guide. // -// [Disable an AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html +// [Disable an Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html func (c *Client) EnableImage(ctx context.Context, params *EnableImageInput, optFns ...func(*Options)) (*EnableImageOutput, error) { if params == nil { params = &EnableImageInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go index 7209bc43b..920979dd8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go @@ -21,7 +21,7 @@ import ( // // For more information, see [Block public access to your AMIs] in the Amazon EC2 User Guide. // -// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis +// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-to-amis.html // [GetImageBlockPublicAccessState]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html func (c *Client) EnableImageBlockPublicAccess(ctx context.Context, params *EnableImageBlockPublicAccessInput, optFns ...func(*Options)) (*EnableImageBlockPublicAccessOutput, error) { if params == nil { diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeregistrationProtection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeregistrationProtection.go index 8e75e272b..e4bc17644 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeregistrationProtection.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeregistrationProtection.go @@ -16,9 +16,9 @@ import ( // To allow the AMI to be deregistered, you must first disable deregistration // protection using DisableImageDeregistrationProtection. // -// For more information, see [Protect an AMI from deregistration] in the Amazon EC2 User Guide. +// For more information, see [Protect an Amazon EC2 AMI from deregistration] in the Amazon EC2 User Guide. // -// [Protect an AMI from deregistration]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html#ami-deregistration-protection +// [Protect an Amazon EC2 AMI from deregistration]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deregistration-protection.html func (c *Client) EnableImageDeregistrationProtection(ctx context.Context, params *EnableImageDeregistrationProtectionInput, optFns ...func(*Options)) (*EnableImageDeregistrationProtectionOutput, error) { if params == nil { params = &EnableImageDeregistrationProtectionInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetActiveVpnTunnelStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetActiveVpnTunnelStatus.go new file mode 100644 index 000000000..b291830f2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetActiveVpnTunnelStatus.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the currently negotiated security parameters for an active VPN tunnel, +// including IKE version, DH groups, encryption algorithms, and integrity +// algorithms. +func (c *Client) GetActiveVpnTunnelStatus(ctx context.Context, params *GetActiveVpnTunnelStatusInput, optFns ...func(*Options)) (*GetActiveVpnTunnelStatusOutput, error) { + if params == nil { + params = &GetActiveVpnTunnelStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetActiveVpnTunnelStatus", params, optFns, c.addOperationGetActiveVpnTunnelStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetActiveVpnTunnelStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetActiveVpnTunnelStatusInput struct { + + // The ID of the VPN connection for which to retrieve the active tunnel status. + // + // This member is required. + VpnConnectionId *string + + // The external IP address of the VPN tunnel for which to retrieve the active + // status. + // + // This member is required. + VpnTunnelOutsideIpAddress *string + + // Checks whether you have the required permissions for the action, without + // actually making the request. + DryRun *bool + + noSmithyDocumentSerde +} + +type GetActiveVpnTunnelStatusOutput struct { + + // Information about the current security configuration of the VPN tunnel. + ActiveVpnTunnelStatus *types.ActiveVpnTunnelStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetActiveVpnTunnelStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsEc2query_serializeOpGetActiveVpnTunnelStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetActiveVpnTunnelStatus{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetActiveVpnTunnelStatus"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpGetActiveVpnTunnelStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetActiveVpnTunnelStatus(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetActiveVpnTunnelStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetActiveVpnTunnelStatus", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go index ed6bb30c3..b6b4439e0 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go @@ -16,7 +16,7 @@ import ( // // For more information, see [Block public access to your AMIs] in the Amazon EC2 User Guide. // -// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis +// [Block public access to your AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-to-amis.html func (c *Client) GetImageBlockPublicAccessState(ctx context.Context, params *GetImageBlockPublicAccessStateInput, optFns ...func(*Options)) (*GetImageBlockPublicAccessStateOutput, error) { if params == nil { params = &GetImageBlockPublicAccessStateInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go index f715998b1..a300f935e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go @@ -50,6 +50,11 @@ type GetVpnConnectionDeviceSampleConfigurationInput struct { // gateway device. You can specify one of the following versions: ikev1 or ikev2 . InternetKeyExchangeVersion *string + // The type of sample configuration to generate. Valid values are "compatibility" + // (includes IKEv1) or "recommended" (throws UnsupportedOperationException for + // IKEv1). + SampleType *string + noSmithyDocumentSerde } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go index 5659a47d1..16ebe0c17 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go @@ -55,6 +55,11 @@ type ModifyVpnTunnelOptionsInput struct { // UnauthorizedOperation . DryRun *bool + // Specifies the storage mode for the pre-shared key (PSK). Valid values are + // Standard (stored in Site-to-Site VPN service) or SecretsManager (stored in + // Amazon Web Services Secrets Manager). + PreSharedKeyStorage *string + // Choose whether or not to trigger immediate tunnel replacement. This is only // applicable when turning on or off EnableTunnelLifecycleControl . // diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go index d055e7e26..0daabd0b6 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go @@ -32,7 +32,7 @@ import ( // mapping. If the snapshot is encrypted, or encryption by default is enabled, the // root volume of an instance launched from the AMI is encrypted. // -// For more information, see [Create an AMI from a snapshot] and [Use encryption with Amazon EBS-backed AMIs] in the Amazon EC2 User Guide. +// For more information, see [Create an AMI from a snapshot] and [Use encryption with EBS-backed AMIs] in the Amazon EC2 User Guide. // // # Amazon Web Services Marketplace product codes // @@ -59,11 +59,11 @@ import ( // the platform details and billing information of an AMI, see [Understand AMI billing information]in the Amazon EC2 // User Guide. // +// [Use encryption with EBS-backed AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html // [Understand AMI billing information]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html // [Create an instance-store backed AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html // [Create an AMI from an instance]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#how-to-create-ebs-ami // [Create an AMI from a snapshot]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot -// [Use encryption with Amazon EBS-backed AMIs]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html func (c *Client) RegisterImage(ctx context.Context, params *RegisterImageInput, optFns ...func(*Options)) (*RegisterImageOutput, error) { if params == nil { params = &RegisterImageInput{} @@ -103,11 +103,11 @@ type RegisterImageInput struct { // If your account is not authorized to specify billing product codes, you can // publish AMIs that include billable software and list them on the Amazon Web // Services Marketplace. You must first register as a seller on the Amazon Web - // Services Marketplace. For more information, see [Getting started as a seller]and [AMI-based products] in the Amazon Web Services + // Services Marketplace. For more information, see [Getting started as an Amazon Web Services Marketplace seller]and [AMI-based products in Amazon Web Services Marketplace] in the Amazon Web Services // Marketplace Seller Guide. // - // [Getting started as a seller]: https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html - // [AMI-based products]: https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html + // [AMI-based products in Amazon Web Services Marketplace]: https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html + // [Getting started as an Amazon Web Services Marketplace seller]: https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html BillingProducts []string // The block device mapping entries. @@ -118,9 +118,9 @@ type RegisterImageInput struct { // If you create an AMI on an Outpost, then all backing snapshots must be on the // same Outpost or in the Region of that Outpost. AMIs on an Outpost that include // local snapshots can be used to launch instances on the same Outpost only. For - // more information, [Amazon EBS local snapshots on Outposts]in the Amazon EBS User Guide. + // more information, [Create AMIs from local snapshots]in the Amazon EBS User Guide. // - // [Amazon EBS local snapshots on Outposts]: https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami + // [Create AMIs from local snapshots]: https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami BlockDeviceMappings []types.BlockDeviceMapping // The boot mode of the AMI. A value of uefi-preferred indicates that the AMI @@ -129,9 +129,9 @@ type RegisterImageInput struct { // The operating system contained in the AMI must be configured to support the // specified boot mode. // - // For more information, see [Boot modes] in the Amazon EC2 User Guide. + // For more information, see [Instance launch behavior with Amazon EC2 boot modes] in the Amazon EC2 User Guide. // - // [Boot modes]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html + // [Instance launch behavior with Amazon EC2 boot modes]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html BootMode types.BootModeValues // A description for your AMI. @@ -152,10 +152,10 @@ type RegisterImageInput struct { // The full path to your AMI manifest in Amazon S3 storage. The specified bucket // must have the aws-exec-read canned access control list (ACL) to ensure that it - // can be accessed by Amazon EC2. For more information, see [Canned ACLs]in the Amazon S3 + // can be accessed by Amazon EC2. For more information, see [Canned ACL]in the Amazon S3 // Service Developer Guide. // - // [Canned ACLs]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl + // [Canned ACL]: https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl ImageLocation *string // Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched @@ -206,9 +206,9 @@ type RegisterImageInput struct { // Base64 representation of the non-volatile UEFI variable store. To retrieve the // UEFI data, use the [GetInstanceUefiData]command. You can inspect and modify the UEFI data by using - // the [python-uefivars tool]on GitHub. For more information, see [UEFI Secure Boot] in the Amazon EC2 User Guide. + // the [python-uefivars tool]on GitHub. For more information, see [UEFI Secure Boot for Amazon EC2 instances] in the Amazon EC2 User Guide. // - // [UEFI Secure Boot]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html + // [UEFI Secure Boot for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html // [GetInstanceUefiData]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData // [python-uefivars tool]: https://github.com/awslabs/python-uefivars UefiData *string diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go index 1e80d93f9..b590b0143 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go @@ -10,10 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Restores an AMI from the Recycle Bin. For more information, see [Recycle Bin] in the Amazon +// Restores an AMI from the Recycle Bin. For more information, see [Recover deleted Amazon EBS snapshots and EBS-back AMIs with Recycle Bin] in the Amazon // EC2 User Guide. // -// [Recycle Bin]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html +// [Recover deleted Amazon EBS snapshots and EBS-back AMIs with Recycle Bin]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html func (c *Client) RestoreImageFromRecycleBin(ctx context.Context, params *RestoreImageFromRecycleBinInput, optFns ...func(*Options)) (*RestoreImageFromRecycleBinOutput, error) { if params == nil { params = &RestoreImageFromRecycleBinInput{} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go index 8b71baa3a..1a1724dba 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go @@ -44400,6 +44400,101 @@ func awsEc2query_deserializeOpErrorExportVerifiedAccessInstanceClientConfigurati } } +type awsEc2query_deserializeOpGetActiveVpnTunnelStatus struct { +} + +func (*awsEc2query_deserializeOpGetActiveVpnTunnelStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpGetActiveVpnTunnelStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsEc2query_deserializeOpErrorGetActiveVpnTunnelStatus(response, &metadata) + } + output := &GetActiveVpnTunnelStatusOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentGetActiveVpnTunnelStatusOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorGetActiveVpnTunnelStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsEc2query_deserializeOpGetAllowedImagesSettings struct { } @@ -64937,6 +65032,167 @@ func awsEc2query_deserializeDocumentActiveInstanceSetUnwrapped(v *[]types.Active *v = sv return nil } +func awsEc2query_deserializeDocumentActiveVpnTunnelStatus(v **types.ActiveVpnTunnelStatus, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.ActiveVpnTunnelStatus + if *v == nil { + sv = &types.ActiveVpnTunnelStatus{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ikeVersion", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.IkeVersion = ptr.String(xtv) + } + + case strings.EqualFold("phase1DHGroup", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Phase1DHGroup = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("phase1EncryptionAlgorithm", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Phase1EncryptionAlgorithm = ptr.String(xtv) + } + + case strings.EqualFold("phase1IntegrityAlgorithm", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Phase1IntegrityAlgorithm = ptr.String(xtv) + } + + case strings.EqualFold("phase2DHGroup", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Phase2DHGroup = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("phase2EncryptionAlgorithm", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Phase2EncryptionAlgorithm = ptr.String(xtv) + } + + case strings.EqualFold("phase2IntegrityAlgorithm", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Phase2IntegrityAlgorithm = ptr.String(xtv) + } + + case strings.EqualFold("provisioningStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ProvisioningStatus = types.VpnTunnelProvisioningStatus(xtv) + } + + case strings.EqualFold("provisioningStatusReason", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ProvisioningStatusReason = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentAddedPrincipal(v **types.AddedPrincipal, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -78877,6 +79133,136 @@ func awsEc2query_deserializeDocumentDeleteQueuedReservedInstancesError(v **types return nil } +func awsEc2query_deserializeDocumentDeleteSnapshotResultSet(v *[]types.DeleteSnapshotReturnCode, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.DeleteSnapshotReturnCode + if *v == nil { + sv = make([]types.DeleteSnapshotReturnCode, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.DeleteSnapshotReturnCode + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentDeleteSnapshotReturnCode(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentDeleteSnapshotResultSetUnwrapped(v *[]types.DeleteSnapshotReturnCode, decoder smithyxml.NodeDecoder) error { + var sv []types.DeleteSnapshotReturnCode + if *v == nil { + sv = make([]types.DeleteSnapshotReturnCode, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.DeleteSnapshotReturnCode + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentDeleteSnapshotReturnCode(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsEc2query_deserializeDocumentDeleteSnapshotReturnCode(v **types.DeleteSnapshotReturnCode, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DeleteSnapshotReturnCode + if *v == nil { + sv = &types.DeleteSnapshotReturnCode{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("returnCode", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ReturnCode = types.SnapshotReturnCodes(xtv) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentDeprovisionedAddressSet(v *[]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -157427,6 +157813,19 @@ func awsEc2query_deserializeDocumentVpnConnection(v **types.VpnConnection, decod return err } + case strings.EqualFold("preSharedKeyArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PreSharedKeyArn = ptr.String(xtv) + } + case strings.EqualFold("routes", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentVpnStaticRouteList(&sv.Routes, nodeDecoder); err != nil { @@ -169119,6 +169518,28 @@ func awsEc2query_deserializeOpDocumentDeregisterImageOutput(v **DeregisterImageO originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("deleteSnapshotResultSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentDeleteSnapshotResultSet(&sv.DeleteSnapshotResults, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("return", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Return = ptr.Bool(xtv) + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -181867,6 +182288,48 @@ func awsEc2query_deserializeOpDocumentExportVerifiedAccessInstanceClientConfigur return nil } +func awsEc2query_deserializeOpDocumentGetActiveVpnTunnelStatusOutput(v **GetActiveVpnTunnelStatusOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *GetActiveVpnTunnelStatusOutput + if *v == nil { + sv = &GetActiveVpnTunnelStatusOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("activeVpnTunnelStatus", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentActiveVpnTunnelStatus(&sv.ActiveVpnTunnelStatus, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentGetAllowedImagesSettingsOutput(v **GetAllowedImagesSettingsOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json index 29cf55c23..67786f61d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json @@ -486,6 +486,7 @@ "api_op_ExportImage.go", "api_op_ExportTransitGatewayRoutes.go", "api_op_ExportVerifiedAccessInstanceClientConfiguration.go", + "api_op_GetActiveVpnTunnelStatus.go", "api_op_GetAllowedImagesSettings.go", "api_op_GetAssociatedEnclaveCertificateIamRoles.go", "api_op_GetAssociatedIpv6PoolCidrs.go", diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go index 364b3cd95..5be69e25c 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go @@ -3,4 +3,4 @@ package ec2 // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.222.0" +const goModuleVersion = "1.224.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go index 46c179aed..2d119dc66 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go @@ -33268,6 +33268,76 @@ func (m *awsEc2query_serializeOpExportVerifiedAccessInstanceClientConfiguration) return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpGetActiveVpnTunnelStatus struct { +} + +func (*awsEc2query_serializeOpGetActiveVpnTunnelStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpGetActiveVpnTunnelStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetActiveVpnTunnelStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("GetActiveVpnTunnelStatus") + body.Key("Version").String("2016-11-15") + + if err := awsEc2query_serializeOpDocumentGetActiveVpnTunnelStatusInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsEc2query_serializeOpGetAllowedImagesSettings struct { } @@ -64607,6 +64677,11 @@ func awsEc2query_serializeOpDocumentCreateVpnConnectionInput(v *CreateVpnConnect } } + if v.PreSharedKeyStorage != nil { + objectKey := object.Key("PreSharedKeyStorage") + objectKey.String(*v.PreSharedKeyStorage) + } + if v.TagSpecifications != nil { objectKey := object.FlatKey("TagSpecification") if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { @@ -66300,6 +66375,11 @@ func awsEc2query_serializeOpDocumentDeregisterImageInput(v *DeregisterImageInput object := value.Object() _ = object + if v.DeleteAssociatedSnapshots != nil { + objectKey := object.Key("DeleteAssociatedSnapshots") + objectKey.Boolean(*v.DeleteAssociatedSnapshots) + } + if v.DryRun != nil { objectKey := object.Key("DryRun") objectKey.Boolean(*v.DryRun) @@ -73500,6 +73580,28 @@ func awsEc2query_serializeOpDocumentExportVerifiedAccessInstanceClientConfigurat return nil } +func awsEc2query_serializeOpDocumentGetActiveVpnTunnelStatusInput(v *GetActiveVpnTunnelStatusInput, value query.Value) error { + object := value.Object() + _ = object + + if v.DryRun != nil { + objectKey := object.Key("DryRun") + objectKey.Boolean(*v.DryRun) + } + + if v.VpnConnectionId != nil { + objectKey := object.Key("VpnConnectionId") + objectKey.String(*v.VpnConnectionId) + } + + if v.VpnTunnelOutsideIpAddress != nil { + objectKey := object.Key("VpnTunnelOutsideIpAddress") + objectKey.String(*v.VpnTunnelOutsideIpAddress) + } + + return nil +} + func awsEc2query_serializeOpDocumentGetAllowedImagesSettingsInput(v *GetAllowedImagesSettingsInput, value query.Value) error { object := value.Object() _ = object @@ -74941,6 +75043,11 @@ func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInp objectKey.String(*v.InternetKeyExchangeVersion) } + if v.SampleType != nil { + objectKey := object.Key("SampleType") + objectKey.String(*v.SampleType) + } + if v.VpnConnectionDeviceTypeId != nil { objectKey := object.Key("VpnConnectionDeviceTypeId") objectKey.String(*v.VpnConnectionDeviceTypeId) @@ -78154,6 +78261,11 @@ func awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(v *ModifyVpnTunn objectKey.Boolean(*v.DryRun) } + if v.PreSharedKeyStorage != nil { + objectKey := object.Key("PreSharedKeyStorage") + objectKey.String(*v.PreSharedKeyStorage) + } + if v.SkipTunnelReplacement != nil { objectKey := object.Key("SkipTunnelReplacement") objectKey.Boolean(*v.SkipTunnelReplacement) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go index 31899a8b7..395f9f1b2 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go @@ -8646,6 +8646,31 @@ func (SnapshotLocationEnum) Values() []SnapshotLocationEnum { } } +type SnapshotReturnCodes string + +// Enum values for SnapshotReturnCodes +const ( + SnapshotReturnCodesSuccess SnapshotReturnCodes = "success" + SnapshotReturnCodesWarnSkipped SnapshotReturnCodes = "skipped" + SnapshotReturnCodesErrorMissingPermissions SnapshotReturnCodes = "missing-permissions" + SnapshotReturnCodesErrorCodeInternalError SnapshotReturnCodes = "internal-error" + SnapshotReturnCodesErrorCodeClientError SnapshotReturnCodes = "client-error" +) + +// Values returns all known values for SnapshotReturnCodes. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (SnapshotReturnCodes) Values() []SnapshotReturnCodes { + return []SnapshotReturnCodes{ + "success", + "skipped", + "missing-permissions", + "internal-error", + "client-error", + } +} + type SnapshotState string // Enum values for SnapshotState @@ -10583,6 +10608,27 @@ func (VpnStaticRouteSource) Values() []VpnStaticRouteSource { } } +type VpnTunnelProvisioningStatus string + +// Enum values for VpnTunnelProvisioningStatus +const ( + VpnTunnelProvisioningStatusAvailable VpnTunnelProvisioningStatus = "available" + VpnTunnelProvisioningStatusPending VpnTunnelProvisioningStatus = "pending" + VpnTunnelProvisioningStatusFailed VpnTunnelProvisioningStatus = "failed" +) + +// Values returns all known values for VpnTunnelProvisioningStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (VpnTunnelProvisioningStatus) Values() []VpnTunnelProvisioningStatus { + return []VpnTunnelProvisioningStatus{ + "available", + "pending", + "failed", + } +} + type WeekDay string // Enum values for WeekDay diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go index a14245938..f3bdb321a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go @@ -155,6 +155,40 @@ type ActiveInstance struct { noSmithyDocumentSerde } +// Contains information about the current security configuration of an active VPN +// tunnel. +type ActiveVpnTunnelStatus struct { + + // The version of the Internet Key Exchange (IKE) protocol being used. + IkeVersion *string + + // The Diffie-Hellman group number being used in Phase 1 IKE negotiations. + Phase1DHGroup *int32 + + // The encryption algorithm negotiated in Phase 1 IKE negotiations. + Phase1EncryptionAlgorithm *string + + // The integrity algorithm negotiated in Phase 1 IKE negotiations. + Phase1IntegrityAlgorithm *string + + // The Diffie-Hellman group number being used in Phase 2 IKE negotiations. + Phase2DHGroup *int32 + + // The encryption algorithm negotiated in Phase 2 IKE negotiations. + Phase2EncryptionAlgorithm *string + + // The integrity algorithm negotiated in Phase 2 IKE negotiations. + Phase2IntegrityAlgorithm *string + + // The current provisioning status of the VPN tunnel. + ProvisioningStatus VpnTunnelProvisioningStatus + + // The reason for the current provisioning status. + ProvisioningStatusReason *string + + noSmithyDocumentSerde +} + // Describes a principal. type AddedPrincipal struct { @@ -3405,6 +3439,38 @@ type DeleteQueuedReservedInstancesError struct { noSmithyDocumentSerde } +// The snapshot ID and its deletion result code. +type DeleteSnapshotReturnCode struct { + + // The result code from the snapshot deletion attempt. Possible values: + // + // - success - The snapshot was successfully deleted. + // + // - skipped - The snapshot was not deleted because it's associated with other + // AMIs. + // + // - missing-permissions - The snapshot was not deleted because the role lacks + // DeleteSnapshot permissions. For more information, see [How Amazon EBS works with IAM]. + // + // - internal-error - The snapshot was not deleted due to a server error. + // + // - client-error - The snapshot was not deleted due to a client configuration + // error. + // + // For details about an error, check the DeleteSnapshot event in the CloudTrail + // event history. For more information, see [View event history]in the Amazon Web Services CloudTrail + // User Guide. + // + // [View event history]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/tutorial-event-history.html + // [How Amazon EBS works with IAM]: https://docs.aws.amazon.com/ebs/latest/userguide/security_iam_service-with-iam.html + ReturnCode SnapshotReturnCodes + + // The ID of the snapshot. + SnapshotId *string + + noSmithyDocumentSerde +} + // Information about the tag keys to deregister for the current Region. You can // either specify individual tag keys or deregister all tag keys in the current // Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys in @@ -6572,10 +6638,10 @@ type Image struct { // Any block device mapping entries. BlockDeviceMappings []BlockDeviceMapping - // The boot mode of the image. For more information, see [Boot modes] in the Amazon EC2 User + // The boot mode of the image. For more information, see [Instance launch behavior with Amazon EC2 boot modes] in the Amazon EC2 User // Guide. // - // [Boot modes]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html + // [Instance launch behavior with Amazon EC2 boot modes]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html BootMode BootModeValues // The date and time the image was created. @@ -6680,19 +6746,19 @@ type Image struct { // // The ID only appears if the AMI was created using CreateImage, CopyImage, or CreateRestoreImageTask. The ID does not // appear if the AMI was created using any other API. For some older AMIs, the ID - // might not be available. For more information, see [Identify the source AMI used to create a new AMI]in the Amazon EC2 User Guide. + // might not be available. For more information, see [Identify the source AMI used to create a new Amazon EC2 AMI]in the Amazon EC2 User Guide. // - // [Identify the source AMI used to create a new AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html + // [Identify the source AMI used to create a new Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html SourceImageId *string // The Region of the source AMI. // // The Region only appears if the AMI was created using CreateImage, CopyImage, or CreateRestoreImageTask. The Region does // not appear if the AMI was created using any other API. For some older AMIs, the - // Region might not be available. For more information, see [Identify the source AMI used to create a new AMI]in the Amazon EC2 User + // Region might not be available. For more information, see [Identify the source AMI used to create a new Amazon EC2 AMI]in the Amazon EC2 User // Guide. // - // [Identify the source AMI used to create a new AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html + // [Identify the source AMI used to create a new Amazon EC2 AMI]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/identify-source-ami-used-to-create-new-ami.html SourceImageRegion *string // The ID of the instance that the AMI was created from if the AMI was created @@ -22741,6 +22807,10 @@ type VpnConnection struct { // The VPN connection options. Options *VpnConnectionOptions + // The Amazon Resource Name (ARN) of the Secrets Manager secret storing the + // pre-shared key(s) for the VPN connection. + PreSharedKeyArn *string + // The static routes associated with the VPN connection. Routes []VpnStaticRoute diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go index 0dfc09002..d590e5855 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go @@ -5890,6 +5890,26 @@ func (m *validateOpExportVerifiedAccessInstanceClientConfiguration) HandleInitia return next.HandleInitialize(ctx, in) } +type validateOpGetActiveVpnTunnelStatus struct { +} + +func (*validateOpGetActiveVpnTunnelStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetActiveVpnTunnelStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetActiveVpnTunnelStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetActiveVpnTunnelStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetAssociatedEnclaveCertificateIamRoles struct { } @@ -10826,6 +10846,10 @@ func addOpExportVerifiedAccessInstanceClientConfigurationValidationMiddleware(st return stack.Initialize.Add(&validateOpExportVerifiedAccessInstanceClientConfiguration{}, middleware.After) } +func addOpGetActiveVpnTunnelStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetActiveVpnTunnelStatus{}, middleware.After) +} + func addOpGetAssociatedEnclaveCertificateIamRolesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetAssociatedEnclaveCertificateIamRoles{}, middleware.After) } @@ -17405,6 +17429,24 @@ func validateOpExportVerifiedAccessInstanceClientConfigurationInput(v *ExportVer } } +func validateOpGetActiveVpnTunnelStatusInput(v *GetActiveVpnTunnelStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetActiveVpnTunnelStatusInput"} + if v.VpnConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) + } + if v.VpnTunnelOutsideIpAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("VpnTunnelOutsideIpAddress")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetAssociatedEnclaveCertificateIamRolesInput(v *GetAssociatedEnclaveCertificateIamRolesInput) error { if v == nil { return nil diff --git a/vendor/modules.txt b/vendor/modules.txt index 1d5accacb..8cd26e9d9 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -61,7 +61,7 @@ github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.222.0 +# github.com/aws/aws-sdk-go-v2/service/ec2 v1.224.0 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints